Skip to content

Instantly share code, notes, and snippets.

@lawreyios
Last active April 7, 2019 13:27
Show Gist options
  • Save lawreyios/b4a6c5e68261c279a348802635977ff4 to your computer and use it in GitHub Desktop.
Save lawreyios/b4a6c5e68261c279a348802635977ff4 to your computer and use it in GitHub Desktop.
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