Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemragab committed Oct 26, 2021
1 parent 669be98 commit e29e2fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/lib/controllers/login_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class LoginController {
final email = emailTxtController.text.toString();
final password = passwordTxtController.text.toString();
try {
///Login on your system backend
CustomAlert.customLoadingDialog(context: context);
final d = (await CustomDio().send(
reqMethod: "post",
Expand All @@ -29,6 +30,7 @@ class LoginController {

await GetStorage().write("myModel", u.toMap());

///Login on v_chat_sdk system
await VChatController.instance
.login(VChatLoginDto(email: email, password: password));
Navigator.pop(context);
Expand Down
2 changes: 2 additions & 0 deletions example/lib/controllers/register_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class RegisterController {

try {
CustomAlert.customLoadingDialog(context: context);
///Register on your system backend
if (imagePath != null) {
myUser = (await CustomDio().uploadFile(
apiEndPoint: "user/register",
Expand All @@ -49,6 +50,7 @@ class RegisterController {
final u = User.fromMap(myUser);
await GetStorage().write("myModel", u.toMap());

///Register on v_chat_sdk system
await VChatController.instance.register(
VChatRegisterDto(
name: name,
Expand Down

0 comments on commit e29e2fe

Please sign in to comment.