Fix change email
This commit is contained in:
parent
161a990c17
commit
ea9b0d01ba
4 changed files with 22 additions and 11 deletions
|
@ -16,7 +16,7 @@ import 'package:ente_auth/ui/home_page.dart';
|
|||
import 'package:ente_auth/ui/settings/app_update_dialog.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter_localizations/flutter_localizations.dart";
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key key});
|
||||
|
@ -79,9 +79,14 @@ class _AppState extends State<App> {
|
|||
theme: lightTheme,
|
||||
darkTheme: dartTheme,
|
||||
debugShowCheckedModeBanner: false,
|
||||
supportedLocales: supportedLocales,
|
||||
supportedLocales: appSupportedLocales,
|
||||
localeListResolutionCallback: localResolutionCallBack,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
localizationsDelegates: const [
|
||||
AppLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
],
|
||||
routes: _getRoutes,
|
||||
),
|
||||
);
|
||||
|
@ -92,7 +97,7 @@ class _AppState extends State<App> {
|
|||
theme: lightThemeData,
|
||||
darkTheme: darkThemeData,
|
||||
debugShowCheckedModeBanner: false,
|
||||
supportedLocales: supportedLocales,
|
||||
supportedLocales: appSupportedLocales,
|
||||
localeListResolutionCallback: localResolutionCallBack,
|
||||
localizationsDelegates: const [
|
||||
AppLocalizations.delegate,
|
||||
|
|
|
@ -3,13 +3,13 @@ import 'dart:ui';
|
|||
// list of locales which are enabled for auth app.
|
||||
// Add more language to the list only when at least 90% of the strings are
|
||||
// translated in the corresponding language.
|
||||
const List<Locale> supportedLocales = <Locale>[
|
||||
const List<Locale> appSupportedLocales = <Locale>[
|
||||
Locale('en'),
|
||||
];
|
||||
|
||||
Locale localResolutionCallBack(locales, supportedLocales) {
|
||||
for (Locale locale in locales) {
|
||||
if (supportedLocales.contains(locale)) {
|
||||
if (appSupportedLocales.contains(locale)) {
|
||||
return locale;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// @dart=2.9
|
||||
|
||||
import 'package:ente_auth/l10n/l10n.dart';
|
||||
import 'package:ente_auth/services/user_service.dart';
|
||||
import 'package:ente_auth/utils/dialog_util.dart';
|
||||
|
@ -7,14 +5,14 @@ import 'package:ente_auth/utils/email_util.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class ChangeEmailDialog extends StatefulWidget {
|
||||
const ChangeEmailDialog({Key key}) : super(key: key);
|
||||
const ChangeEmailDialog({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ChangeEmailDialog> createState() => _ChangeEmailDialogState();
|
||||
}
|
||||
|
||||
class _ChangeEmailDialogState extends State<ChangeEmailDialog> {
|
||||
String _email;
|
||||
String _email = "";
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:ente_auth/l10n/l10n.dart';
|
||||
import 'package:ente_auth/locale.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
|
||||
/// A widget which handles app lifecycle events for showing and hiding a lock screen.
|
||||
/// This should wrap around a `MyApp` widget (or equivalent).
|
||||
|
@ -108,8 +110,14 @@ class _AppLockState extends State<AppLock> with WidgetsBindingObserver {
|
|||
themeMode: ThemeMode.system,
|
||||
theme: widget.lightTheme,
|
||||
darkTheme: widget.darkTheme,
|
||||
supportedLocales: supportedLocales,
|
||||
supportedLocales: appSupportedLocales,
|
||||
localeListResolutionCallback: localResolutionCallBack,
|
||||
localizationsDelegates: const [
|
||||
AppLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
],
|
||||
onGenerateRoute: (settings) {
|
||||
switch (settings.name) {
|
||||
case '/lock-screen':
|
||||
|
|
Loading…
Add table
Reference in a new issue