@@ -6,9 +6,11 @@ import 'package:flutter_disposebag/flutter_disposebag.dart';
66import 'package:listenable_stream/listenable_stream.dart' ;
77import 'package:rxdart_ext/state_stream.dart' ;
88
9- void main () => runApp (MyApp ());
9+ void main () => runApp (const MyApp ());
1010
1111class MyApp extends StatelessWidget {
12+ const MyApp ({Key ? key}) : super (key: key);
13+
1214 @override
1315 Widget build (BuildContext context) {
1416 return MaterialApp (
@@ -26,27 +28,29 @@ class MyHomePage extends StatelessWidget {
2628 Widget build (BuildContext context) {
2729 return Scaffold (
2830 appBar: AppBar (
29- title: Text ('listenable_stream example' ),
31+ title: const Text ('listenable_stream example' ),
3032 ),
3133 body: Center (
3234 child: ElevatedButton .icon (
33- label: Text ('GO' ),
35+ label: const Text ('GO' ),
3436 onPressed: () {
3537 Navigator .push (
3638 context,
37- MaterialPageRoute (builder: (context) => MainPage ()),
39+ MaterialPageRoute (builder: (context) => const MainPage ()),
3840 );
3941 },
40- icon: Icon (Icons .home),
42+ icon: const Icon (Icons .home),
4143 ),
4244 ),
4345 );
4446 }
4547}
4648
4749class MainPage extends StatefulWidget {
50+ const MainPage ({Key ? key}) : super (key: key);
51+
4852 @override
49- _MainPageState createState () => _MainPageState ();
53+ State < MainPage > createState () => _MainPageState ();
5054}
5155
5256class _MainPageState extends State <MainPage > with DisposeBagMixin {
@@ -79,7 +83,7 @@ class _MainPageState extends State<MainPage> with DisposeBagMixin {
7983 Widget build (BuildContext context) {
8084 return Scaffold (
8185 appBar: AppBar (
82- title: Text ('Main' ),
86+ title: const Text ('Main' ),
8387 ),
8488 body: Padding (
8589 padding: const EdgeInsets .all (8.0 ),
0 commit comments