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 chooseAPlace => "Choose a place";
String get chooseAWatchRadio => "Choose a watch radio";
String get comunesSupportBtn => "Know and support our work";
String get confirm => "Confirm";
String get deleteAllFireNotificationsAlertDescription => "This will remove all your fire notifications";
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 notifyAFire => "Notify a fire";
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 supportThisInitiative => "Support this initiative";
String get thanksForParticipating => "Thanks for participating";
@ -156,6 +159,8 @@ class es extends S {
@override
String get itSeemsAControlledBurning => "Es una quema controlada";
@override
String get comunesSupportBtn => "Conoce y apoya nuestro trabajo";
@override
String get itSeemsAIndustry => "Es una industria";
@override
String get youDeletedThisPlace => "Has borrado este lugar";
@ -192,6 +197,8 @@ class es extends S {
@override
String get thanksForParticipating => "Gracias por Participar";
@override
String get starAppBtn => "Puntúa nuestra app";
@override
String get fireNotificationsTitleShort => "Notificaciones";
@override
String get DELETE => "BORRAR";
@ -202,6 +209,8 @@ class es extends S {
@override
String get SHOW => "MOSTRAR";
@override
String get shareAppBtn => "Comparte nuestra app";
@override
String get itSeemsAFalseAlarm => "Parece una falsa alarma";
@override
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:flutter/material.dart';
import 'package:launch_review/launch_review.dart';
import 'package:url_launcher/url_launcher.dart';
import 'generated/i18n.dart';
@ -18,9 +19,9 @@ class _SupportPageState extends State<SupportPage> {
Widget buildSupportButton() {
return new Align(
alignment: const Alignment(0.0, -0.2),
child: new FloatingActionButton(
heroTag: 'callAction',
child: const Icon(Icons.favorite),
child: new OutlineButton.icon(
icon: const Icon(Icons.favorite_border),
label: new Text(S.of(context).comunesSupportBtn),
onPressed: () {
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
Widget build(BuildContext context) {
return Scaffold(
@ -45,7 +73,11 @@ class _SupportPageState extends State<SupportPage> {
textAlign: TextAlign.center,
),
new SizedBox(height: 20.0),
buildSupportButton()
buildSupportButton(),
new SizedBox(height: 20.0),
buildStarButton(),
new SizedBox(height: 20.0),
buildShareButton()
]))
]),
));