@@ -6,9 +6,11 @@ import 'package:flutter_disposebag/flutter_disposebag.dart';
6
6
import 'package:listenable_stream/listenable_stream.dart' ;
7
7
import 'package:rxdart_ext/state_stream.dart' ;
8
8
9
- void main () => runApp (MyApp ());
9
+ void main () => runApp (const MyApp ());
10
10
11
11
class MyApp extends StatelessWidget {
12
+ const MyApp ({Key ? key}) : super (key: key);
13
+
12
14
@override
13
15
Widget build (BuildContext context) {
14
16
return MaterialApp (
@@ -26,27 +28,29 @@ class MyHomePage extends StatelessWidget {
26
28
Widget build (BuildContext context) {
27
29
return Scaffold (
28
30
appBar: AppBar (
29
- title: Text ('listenable_stream example' ),
31
+ title: const Text ('listenable_stream example' ),
30
32
),
31
33
body: Center (
32
34
child: ElevatedButton .icon (
33
- label: Text ('GO' ),
35
+ label: const Text ('GO' ),
34
36
onPressed: () {
35
37
Navigator .push (
36
38
context,
37
- MaterialPageRoute (builder: (context) => MainPage ()),
39
+ MaterialPageRoute (builder: (context) => const MainPage ()),
38
40
);
39
41
},
40
- icon: Icon (Icons .home),
42
+ icon: const Icon (Icons .home),
41
43
),
42
44
),
43
45
);
44
46
}
45
47
}
46
48
47
49
class MainPage extends StatefulWidget {
50
+ const MainPage ({Key ? key}) : super (key: key);
51
+
48
52
@override
49
- _MainPageState createState () => _MainPageState ();
53
+ State < MainPage > createState () => _MainPageState ();
50
54
}
51
55
52
56
class _MainPageState extends State <MainPage > with DisposeBagMixin {
@@ -79,7 +83,7 @@ class _MainPageState extends State<MainPage> with DisposeBagMixin {
79
83
Widget build (BuildContext context) {
80
84
return Scaffold (
81
85
appBar: AppBar (
82
- title: Text ('Main' ),
86
+ title: const Text ('Main' ),
83
87
),
84
88
body: Padding (
85
89
padding: const EdgeInsets .all (8.0 ),
0 commit comments