Skip to content

Instantly share code, notes, and snippets.

@chamithchathuka
Last active October 30, 2020 08:22
Show Gist options
  • Select an option

  • Save chamithchathuka/3fcbe58f7a3a4890b383ef96fe46d317 to your computer and use it in GitHub Desktop.

Select an option

Save chamithchathuka/3fcbe58f7a3a4890b383ef96fe46d317 to your computer and use it in GitHub Desktop.
void main() async {
WidgetsFlutterBinding.ensureInitialized(); // add this
await setupRemoteConfig(); // add call to the remote config initalize method method
runApp(GetMaterialApp(
initialRoute: '/page1',
title: '',
theme: ThemeData.light().copyWith(primaryColor: Colors.green),
darkTheme: ThemeData.dark().copyWith(
primaryColor: Colors.purple,
),
themeMode: ThemeMode.light,
getPages: [
//Simple GetPage
GetPage(name: '/page1', page: () => Page1()),
GetPage(name: '/page2', page: () => Page2()),
// GetPage with custom transitions and bindings
],
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment