Last active
April 7, 2019 13:27
-
-
Save lawreyios/b4a6c5e68261c279a348802635977ff4 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'; | |
import 'package:scoped_model/scoped_model.dart'; | |
import 'package:flutter_global_variable/scoped_models/main.dart'; | |
class Page3 extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.white, | |
appBar: AppBar( | |
title: Text("Page 3"), | |
backgroundColor: Colors.transparent, | |
elevation: 0.0), | |
body: ScopedModelDescendant<MainModel>( | |
builder: (BuildContext context, Widget child, MainModel model) { | |
return Center( | |
child: Text( | |
'${model.count}', | |
style: TextStyle(fontSize: 80.0), | |
), | |
); | |
}), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment