Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization key [key] not found after update to version 3.0.0 #349

Closed
Supercaly opened this issue Mar 2, 2021 · 25 comments
Closed

Localization key [key] not found after update to version 3.0.0 #349

Supercaly opened this issue Mar 2, 2021 · 25 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Supercaly
Copy link

Hi I'm switching my app to null safety so I've imported version 3.0.0 of this package, but when I run my app or my unit test I get this message on the log:

[🌎 Easy Localization] [WARNING] Localization key [email_label] not found
[🌎 Easy Localization] [WARNING] Localization key [password_label] not found
[🌎 Easy Localization] [WARNING] Localization key [login_btn] not found

For context I'm using the CodegenLoader asset loader and Text('email_label').tr() in Widgets

This is my main:

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();
  await intl.initializeDateFormatting("en");

  runApp(AppWidget());
}

class AppWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return EasyLocalization(
      supportedLocales: [
        Locale('en'),
        Locale('it'),
      ],
      path: "assets/translations",
      assetLoader: CodegenLoader(),
      fallbackLocale: Locale('en'),
      child: // ...
    );
  }
}
@bruntzcreative
Copy link

bruntzcreative commented Mar 4, 2021

I am also facing the same issue.

@osmaneser
Copy link

I am also facing the same issue

@SebastianKumor
Copy link

same issue here

@Overman775
Copy link
Collaborator

@Supercaly @bruntzcreative @osmaneser @SebastianKumor can you show code example for reprodyce this bug?

@Overman775 Overman775 added bug Something isn't working waiting for customer response Waiting for customer response labels Mar 5, 2021
@osmaneser
Copy link

@Overman775 Hi. Thank you. I hope explain to for you.

image

I wrote custom textWidget. i am using that. for example using this way like 78. line. then as in the picture below using string extension named locale. i called custom text widget that.
image

here my localeKeys file.
image

and language json file.
image

@Overman775
Copy link
Collaborator

@osmaneser Flutter web?

@zbejas
Copy link

zbejas commented Mar 5, 2021

@osmaneser Flutter web?

I am facing the same issue in Flutter for Android too,

@osmaneser
Copy link

@osmaneser Flutter web?

No, mobile

@Misikir
Copy link

Misikir commented Mar 5, 2021

  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(       
        primarySwatch: Colors.blue,
      ),
      localizationsDelegates: context.localizationDelegates, // <-- add this
      supportedLocales: context.supportedLocales, // <-- add this
      locale: context.locale, // <-- add this
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

@PiotrFLEURY
Copy link

Hi, same issue here on multiple apps targeting android.

@Overman775
Copy link
Collaborator

@PiotrFLEURY @osmaneser @Supercaly @bruntzcreative @SebastianKumor please sent your MaterialApp/CupertinoApp widget. And will be helpful see example project with this bug.

@Supercaly
Copy link
Author

This is my full widget that is run with runApp

class AppWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return EasyLocalization(
      supportedLocales: [
        Locale('en'),
        Locale('it'),
      ],
      path: "assets/translations",
      assetLoader: CodegenLoader(),
      fallbackLocale: Locale('en'),
      child: BlocProvider<AuthBloc>(
        create: (context) =>
            AuthBloc(repository: locator<AuthRepository>())..checkAuth(),
        child: ServiceManager(
          notificationService: locator<NotificationService>(),
          linkService: locator<LinkService>(),
          child: MaterialApp(
            title: "Tasky App",
            theme: lightTheme,
            darkTheme: darkTheme,
            navigatorKey: locator<NavigationService>().navigationKey,
            onGenerateRoute: Routes.onGenerateRoute,
            initialRoute: Routes.splash,
          ),
        ),
      ),
    );
  }
}

In my case, the problem happens with both Android and Web platforms, but only if I use the package at version 3.0.0. For example version ^2.3.3+1 (the one I'm migrating from) works correctly.

@PiotrFLEURY
Copy link

import 'package:flutter/material.dart';
import 'package:easy_localization/easy_localization.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();

  runApp(
    EasyLocalization(
      child: MyApp(),
      supportedLocales: [
        Locale('en'),
        Locale('fr'),
      ],
      path: 'assets/translations',
      fallbackLocale: Locale('en'),
      useFallbackTranslations: true,
    ),
  );
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'hello_world'.tr(),
            ),
          ],
        ),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

same here. Works great with 2.3.3+1 and 3.0.0 does not find my key

@SebastianKumor
Copy link

@Overman775 this is my version. I have not tried the previous version and I am also running on 1.26.0-17.5.pre • channel beta I can try to make example app for you where you can reproduce

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();

  runApp(EasyLocalization(
      useOnlyLangCode: true,
      supportedLocales: [Locale('en'), Locale('da')],
      path: 'web/languages',
      startLocale: Locale('en'),
      child: MyApp()));
}


class MyApp extends StatelessWidget {

  final Future<FirebaseApp> _initialization = Firebase.initializeApp();

  Future<String> lookupUserCountry() async {
    print("Country request started");
    final response =
        await http.get('https://api.ipregistry.co?key=test');

    if (response.statusCode == 200) {
      print("response: " + response.body);
      return json.decode(response.body)['location']['country']['name'];
    } else {
      throw Exception('Failed to get user country from IP address');
    }
  }

  @override
  Widget build(BuildContext context) {
    return FutureBuilder(
      // Initialize FlutterFire:
      future: _initialization,
      builder: (context, snapshot) {
        // Check for errors
        if (snapshot.hasError) {
          return MyPlaceholder();
        }
       
        if (snapshot.connectionState == ConnectionState.done) {
          //lookupUserCountry().then((text) => print(text));
          print("locale: " + context.locale.toString());
          return MaterialApp(
              localizationsDelegates: context.localizationDelegates,
              supportedLocales: context.supportedLocales,
              locale: context.locale,
              home: Scaffold(body: MainPage()), //MainPage()
              title: 'hello,
              theme: ThemeData(fontFamily: 'MetropolisRegular'));
        }

        // Otherwise, show something whilst waiting for initialization to complete
        return MaterialApp(
            home: Scaffold(body: MyPlaceholderError()),
            title: 'Aerone',
            theme: ThemeData(fontFamily: 'MetropolisRegular'));
      },
    );
  }

@Supercaly
Copy link
Author

Supercaly commented Mar 9, 2021

I've created a test app to experiment more on the problem.

This is my main.dart file

import 'package:flutter/material.dart';
import 'package:easy_localization/easy_localization.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();

  runApp(EasyLocalization(
    supportedLocales: [Locale("en")],
    path: "assets",
    fallbackLocale: Locale("en"),
    child: MyApp(),
  ));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      supportedLocales: context.supportedLocales,
      locale: context.locale,
      localizationsDelegates: context.localizationDelegates,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'title'.tr()),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('msg').tr(),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'increment'.tr(),
        child: Icon(Icons.add),
      ),
    );
  }
}

this is my pubspec.yaml

name: test_localization_bug
description: A new Flutter application.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.2

  easy_localization: ^3.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
flutter:
  uses-material-design: true

  assets:
    - assets/en.json

and this is my assets/en.json

{
  "title": "Flutter Demo Home Page",
  "msg": "You have pushed the button this many times:",
  "increment": "Increment"
}

Note the fact that I'm using SDK 2.7.0, I've tried 2.12.0-0 but the problem is the same.

When I launch the app the msg and increment keys are correctly translated, but the title key is displayed as title in the app bar, and the console prints [🌎 Easy Localization] [WARNING] Localization key [title] not found. If I do a hot-restart at first it prints the same message, but then all the keys are translated correctly as you can see in this log:

Performing hot restart...
Waiting for connection from debug service on Chrome...
Restarted application in 291ms.
[🌎 Easy Localization] [DEBUG] Localization initialized
[🌎 Easy Localization] [DEBUG] Start
[🌎 Easy Localization] [DEBUG] Init state
[🌎 Easy Localization] [DEBUG] Build
[🌎 Easy Localization] [DEBUG] Init Localization Delegate
[🌎 Easy Localization] [DEBUG] Init provider
[🌎 Easy Localization] [WARNING] Localization key [title] not found
[🌎 Easy Localization] [DEBUG] Load Localization Delegate
[🌎 Easy Localization] [DEBUG] Load asset from assets
[🌎 Easy Localization] [DEBUG] Build
[🌎 Easy Localization] [DEBUG] Init Localization Delegate
[🌎 Easy Localization] [DEBUG] Init provider
[🌎 Easy Localization] [DEBUG] Build
[🌎 Easy Localization] [DEBUG] Init Localization Delegate
[🌎 Easy Localization] [DEBUG] Init provider

I think this is a problem with the logic that loads the translations since at first, it doesn't work, but then it does.

I've tried cloning the easy_location project and run the example app, but there the problem seems not to be present.

@bruntzcreative
Copy link

I've created a test app to experiment more on the problem.

This is my main.dart file

import 'package:flutter/material.dart';
import 'package:easy_localization/easy_localization.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();

  runApp(EasyLocalization(
    supportedLocales: [Locale("en")],
    path: "assets",
    fallbackLocale: Locale("en"),
    child: MyApp(),
  ));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      supportedLocales: context.supportedLocales,
      locale: context.locale,
      localizationsDelegates: context.localizationDelegates,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'title'.tr()),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('msg').tr(),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'increment'.tr(),
        child: Icon(Icons.add),
      ),
    );
  }
}

this is my pubspec.yaml

name: test_localization_bug
description: A new Flutter application.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.2

  easy_localization: ^3.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
flutter:
  uses-material-design: true

  assets:
    - assets/en.json

and this is my assets/en.json

{
  "title": "Flutter Demo Home Page",
  "msg": "You have pushed the button this many times:",
  "increment": "Increment"
}

Note the fact that I'm using SDK 2.7.0, I've tried 2.12.0-0 but the problem is the same.

When I launch the app the msg and increment keys are correctly translated, but the title key is displayed as title in the app bar, and the console prints [🌎 Easy Localization] [WARNING] Localization key [title] not found. If I do a hot-restart at first it prints the same message, but then all the keys are translated correctly as you can see in this log:

Performing hot restart...
Waiting for connection from debug service on Chrome...
Restarted application in 291ms.
[🌎 Easy Localization] [DEBUG] Localization initialized
[🌎 Easy Localization] [DEBUG] Start
[🌎 Easy Localization] [DEBUG] Init state
[🌎 Easy Localization] [DEBUG] Build
[🌎 Easy Localization] [DEBUG] Init Localization Delegate
[🌎 Easy Localization] [DEBUG] Init provider
[🌎 Easy Localization] [WARNING] Localization key [title] not found
[🌎 Easy Localization] [DEBUG] Load Localization Delegate
[🌎 Easy Localization] [DEBUG] Load asset from assets
[🌎 Easy Localization] [DEBUG] Build
[🌎 Easy Localization] [DEBUG] Init Localization Delegate
[🌎 Easy Localization] [DEBUG] Init provider
[🌎 Easy Localization] [DEBUG] Build
[🌎 Easy Localization] [DEBUG] Init Localization Delegate
[🌎 Easy Localization] [DEBUG] Init provider

I think this is a problem with the logic that loads the translations since at first, it doesn't work, but then it does.

I've tried cloning the easy_location project and run the example app, but there the problem seems not to be present.

I experienced this with the previous version. It could be related to this issue although hot restart does not rectify the problem.

@Overman775
Copy link
Collaborator

Overman775 commented Mar 9, 2021

@bruntzcreative @Supercaly this old "bug". Problen in localization delegates in MaterialApp/CupertinoApp, localization don't have acces to delegates in same level context

[🌎 Easy Localization] [WARNING] Localization key [title] not found
[🌎 Easy Localization] [DEBUG] Load Localization Delegate <-- its must be ferst

@Overman775 Overman775 added help wanted Extra attention is needed and removed waiting for customer response Waiting for customer response labels Mar 9, 2021
@SebastianKumor
Copy link

@Overman775
Here is log from my app and the order of loading seems to be like you say it should and I still get key not found error

[🌎 Easy Localization] [DEBUG] Localization initialized
[🌎 Easy Localization] [DEBUG] Start
[🌎 Easy Localization] [DEBUG] Init state
[🌎 Easy Localization] [INFO] Start locale loaded en
[🌎 Easy Localization] [DEBUG] Build
[🌎 Easy Localization] [DEBUG] Init Localization Delegate
[🌎 Easy Localization] [DEBUG] Init provider
locale: en
[🌎 Easy Localization] [DEBUG] Load Localization Delegate
[🌎 Easy Localization] [DEBUG] Load asset from web/languages
[🌎 Easy Localization] [WARNING] Localization key [test_title] not found


@Overman775
Copy link
Collaborator

@SebastianKumor test_title in same level context MaterialApp? Web?

@SebastianKumor
Copy link

SebastianKumor commented Mar 9, 2021

@Overman775 Yes its Web, and can you explain what do you mean by level context? Is it related to the folder structure of the project ? I am new to flutter

@Overman775
Copy link
Collaborator

@SebastianKumor refactoring(split) Scaffold to extrenal widget, like Home() widget etc. same issue #355

@PiotrFLEURY
Copy link

Thanks @Overman775 . Put the home widget in a different file seems to fix the problem.

Plus, I didn't noticed the mandatory parameters for MaterialApp (works without those parameters before the 3.0.0) :

localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales,
locale: context.locale,

It could be great tu put it in bold or something for the ones who migrates.

The code below works :

// main.dart
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();

  runApp(
    EasyLocalization(
      child: MyApp(),
      supportedLocales: [
        Locale('en'),
        Locale('fr'),
      ],
      path: 'assets/translations',
      fallbackLocale: Locale('en'),
      useFallbackTranslations: true,
    ),
  );
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      localizationsDelegates: context.localizationDelegates,
      supportedLocales: context.supportedLocales,
      locale: context.locale,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Home('Flutter Demo Home Page'),
    );
  }
}
// home.dart
class Home extends StatelessWidget {
  final String title;

  Home(this.title);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            SvgPicture.asset('assets/images/iceberg.svg'),
            Text(
              'hello_world'.tr(),
            ),
          ],
        ),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Not a big deal to make a new file

Hope this will help

@Supercaly
Copy link
Author

Ok, some update on my problem.
Yesterday I was tinkering around with my app and I noticed that I was missing three lines in MaterialApp that I've added in the example app I posted before; those lines are:

MaterialApp(
   supportedLocales: context.supportedLocales,
   locale: context.locale,
   localizationsDelegates: context.localizationDelegates,
   //...
),

Adding this, with the Builder trik of #337, seems to fix the problem in my unit tests, but when I run my app I start getting some strange error:

The following JSNoSuchMethodError was thrown building MediaQuery(MediaQueryData(size: Size(575.0, 619.0), devicePixelRatio: 1.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false, navigationMode: traditional)):
TypeError: Cannot read property 'then' of undefined

The relevant error-causing widget was: 
  MaterialApp file:///C:/Users/Lorenzo/Desktop/taskyapp/lib/presentation/app_widget.dart:35:24
When the exception was thrown, this was the stack: 
packages/flutter/src/widgets/localizations.dart 57:51                                                                 _loadAll
packages/flutter/src/widgets/localizations.dart 533:8                                                                 load
packages/flutter/src/widgets/localizations.dart 497:5                                                                 initState
packages/flutter/src/widgets/framework.dart 4632:57                                                                   [_firstBuild]
packages/flutter/src/widgets/framework.dart 4469:5                                                                    mount
...
====================================================================================================
======== Exception caught by widgets library =======================================================
The following UnsupportedError was thrown building MediaQuery(MediaQueryData(size: Size(575.0, 619.0), devicePixelRatio: 1.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false, navigationMode: traditional)):
Unsupported operation: Cannot modify unmodifiable map

The relevant error-causing widget was: 
  MaterialApp file:///C:/Users/Lorenzo/Desktop/taskyapp/lib/presentation/app_widget.dart:35:24
When the exception was thrown, this was the stack: 
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49      throw_
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/linked_hash_map.dart 265:5          _set
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 324:14  _checkAndCall
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 388:10  callMethod
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 392:5   dsend
...
====================================================================================================

If I remove the three lines from MaterialApp those errors disappears, but then the missing key error comes back

@Supercaly
Copy link
Author

Ok, I think I found the cause of the problem! Here a recap for all the people that were having the same issue:

  1. in my MaterialApp i was missing those lines
supportedLocales: context.supportedLocales,
locale: context.locale,
localizationsDelegates: context.localizationDelegates,
  1. in my void main() i was running await intl.initializeDateFormatting("en"); because of a problem with localized dates in easy_localization 2.3.3+1 (I don't know why but adding this line fixed it at the time)

It turned out that point 2 was causing the strange errors of my previous comment, removing it fixed everything.

So for the moment, I close this issue, reopen it if the two points above don't help you.

@rignaneseleo
Copy link

I fixed the problem in my main.dart file going from this:

runApp(
   ProviderScope(
     child: EasyLocalization(
       supportedLocales: [Locale('en'), Locale('it', 'IT')],
       path: 'assets/lang',
       fallbackLocale: Locale('en', 'US'),

       child: GetMaterialApp(
         title: 'OpenTabu',
         home: new HomePage(),
         theme: mainTheme,
         routes: {
           "/home": (_) => new HomePage(),
         },
       ),
     ),
   ),
 );

To this:

runApp(
    ProviderScope(
      child: EasyLocalization(
          supportedLocales: [Locale('en'), Locale('it', 'IT')],
          path: 'assets/lang',
          fallbackLocale: Locale('en', 'US'),
          child: OpenTabuApp()),
    ),
  );

plus a stateless widget:

class OpenTabuApp extends StatelessWidget {
  const OpenTabuApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'OpenTabu',
      home: new HomePage(),
      theme: mainTheme,
      routes: {
        "/home": (_) => new HomePage(),
      },
      //Easy_localization:
      localizationsDelegates: context.localizationDelegates,
      supportedLocales: context.supportedLocales,
      locale: context.locale,
    );
  }
}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

10 participants