Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter multiple provider

void main() {
  runApp(
    MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (context) => CartModel()),
        Provider(create: (context) => SomeOtherClass()),
      ],
      child: const MyApp(),
    ),
  );
}
Source by docs.flutter.dev #
 
PREVIOUS NEXT
Tagged: #flutter #multiple #provider
ADD COMMENT
Topic
Name
3+5 =