MultiProvider(
providers: [
ChangeNotifierProvider(
create: (context) => Loader(),
),
ChangeNotifierProvider(create: (context) => SplashBlock()),
ChangeNotifierProvider(create: (context) => TermsBlock()),
ChangeNotifierProvider(create: (context) => InitialBlock()),
ChangeNotifierProvider(create: (context) => HomeBlock()),
ChangeNotifierProvider(create: (context) => AboutusBlock()),
ChangeNotifierProvider(create: (context) => EntryBlock()),
ChangeNotifierProvider(create: (context) => AllEventBlock())
],
child: MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter',
theme: ThemeData(
fontFamily: 'OpenSans',
primaryColor: Colors.white,
primarySwatch: Colors.blue,
),
home:
Scaffold(
body:SplashScreen()
),
onGenerateRoute: Router.generateRoute,
));
Try with multiple provider . You can use data anywhere in-app.