Future<void> _openSignInDialog() {
return showDialog<void>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text('Please sign in'),
content: const Text(
'...'),
actions: <Widget>[
FlatButton.icon(
icon: Icon(Icons.check_circle, color: Colors.green),
label: Text('Yes'),
onPressed: () {
// Replace this dialog with the login page
Navigator.pushReplacementNamed(context, '/login').then((_) {
Navigator.of(context).pushNamed('/otherpage');
});
},
),
FlatButton.icon(
icon: Icon(Icons.cancel, color: Colors.red),
label: Text('No'),
onPressed: () {
Navigator.pop(context);
},
),
],
);
},
);
}
Navigator.pushNamed(context, '/login').then((_) {
Navigator.of(context).pushReplacementNamed('/otherpage');
});
--
You received this message because you are subscribed to a topic in the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flutter-dev/4_gJ3alInr0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/47e6f3d1-5bd4-4afb-adab-ddcd2e2d9463%40googlegroups.com.
Navigator.popAndPushNamed(context, /route);
To unsubscribe from this group and all its topics, send an email to flutt...@googlegroups.com.