Skip to content

Instantly share code, notes, and snippets.

@timbergus
Created June 10, 2019 15:58
Show Gist options
  • Save timbergus/b92c38a8765234a79ffa2d31f49173d8 to your computer and use it in GitHub Desktop.
Save timbergus/b92c38a8765234a79ffa2d31f49173d8 to your computer and use it in GitHub Desktop.
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