More work with fire alerts
This commit is contained in:
parent
7b33b3fe70
commit
81a0d54a56
4 changed files with 47 additions and 4 deletions
|
|
@ -33,6 +33,22 @@ class _FireAlertState extends State<FireAlert> {
|
|||
);
|
||||
}
|
||||
|
||||
Widget buildNotifyNeighboursButton() {
|
||||
return new Align(
|
||||
alignment: const Alignment(0.0, -0.2),
|
||||
child: new FloatingActionButton(
|
||||
heroTag: 'neighAction',
|
||||
child: const Icon(CommunityMaterialIcons.bullhorn),
|
||||
onPressed: () {
|
||||
_scaffoldKey.currentState.showSnackBar(new SnackBar(
|
||||
content: new Text(S.of(context).inDevelopment),
|
||||
));
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget buildTweetButton() {
|
||||
return new Align(
|
||||
alignment: const Alignment(0.0, -0.2),
|
||||
|
|
@ -46,7 +62,7 @@ class _FireAlertState extends State<FireAlert> {
|
|||
String where =
|
||||
yourLocation.description.replaceAll(' ', '').split(',')[0];
|
||||
print(where);
|
||||
Share.share('#IF${where} FIXME');
|
||||
Share.share(S.of(context).tweetAboutSelf(yourLocation.description, '#IF${where}'));
|
||||
}).catchError((onError) {
|
||||
_scaffoldKey.currentState.showSnackBar(new SnackBar(
|
||||
content: new Text(
|
||||
|
|
@ -65,12 +81,19 @@ class _FireAlertState extends State<FireAlert> {
|
|||
List<CustomStep> fireSteps = listWithoutNulls(<CustomStep>[
|
||||
new CustomStep(
|
||||
title: new Text(S.of(context).callEmergencyServicesTitle),
|
||||
// subtitle:
|
||||
content: new Column(children: <Widget>[
|
||||
new Text(S.of(context).callEmergencyServicesDescription),
|
||||
new SizedBox(height: 20.0),
|
||||
buildCallButton()
|
||||
])),
|
||||
new CustomStep(
|
||||
title: new Text(S.of(context).notifyNeighbours),
|
||||
// state: CustomStepState.disabled,
|
||||
content: new Column(children: <Widget>[
|
||||
new Text(S.of(context).notifyNeighboursDescription),
|
||||
new SizedBox(height: 20.0),
|
||||
buildNotifyNeighboursButton()
|
||||
])),
|
||||
// TODO conditional: this only in Spain
|
||||
new CustomStep(
|
||||
title: new Text(S.of(context).tweetAboutAFireTitle),
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ class S implements WidgetsLocalizations {
|
|||
String get firesInYourPlaces => "Active fires in your places";
|
||||
String get firesNearPlace => "Fires near other place";
|
||||
String get getAlertsOfFiresinThatArea => "Get alerts of fires in that area";
|
||||
String get inDevelopment => "In development";
|
||||
String get inGreenMonitoredAreas => "In green, the areas monitored by our users currently";
|
||||
String get isYourUbicationEnabled => "I cannot get your current location. It's your ubication enabled?";
|
||||
String get itSeemsAControlledBurning => "It's a controlled burning";
|
||||
|
|
@ -72,6 +73,8 @@ class S implements WidgetsLocalizations {
|
|||
String get notAWildfire => "Isn't that a forest fire?";
|
||||
String get notPermsUbication => "We don't have permission to get your location";
|
||||
String get notifyAFire => "Notify a fire";
|
||||
String get notifyNeighbours => "Notify other users";
|
||||
String get notifyNeighboursDescription => "Alert other users of the area about the fire";
|
||||
String get privacyPolicy => "Privacy Policy";
|
||||
String get shareAppBtn => "Share our app";
|
||||
String get starAppBtn => "Rate our app";
|
||||
|
|
@ -103,6 +106,7 @@ class S implements WidgetsLocalizations {
|
|||
String noFiresAroundThisArea(String kmAround) => "There is no fires at $kmAround км around this area";
|
||||
String somethingAgo(String something) => "$something ago";
|
||||
String subscribeToValueAroundThisArea(String sliderValue) => "Subscribe to $sliderValue км around this area";
|
||||
String tweetAboutSelf(String location, String hash) => "Fire in $location $hash";
|
||||
String updatedLastCheck(String lastCheck) => "Updated $lastCheck";
|
||||
}
|
||||
|
||||
|
|
@ -185,6 +189,10 @@ class es extends S {
|
|||
@override
|
||||
String get UNDO => "DESHACER";
|
||||
@override
|
||||
String get notifyNeighbours => "Notifica a otros usuarios/as";
|
||||
@override
|
||||
String get inDevelopment => "En desarrollo";
|
||||
@override
|
||||
String get tweetAboutAFireTitle => "Twittea";
|
||||
@override
|
||||
String get supportPageDescription => "Puedes apoyar esta iniciativa, dando difusión, ayudándonos a desarrollar nuestro software, traduciendo esta aplicación a tu idioma, sugeriendo otras fuentes de datos públicas de fuegos para usar, etc.";
|
||||
|
|
@ -235,6 +243,8 @@ class es extends S {
|
|||
@override
|
||||
String get firesInTheWorld => "Fuegos en el mundo";
|
||||
@override
|
||||
String get notifyNeighboursDescription => "Alerta a otros usuarios de la zona sobre el fuego";
|
||||
@override
|
||||
String get addSomePlace => "Añade otro lugar";
|
||||
@override
|
||||
String get confirm => "Confirmar";
|
||||
|
|
@ -267,6 +277,8 @@ class es extends S {
|
|||
@override
|
||||
String somethingAgo(String something) => "hace $something";
|
||||
@override
|
||||
String tweetAboutSelf(String location, String hash) => "Fuego en $location $hash";
|
||||
@override
|
||||
String subscribeToValueAroundThisArea(String sliderValue) => "Suscríbete a $sliderValue км a la redonda";
|
||||
@override
|
||||
String inHours(String value) => "$value horas";
|
||||
|
|
|
|||
|
|
@ -53,8 +53,11 @@
|
|||
"errorFirePlaceDialog": "We couldn't get the location of the fire",
|
||||
"callEmergencyServicesTitle": "Call 112",
|
||||
"callEmergencyServicesDescription": "You should call 112 if you have not already done so to notify the emergency services.",
|
||||
"notifyNeighbours": "Notify other users",
|
||||
"notifyNeighboursDescription": "Alert other users of the area about the fire",
|
||||
"tweetAboutAFireTitle": "Tweet about",
|
||||
"tweetAboutAFireDescription": "Additionally if you use twitter you can share additional information with the emergency services, for example, attaching photos to the tweet if you have good visibility of the fire, when you took the photos, exact location, etc. Use #hashtags type #IFMinicipalTerminal for example #IFJumilla (Forest Fire in Jumilla).",
|
||||
"tweetAboutSelf": "Fire in $location $hash",
|
||||
"supportPageDescription": "You can support this initiative, spreading the word, helping us to develop our software, translating this app to your language, suggesting other public data sources of fires to use, etc.",
|
||||
"fireNotificationsTitleShort": "Notifications",
|
||||
"fireNotificationsTitle": "Fire Notifications",
|
||||
|
|
@ -81,5 +84,6 @@
|
|||
"shareAppBtn": "Share our app",
|
||||
"starAppBtn": "Rate our app",
|
||||
"unsubscribedToFires": "Unsubscribed to fires notifications",
|
||||
"subscribedToFires": "Subscribed to fires notifications"
|
||||
"subscribedToFires": "Subscribed to fires notifications",
|
||||
"inDevelopment": "In development"
|
||||
}
|
||||
|
|
@ -53,8 +53,11 @@
|
|||
"errorFirePlaceDialog": "No hemos podido obtener la ubicación del fuego",
|
||||
"callEmergencyServicesTitle": "Llama al 112",
|
||||
"callEmergencyServicesDescription": "Deberías llamar al 112 si no lo has hecho ya para avisar a los servicios de emergencia.",
|
||||
"notifyNeighbours": "Notifica a otros usuarios/as",
|
||||
"notifyNeighboursDescription": "Alerta a otros usuarios de la zona sobre el fuego",
|
||||
"tweetAboutAFireTitle": "Twittea",
|
||||
"tweetAboutAFireDescription": "Adicionalmente si usas twitter puedes compartir información adicional con los servicios de emergencia, por ejemplo, adjuntando fotos al tweet si tienes buena visibilidad del fuego, cuando tomaste las fotos, ubicación exacta, etc. Usa #hashtags tipo #IFTerminoMunicipal por ejemplo #IFJumilla (Incendio Forestal en Jumilla).",
|
||||
"tweetAboutSelf": "Fuego en $location $hash",
|
||||
"supportPageDescription": "Puedes apoyar esta iniciativa, dando difusión, ayudándonos a desarrollar nuestro software, traduciendo esta aplicación a tu idioma, sugeriendo otras fuentes de datos públicas de fuegos para usar, etc.",
|
||||
"fireNotificationsTitle": "Notificaciones de fuegos",
|
||||
"fireNotificationTitle": "Notificación de fuego",
|
||||
|
|
@ -81,5 +84,6 @@
|
|||
"shareAppBtn": "Comparte nuestra app",
|
||||
"starAppBtn": "Puntúa nuestra app",
|
||||
"unsubscribedToFires": "Desuscrito a notificaciones de fuegos",
|
||||
"subscribedToFires": "Suscrito a notificaciones de fuegos"
|
||||
"subscribedToFires": "Suscrito a notificaciones de fuegos",
|
||||
"inDevelopment": "En desarrollo"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue