Skip to content

Commit

Permalink
fix:修复版本控制问题
Browse files Browse the repository at this point in the history
fix:No MaterialLocalizations found 问题
  • Loading branch information
ckken committed Sep 6, 2019
1 parent 667ef65 commit 0a9d9ad
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
17 changes: 12 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,17 @@ class MainAppState extends State<MainApp> {
}
}

void main() => runApp(
OKToast(
child: Store.init(
child: MainApp(),
),
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: OKToast(
child: Store.init(child: MainApp()),
),
);
}
}

void main() => runApp(
MyApp(),
);
3 changes: 2 additions & 1 deletion lib/store/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class Store {
return context;
}

static init({child}) {
static init({child,context}) {
Store.context ??= context;
return MultiProvider(
child: child,
providers: [
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: A new Flutter project.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.3+1
version: 1.0.4+1

environment:
sdk: ">=2.2.2 <3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.0.3"}
{"version":"1.0.4"}

0 comments on commit 0a9d9ad

Please sign in to comment.