Fire stats in active fires after add
This commit is contained in:
parent
2bcdb7e77c
commit
32f3f065ae
1 changed files with 14 additions and 8 deletions
|
|
@ -8,6 +8,7 @@ import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:redux/src/store.dart';
|
import 'package:redux/src/store.dart';
|
||||||
|
|
||||||
import 'colors.dart';
|
import 'colors.dart';
|
||||||
|
import 'firesSpinner.dart';
|
||||||
import 'generated/i18n.dart';
|
import 'generated/i18n.dart';
|
||||||
import 'genericMap.dart';
|
import 'genericMap.dart';
|
||||||
import 'globalFiresBottomStats.dart';
|
import 'globalFiresBottomStats.dart';
|
||||||
|
|
@ -16,7 +17,6 @@ import 'mainDrawer.dart';
|
||||||
import 'models/appState.dart';
|
import 'models/appState.dart';
|
||||||
import 'placesAutocompleteUtils.dart';
|
import 'placesAutocompleteUtils.dart';
|
||||||
import 'redux/actions.dart';
|
import 'redux/actions.dart';
|
||||||
import 'firesSpinner.dart';
|
|
||||||
|
|
||||||
@immutable
|
@immutable
|
||||||
class _ViewModel {
|
class _ViewModel {
|
||||||
|
|
@ -95,7 +95,9 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
||||||
loc.subscribed = !loc.subscribed;
|
loc.subscribed = !loc.subscribed;
|
||||||
onToggle(loc);
|
onToggle(loc);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
showSnackMsg(loc.subscribed? S.of(context).subscribedToFires: S.of(context).unsubscribedToFires);
|
showSnackMsg(loc.subscribed
|
||||||
|
? S.of(context).subscribedToFires
|
||||||
|
: S.of(context).unsubscribedToFires);
|
||||||
}),
|
}),
|
||||||
title: new Text(loc.description, style: new TextStyle(fontSize: 16.0)),
|
title: new Text(loc.description, style: new TextStyle(fontSize: 16.0)),
|
||||||
subtitle: loc.currentNumFires == YourLocation.withoutStats
|
subtitle: loc.currentNumFires == YourLocation.withoutStats
|
||||||
|
|
@ -103,12 +105,16 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
||||||
: loc.currentNumFires == 0
|
: loc.currentNumFires == 0
|
||||||
? new Text(S.of(context).noFiresAround)
|
? new Text(S.of(context).noFiresAround)
|
||||||
: loc.currentNumFires == 1
|
: loc.currentNumFires == 1
|
||||||
? new Text(S
|
? new Text(
|
||||||
.of(context)
|
S
|
||||||
.fireAroundThisArea(loc.distance.toString()), style: fireStatsStyle)
|
.of(context)
|
||||||
: new Text(S.of(context).firesAroundThisArea(
|
.fireAroundThisArea(loc.distance.toString()),
|
||||||
loc.currentNumFires.toString(),
|
style: fireStatsStyle)
|
||||||
loc.distance.toString()), style: fireStatsStyle),
|
: new Text(
|
||||||
|
S.of(context).firesAroundThisArea(
|
||||||
|
loc.currentNumFires.toString(),
|
||||||
|
loc.distance.toString()),
|
||||||
|
style: fireStatsStyle),
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
showSnackMsg(S.of(context).toDeleteThisPlace);
|
showSnackMsg(S.of(context).toDeleteThisPlace);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue