-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
material_item.dart
36 lines (32 loc) · 883 Bytes
/
material_item.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import '../../../common/enums/material_type.dart' as app;
import '../../../common/styles.dart';
class MaterialItem extends StatelessWidget {
final app.MaterialType type;
final String image;
final int quantity;
const MaterialItem({
Key key,
@required this.type,
@required this.image,
@required this.quantity,
}) : super(key: key);
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Container(
margin: Styles.edgeInsetAll5,
child: Column(
children: [
Image.asset(image, width: 40, height: 40),
Text(
'$quantity',
textAlign: TextAlign.center,
style: theme.textTheme.subtitle2.copyWith(color: Colors.white),
),
],
),
);
}
}