Skip to content

Instantly share code, notes, and snippets.

@rohan20
Created September 3, 2018 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohan20/5d8d1622d5a0a56d747f0f37d6bc8699 to your computer and use it in GitHub Desktop.
Save rohan20/5d8d1622d5a0a56d747f0f37d6bc8699 to your computer and use it in GitHub Desktop.
flutter-localizations
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Flutter Ecommerce App",
debugShowCheckedModeBanner: false,
home: new SplashScreen(),
routes: widget.routes,
localizationsDelegates: [
_localeOverrideDelegate,
const AppTranslationsDelegate(),
//provides localised strings
GlobalMaterialLocalizations.delegate,
//provides RTL support
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: application.supportedLocales(),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment