If you want to provide more than one class, you can use MultiProvider:

MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (context) => CartModel()),
        Provider(create: (context) => SomeOtherClass()),
      ],
      child: const MyApp(),
    ),
  );
}

Consumer

Now that CartModel is provided to widgets in our app through the
ChangeNotifierProvider declaration at the top, we can start using it.

This is done through the Consumer widget.

Consumer<CartModel>(
  builder: (context, cart, child) {
    return Text('Total price: ${cart.totalPrice}');
  },
);