Skip to content

Commit

Permalink
[Presentation] Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Apr 6, 2021
1 parent d382120 commit fbdf822
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
8 changes: 6 additions & 2 deletions lib/presentation/materials/widgets/material_card.dart
Expand Up @@ -135,7 +135,10 @@ class MaterialCard extends StatelessWidget {
borderRadius: BorderRadius.circular(10),
color: theme.accentColor.withOpacity(0.8),
),
child: Text(' - ${CurrencyUtils.formatNumber(usedQuantity)} '),
child: Text(
' - ${CurrencyUtils.formatNumber(usedQuantity)} ',
style: theme.textTheme.subtitle2.copyWith(color: Colors.white),
),
),
),
),
Expand All @@ -146,7 +149,7 @@ class MaterialCard extends StatelessWidget {
margin: const EdgeInsets.only(bottom: 5),
child: Text(
CurrencyUtils.formatNumber(quantity),
style: theme.textTheme.subtitle2,
style: theme.textTheme.subtitle2.copyWith(color: Colors.white),
),
),
if (!withoutDetails && !isInQuantityMode)
Expand Down Expand Up @@ -191,6 +194,7 @@ class MaterialCard extends StatelessWidget {
builder: (_) => ItemQuantityDialog(quantity: quantity),
);

context.read<ItemQuantityFormBloc>().add(const ItemQuantityFormEvent.close());
if (newValue == null) {
return;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/presentation/shared/utils/toast_utils.dart
Expand Up @@ -36,19 +36,19 @@ class ToastUtils {
switch (type) {
case ToastType.info:
bgColor = Colors.blue;
icon = const Icon(Icons.info);
icon = const Icon(Icons.info, color: Colors.white);
break;
case ToastType.succeed:
bgColor = Colors.green;
icon = const Icon(Icons.check);
icon = const Icon(Icons.check, color: Colors.white);
break;
case ToastType.warning:
bgColor = Colors.orange;
icon = const Icon(Icons.warning);
icon = const Icon(Icons.warning, color: Colors.white);
break;
case ToastType.error:
bgColor = Colors.red;
icon = const Icon(Icons.dangerous);
icon = const Icon(Icons.dangerous, color: Colors.white);
break;
default:
throw Exception('Invalid toast type = $type');
Expand Down
16 changes: 7 additions & 9 deletions lib/presentation/tierlist/widgets/tierlist_row_color_picker.dart
Expand Up @@ -23,15 +23,13 @@ class _TierListRowColorPickerState extends State<TierListRowColorPicker> {
final s = S.of(context);
return AlertDialog(
title: Text(s.pickColor),
content: SingleChildScrollView(
child: BlockPicker(
pickerColor: widget.currentColor,
onColorChanged: (color) {
setState(() {
selectedColor = color;
});
},
),
content: BlockPicker(
pickerColor: widget.currentColor,
onColorChanged: (color) {
setState(() {
selectedColor = color;
});
},
),
actions: <Widget>[
OutlineButton(
Expand Down

0 comments on commit fbdf822

Please sign in to comment.