Created
June 10, 2019 15:58
-
-
Save timbergus/b92c38a8765234a79ffa2d31f49173d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class ViewB extends StatelessWidget { | |
final String message; | |
ViewB({Key key, this.message}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('View B'), | |
), | |
body: Center( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
Text( | |
'$message', | |
style: TextStyle( | |
fontSize: 20, | |
), | |
), | |
RaisedButton( | |
onPressed: () => Navigator.pop(context), | |
color: Colors.green, | |
child: Text( | |
'Return to View A', | |
style: TextStyle( | |
color: Colors.white, | |
), | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment