Skip to content

Commit

Permalink
feat: Add backInk to registration code page (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
pichoemr authored and taorepoara committed Sep 29, 2023
1 parent a2eb850 commit 3965e99
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/views/verify_code/verifiying_code_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:client_common/models/auth_model.dart';
import 'package:client_common/navigator/common_navigator.dart';
import 'package:client_common/views/simple_page.dart';
import 'package:client_common/views/verify_code/verify_code_form.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class VerifyingCodePage extends StatelessWidget {
static const routeName = '/code';
Expand All @@ -11,6 +14,13 @@ class VerifyingCodePage extends StatelessWidget {
title: "Thank you for your registration",
message: "Great things are about to happen! We have sent you a registration code to access our platform.",
child: VerifyCodeForm(),
backInkText: "Logout",
//For now, when registering, we don't have a refreshToken. So just delete accessToken/user and redirect to the login page.
backInkAction: () => {
context.read<AuthModel>().accessToken = null,
context.read<AuthModel>().user = null,
CommonNavigator.go(context, CommonNavigator.login)
},
);
}
}

0 comments on commit 3965e99

Please sign in to comment.