Skip to content

Instantly share code, notes, and snippets.

@alperefesahin
Created April 19, 2022 15:45
Show Gist options
  • Select an option

  • Save alperefesahin/1580935d1301c173dd533cf1dc98c582 to your computer and use it in GitHub Desktop.

Select an option

Save alperefesahin/1580935d1301c173dd533cf1dc98c582 to your computer and use it in GitHub Desktop.
class AppWidget extends StatelessWidget {
const AppWidget({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return BlocBuilder<LocalizationCubit, LocalizationState>(
builder: (context, state) {
return MaterialApp(
navigatorKey: navigatorKey,
locale: state.appLanguage,
localizationsDelegates: const [
PivaLocalizationsDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate
],
supportedLocales: const [Locale('en'), Locale('tr')],
debugShowCheckedModeBanner: false,
title: 'Piva',
builder: (context, widget) => ResponsiveWrapperWidget(widget: widget!),
home: const TimerPage(),
);
},
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment