Unverified Commit cdddec74 authored by rami-a's avatar rami-a Committed by GitHub

Update shrine login screen so that cancel dismisses the route (#27367)

Additionally, fix the status bar color for the login screen

Closes #26034 
parent e57f57c7
...@@ -31,10 +31,14 @@ class _LoginPageState extends State<LoginPage> { ...@@ -31,10 +31,14 @@ class _LoginPageState extends State<LoginPage> {
appBar: AppBar( appBar: AppBar(
elevation: 0.0, elevation: 0.0,
backgroundColor: Colors.white, backgroundColor: Colors.white,
brightness: Brightness.light,
leading: IconButton( leading: IconButton(
icon: const BackButtonIcon(), icon: const BackButtonIcon(),
tooltip: MaterialLocalizations.of(context).backButtonTooltip, tooltip: MaterialLocalizations.of(context).backButtonTooltip,
onPressed: () { onPressed: () {
// The login screen is immediately displayed on top of the Shrine
// home screen using onGenerateRoute and so rootNavigator must be
// set to true in order to get out of Shrine completely.
Navigator.of(context, rootNavigator: true).pop(); Navigator.of(context, rootNavigator: true).pop();
} }
), ),
...@@ -84,8 +88,11 @@ class _LoginPageState extends State<LoginPage> { ...@@ -84,8 +88,11 @@ class _LoginPageState extends State<LoginPage> {
borderRadius: BorderRadius.all(Radius.circular(7.0)), borderRadius: BorderRadius.all(Radius.circular(7.0)),
), ),
onPressed: () { onPressed: () {
_usernameController.clear(); // The login screen is immediately displayed on top of
_passwordController.clear(); // the Shrine home screen using onGenerateRoute and so
// rootNavigator must be set to true in order to get out
// of Shrine completely.
Navigator.of(context, rootNavigator: true).pop();
}, },
), ),
RaisedButton( RaisedButton(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment