Skip to content

Instantly share code, notes, and snippets.

@berkanaslan
Created May 28, 2021 07:02
Show Gist options
  • Save berkanaslan/17e61ad505e6d18a531cce58e04d6e95 to your computer and use it in GitHub Desktop.
Save berkanaslan/17e61ad505e6d18a531cce58e04d6e95 to your computer and use it in GitHub Desktop.
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MultiProvider(
providers: [
ChangeNotifierProvider(create: (_) => NavigationProvider()),
],
child: Builder(
builder: (context) {
return MaterialApp(
onGenerateRoute: NavigationProvider.of(context).onGenerateRoute,
);
},
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment