Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add backInk to registration code page #69

Merged
merged 1 commit into from
Jan 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
},
);
}
}