bug fixes

This commit is contained in:
MohammadTaha Basiri 2022-04-22 03:51:48 +04:30
parent fc73d5452c
commit 1bd33a834d
2 changed files with 4 additions and 4 deletions

View File

@ -256,7 +256,7 @@ class _StatisticDetailsState extends State<StatisticDetails> {
if (state.data!.dp == 0) { if (state.data!.dp == 0) {
return null; return null;
} }
if (state.data!.dt == 'low') { if (state.data!.dt == 'high') {
return Theme.of(context).colorScheme.success; return Theme.of(context).colorScheme.success;
} else { } else {
return Theme.of(context).colorScheme.error; return Theme.of(context).colorScheme.error;
@ -267,7 +267,7 @@ class _StatisticDetailsState extends State<StatisticDetails> {
if (state.data!.dp == 0) { if (state.data!.dp == 0) {
return null; return null;
} }
if (state.data!.dt == 'low') { if (state.data!.dt == 'high') {
return DidvanIcons.angle_up_regular; return DidvanIcons.angle_up_regular;
} else { } else {
return DidvanIcons.angle_down_regular; return DidvanIcons.angle_down_regular;

View File

@ -18,7 +18,7 @@ class StatisticOverview extends StatelessWidget {
required this.onMarkChanged, required this.onMarkChanged,
}) : super(key: key); }) : super(key: key);
Color _diffColor(context) => statistic.data.dt == 'low' Color _diffColor(context) => statistic.data.dt == 'high'
? Theme.of(context).colorScheme.success ? Theme.of(context).colorScheme.success
: Theme.of(context).colorScheme.error; : Theme.of(context).colorScheme.error;
@ -88,7 +88,7 @@ class StatisticOverview extends StatelessWidget {
const Spacer(), const Spacer(),
if (_hasDiff) if (_hasDiff)
Icon( Icon(
statistic.data.dt == 'low' statistic.data.dt == 'high'
? DidvanIcons.angle_up_regular ? DidvanIcons.angle_up_regular
: DidvanIcons.angle_down_regular, : DidvanIcons.angle_down_regular,
size: 18, size: 18,