Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/HxBreak/new_trend
Browse files Browse the repository at this point in the history
  • Loading branch information
xtuyaowu committed Aug 5, 2018
2 parents f51ba6c + be09ea1 commit 5126482
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@ import 'dart:convert';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
class MyApp extends StatefulWidget {
MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
MainScreenStateModel model;
@override
void initState() {
super.initState();
model = MainScreenStateModel();
}

@override
Widget build(BuildContext context) {
return new MaterialApp(
Expand All @@ -16,7 +27,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.blue,
),
home: ScopedModel<MainScreenStateModel>(
model: MainScreenStateModel(),
model: model,
child: new MainScreen(),
),
);
Expand Down

0 comments on commit 5126482

Please sign in to comment.