feature/internationale #46
@@ -85,5 +85,10 @@
|
||||
"describe_event": "Describe event",
|
||||
"add": "Add",
|
||||
"update_profile": "Update profile",
|
||||
"different_password_error": "Different password"
|
||||
"different_password_error": "Different password",
|
||||
"update": "Update",
|
||||
"updated": "Updated",
|
||||
"settings_updated": "Settings updated",
|
||||
"define_kilometer": "Define Kilometer",
|
||||
"settings": "Settings"
|
||||
}
|
@@ -85,7 +85,11 @@
|
||||
"describe_event": "Décrire l'évènement",
|
||||
"add": "Ajouter",
|
||||
"update_profile": "Modifier le profil",
|
||||
"different_password_error": "Mot de passe différent"
|
||||
|
||||
"different_password_error": "Mot de passe différent",
|
||||
"update": "Mettre à jour",
|
||||
"updated": "Mis à jour",
|
||||
"settings_updated": "Paramètre mis à jour",
|
||||
"define_kilometer": "Definir un kilomètre",
|
||||
"settings": "Paramètres"
|
||||
|
||||
}
|
@@ -14,6 +14,11 @@ import '../classes/ad_helper.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../locale_provider.dart'; // Créé
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await MobileAds.instance.initialize();
|
||||
@@ -56,7 +61,10 @@ class _EditProfileState extends State<EditSettings>
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
if (kilometer != null) {
|
||||
prefs.setDouble("kilometer", kilometer?.toDouble() ?? 50);
|
||||
showAlertDialog(context, "Update", "Mise à jour des paramètres");
|
||||
showAlertDialog(
|
||||
context,
|
||||
AppLocalizations.of(context)?.updated ?? "Updated",
|
||||
AppLocalizations.of(context)?.settings_updated ?? "Settings updated");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +86,7 @@ class _EditProfileState extends State<EditSettings>
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
title: Text("Settings"),
|
||||
title: Text(AppLocalizations.of(context)?.settings ?? "Settings"),
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
@@ -103,7 +111,9 @@ class _EditProfileState extends State<EditSettings>
|
||||
child: DropdownButtonFormField<int>(
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Define kilometer',
|
||||
labelText:
|
||||
AppLocalizations.of(context)?.define_kilometer ??
|
||||
'Define kilometer',
|
||||
),
|
||||
value:
|
||||
kilometer, // Set the initial selected value here, or leave as `null` if unselected.
|
||||
@@ -147,7 +157,7 @@ class _EditProfileState extends State<EditSettings>
|
||||
child: TextButton(
|
||||
onPressed: () {},
|
||||
child: Text(
|
||||
'Mettre à jour',
|
||||
AppLocalizations.of(context)?.update ?? "Update",
|
||||
style: TextStyle(color: Colors.white, fontSize: 25),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user