Support page improved

This commit is contained in:
Vicente J. Ruiz Jurado 2018-08-14 10:09:37 +02:00
parent aa496b0ed2
commit 3253c429ab
5 changed files with 54 additions and 6 deletions

View file

@ -47,6 +47,7 @@ class S implements WidgetsLocalizations {
String get callEmergencyServicesTitle => "Call 112"; String get callEmergencyServicesTitle => "Call 112";
String get chooseAPlace => "Choose a place"; String get chooseAPlace => "Choose a place";
String get chooseAWatchRadio => "Choose a watch radio"; String get chooseAWatchRadio => "Choose a watch radio";
String get comunesSupportBtn => "Know and support our work";
String get confirm => "Confirm"; String get confirm => "Confirm";
String get deleteAllFireNotificationsAlertDescription => "This will remove all your fire notifications"; String get deleteAllFireNotificationsAlertDescription => "This will remove all your fire notifications";
String get errorFirePlaceDialog => "We couldn't get the location of the fire"; String get errorFirePlaceDialog => "We couldn't get the location of the fire";
@ -72,6 +73,8 @@ class S implements WidgetsLocalizations {
String get notPermsUbication => "We don't have permission to get your location"; String get notPermsUbication => "We don't have permission to get your location";
String get notifyAFire => "Notify a fire"; String get notifyAFire => "Notify a fire";
String get privacyPolicy => "Privacy Policy"; String get privacyPolicy => "Privacy Policy";
String get shareAppBtn => "Share our app";
String get starAppBtn => "Rate our app";
String get 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."; String get 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.";
String get supportThisInitiative => "Support this initiative"; String get supportThisInitiative => "Support this initiative";
String get thanksForParticipating => "Thanks for participating"; String get thanksForParticipating => "Thanks for participating";
@ -156,6 +159,8 @@ class es extends S {
@override @override
String get itSeemsAControlledBurning => "Es una quema controlada"; String get itSeemsAControlledBurning => "Es una quema controlada";
@override @override
String get comunesSupportBtn => "Conoce y apoya nuestro trabajo";
@override
String get itSeemsAIndustry => "Es una industria"; String get itSeemsAIndustry => "Es una industria";
@override @override
String get youDeletedThisPlace => "Has borrado este lugar"; String get youDeletedThisPlace => "Has borrado este lugar";
@ -192,6 +197,8 @@ class es extends S {
@override @override
String get thanksForParticipating => "Gracias por Participar"; String get thanksForParticipating => "Gracias por Participar";
@override @override
String get starAppBtn => "Puntúa nuestra app";
@override
String get fireNotificationsTitleShort => "Notificaciones"; String get fireNotificationsTitleShort => "Notificaciones";
@override @override
String get DELETE => "BORRAR"; String get DELETE => "BORRAR";
@ -202,6 +209,8 @@ class es extends S {
@override @override
String get SHOW => "MOSTRAR"; String get SHOW => "MOSTRAR";
@override @override
String get shareAppBtn => "Comparte nuestra app";
@override
String get itSeemsAFalseAlarm => "Parece una falsa alarma"; String get itSeemsAFalseAlarm => "Parece una falsa alarma";
@override @override
String get addedThisLocation => "Ya has añadido este lugar antes"; String get addedThisLocation => "Ya has añadido este lugar antes";

View file

@ -1,5 +1,6 @@
import 'package:comunes_flutter/comunes_flutter.dart'; import 'package:comunes_flutter/comunes_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:launch_review/launch_review.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'generated/i18n.dart'; import 'generated/i18n.dart';
@ -18,9 +19,9 @@ class _SupportPageState extends State<SupportPage> {
Widget buildSupportButton() { Widget buildSupportButton() {
return new Align( return new Align(
alignment: const Alignment(0.0, -0.2), alignment: const Alignment(0.0, -0.2),
child: new FloatingActionButton( child: new OutlineButton.icon(
heroTag: 'callAction', icon: const Icon(Icons.favorite_border),
child: const Icon(Icons.favorite), label: new Text(S.of(context).comunesSupportBtn),
onPressed: () { onPressed: () {
launch("https://comunes.org/"); launch("https://comunes.org/");
}, },
@ -28,6 +29,33 @@ class _SupportPageState extends State<SupportPage> {
); );
} }
Widget buildShareButton() {
return new Align(
alignment: const Alignment(0.0, -0.2),
child: new OutlineButton.icon(
icon: const Icon(Icons.share),
label: new Text(S.of(context).shareAppBtn),
onPressed: () {
launch(
"https://play.google.com/store/apps/details?id=org.comunes.fires");
},
),
);
}
Widget buildStarButton() {
return new Align(
alignment: const Alignment(0.0, -0.2),
child: new OutlineButton.icon(
icon: const Icon(Icons.star_border),
label: new Text(S.of(context).starAppBtn),
onPressed: () {
LaunchReview.launch();
},
),
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -45,7 +73,11 @@ class _SupportPageState extends State<SupportPage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
new SizedBox(height: 20.0), new SizedBox(height: 20.0),
buildSupportButton() buildSupportButton(),
new SizedBox(height: 20.0),
buildStarButton(),
new SizedBox(height: 20.0),
buildShareButton()
])) ]))
]), ]),
)); ));

View file

@ -19,6 +19,7 @@ dependencies:
flutter_markdown: "^0.1.5" flutter_markdown: "^0.1.5"
url_launcher: "^3.0.2" url_launcher: "^3.0.2"
package_info: "^0.3.2" package_info: "^0.3.2"
launch_review: "^1.0.1"
# net # net
http: "^0.11.3+16" http: "^0.11.3+16"

View file

@ -76,5 +76,8 @@
"thanksForParticipating": "Thanks for participating", "thanksForParticipating": "Thanks for participating",
"inGreenMonitoredAreas": "In green, the areas monitored by our users currently", "inGreenMonitoredAreas": "In green, the areas monitored by our users currently",
"monitoredAreasTitle": "Monitored areas", "monitoredAreasTitle": "Monitored areas",
"mapPrivacy": "In order to preserve the privacy of our users, the reflected data are randomly altered and are only indicative." "mapPrivacy": "In order to preserve the privacy of our users, the reflected data are randomly altered and are only indicative.",
"comunesSupportBtn": "Know and support our work",
"shareAppBtn": "Share our app",
"starAppBtn": "Rate our app"
} }

View file

@ -76,5 +76,8 @@
"thanksForParticipating": "Gracias por Participar", "thanksForParticipating": "Gracias por Participar",
"inGreenMonitoredAreas": "En verde, las zonas vigiladas por nuestros usuari@s actualmente", "inGreenMonitoredAreas": "En verde, las zonas vigiladas por nuestros usuari@s actualmente",
"monitoredAreasTitle": "Zonas vigiladas", "monitoredAreasTitle": "Zonas vigiladas",
"mapPrivacy": "Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos." "mapPrivacy": "Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.",
"comunesSupportBtn": "Conoce y apoya nuestro trabajo",
"shareAppBtn": "Comparte nuestra app",
"starAppBtn": "Puntúa nuestra app"
} }