Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a9d9ad

Browse files
committed
fix:修复版本控制问题
fix:No MaterialLocalizations found 问题
1 parent 667ef65 commit 0a9d9ad

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

‎lib/main.dart

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,17 @@ class MainAppState extends State<MainApp> {
7070
}
7171
}
7272

73-
void main() => runApp(
74-
OKToast(
75-
child: Store.init(
76-
child: MainApp(),
77-
),
73+
class MyApp extends StatelessWidget {
74+
@override
75+
Widget build(BuildContext context) {
76+
return MaterialApp(
77+
home: OKToast(
78+
child: Store.init(child: MainApp()),
7879
),
7980
);
81+
}
82+
}
83+
84+
void main() => runApp(
85+
MyApp(),
86+
);

‎lib/store/index.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class Store {
1717
return context;
1818
}
1919

20-
static init({child}) {
20+
static init({child,context}) {
21+
Store.context ??= context;
2122
return MultiProvider(
2223
child: child,
2324
providers: [

‎pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: A new Flutter project.
77
# Both the version and the builder number may be overridden in flutter
88
# build by specifying --build-name and --build-number, respectively.
99
# Read more about versioning at semver.org.
10-
version: 1.0.3+1
10+
version: 1.0.4+1
1111

1212
environment:
1313
sdk: ">=2.2.2 <3.0.0"

‎version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"1.0.3"}
1+
{"version":"1.0.4"}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /