-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Ishad-M-I-M/main
Changes in signup and qr result
- Loading branch information
Showing
20 changed files
with
646 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:bloc/bloc.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
part 'initialize_event.dart'; | ||
part 'initialize_state.dart'; | ||
|
||
class InitializeBloc extends Bloc<InitializeEvent, InitializeState> { | ||
InitializeBloc() : super(Initial()) { | ||
on<InitializeAppEvent>((event, emit) async{ | ||
emit(Initial()); | ||
|
||
//simulate the initializing tests | ||
// ex:- check registration status | ||
await Future.delayed(const Duration(seconds: 3)); | ||
|
||
emit(NotRegistered()); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
part of 'initialize_bloc.dart'; | ||
|
||
@immutable | ||
abstract class InitializeEvent {} | ||
|
||
class InitializeAppEvent extends InitializeEvent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
part of 'initialize_bloc.dart'; | ||
|
||
@immutable | ||
abstract class InitializeState {} | ||
|
||
class Initial extends InitializeState {} | ||
|
||
class Registered extends InitializeState {} | ||
|
||
class NotRegistered extends InitializeState {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:bloc/bloc.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
part 'signup_event.dart'; | ||
part 'signup_state.dart'; | ||
|
||
class SignupBloc extends Bloc<SignupEvent, SignupState> { | ||
SignupBloc() : super(Initial()) { | ||
on<SubmitSignupEvent>((event, emit) async{ | ||
emit(Submitted()); | ||
|
||
//simulate the signup process | ||
// creating a wallet, storing the data in wallet | ||
await Future.delayed(const Duration(seconds: 3)); | ||
|
||
emit(Success()); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
part of 'signup_bloc.dart'; | ||
|
||
@immutable | ||
abstract class SignupEvent {} | ||
|
||
class SubmitSignupEvent extends SignupEvent { | ||
final String name; | ||
final String email; | ||
final String dob; | ||
final String country; | ||
final String phone; | ||
final String gender; | ||
|
||
SubmitSignupEvent({ | ||
required this.name, | ||
required this.email, | ||
required this.dob, | ||
required this.country, | ||
required this.phone, | ||
required this.gender | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
part of 'signup_bloc.dart'; | ||
|
||
@immutable | ||
abstract class SignupState {} | ||
|
||
class Initial extends SignupState {} | ||
|
||
class Submitted extends SignupState {} | ||
|
||
class Success extends SignupState {} | ||
|
||
class Failed extends SignupState {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.