File tree 2 files changed +7
-33
lines changed
2 files changed +7
-33
lines changed Original file line number Diff line number Diff line change @@ -19,38 +19,12 @@ import 'model/product.dart';
19
19
import 'supplemental/asymmetric_view.dart' ;
20
20
21
21
class HomePage extends StatelessWidget {
22
- // TODO: Add a variable for Category (104)
22
+ final Category category;
23
+
24
+ const HomePage ({this .category: Category .all});
23
25
24
26
@override
25
27
Widget build (BuildContext context) {
26
- // TODO: Return an AsymmetricView (104)
27
- // TODO: Pass Category variable to AsymmetricView (104)
28
- return Scaffold (
29
- appBar: AppBar (
30
- brightness: Brightness .light,
31
- leading: IconButton (
32
- icon: Icon (Icons .menu),
33
- onPressed: () {
34
- print ('Menu button' );
35
- },
36
- ),
37
- title: Text ('SHRINE' ),
38
- actions: < Widget > [
39
- IconButton (
40
- icon: Icon (Icons .search),
41
- onPressed: () {
42
- print ('Search button' );
43
- },
44
- ),
45
- IconButton (
46
- icon: Icon (Icons .tune),
47
- onPressed: () {
48
- print ('Filter button' );
49
- },
50
- ),
51
- ],
52
- ),
53
- body: AsymmetricView (products: getProducts (Category .all)),
54
- );
28
+ return AsymmetricView (products: getProducts (category));
55
29
}
56
30
}
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ class _LoginPageState extends State<LoginPage> {
53
53
),
54
54
),
55
55
),
56
- const SizedBox (height: 12.0 ),
57
- new PrimaryColorOverride (
56
+ SizedBox (height: 12.0 ),
57
+ PrimaryColorOverride (
58
58
color: kShrineBrown900,
59
59
child: TextField (
60
60
controller: _passwordController,
@@ -95,7 +95,7 @@ class _LoginPageState extends State<LoginPage> {
95
95
}
96
96
97
97
class PrimaryColorOverride extends StatelessWidget {
98
- const PrimaryColorOverride ({Key key, this .color, this .child})
98
+ PrimaryColorOverride ({Key key, this .color, this .child})
99
99
: super (key: key);
100
100
101
101
final Color color;
You can’t perform that action at this time.
0 commit comments