File tree 1 file changed +16
-3
lines changed
examples/generator_example/generator_app/lib
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,27 @@ void main() {
6
6
runApp (MyApp ());
7
7
}
8
8
9
- class MyApp extends StatelessWidget {
9
+ class MyApp extends StatefulWidget {
10
+ @override
11
+ State <MyApp > createState () => _MyAppState ();
12
+ }
13
+
14
+ class _MyAppState extends State <MyApp > {
15
+ var _isDark = false ;
16
+ final controller = TextEditingController ();
17
+
10
18
@override
11
19
Widget build (BuildContext context) {
12
20
return MaterialApp (
13
21
title: 'Playbook Demo' ,
14
- theme: ThemeData .light (),
22
+ theme: _isDark ? ThemeData . dark () : ThemeData .light (),
15
23
home: PlaybookGallery (
16
- title: 'Sample app' ,
24
+ title: 'Generator app' ,
25
+ searchTextController: controller,
26
+ checkeredColor: null ,
27
+ onCustomActionPressed: () => setState (() {
28
+ _isDark = ! _isDark;
29
+ }),
17
30
playbook: playbook,
18
31
),
19
32
);
You can’t perform that action at this time.
0 commit comments