open:proxyprovider

ProxyProvider

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

  return runApp(
    MultiProvider(
      providers: [
        Provider<SettingStore>(
            create: (BuildContext context) => SettingStore()),
        ProxyProvider<SettingStore, TimerStore>(
          update: (context, settingStore, timerStore) => TimerStore(settingStore),
        ),
      ],
      child: EasyLocalization(
        supportedLocales: [Locale('en', 'US'), Locale('ko', 'KR')],
        path:
            'assets/translations',
        fallbackLocale: Locale('en', 'US'),
        child: MyApp(),
      ),
    ),
  );
}


  • open/proxyprovider.txt
  • 마지막으로 수정됨: 2021/03/08 04:59
  • 저자 127.0.0.1