mirror of
https://github.com/flutter/samples.git
synced 2026-05-13 10:27:09 +00:00
Maintenance for provider_shopper (#168)
This commit is contained in:
@@ -27,8 +27,10 @@ class MyApp extends StatelessWidget {
|
||||
// of ChangeNotifierProvider. Moreover, CartModel depends
|
||||
// on CatalogModel, so a ProxyProvider is needed.
|
||||
ChangeNotifierProxyProvider<CatalogModel, CartModel>(
|
||||
builder: (context, catalog, previousCart) =>
|
||||
CartModel(catalog, previousCart)),
|
||||
initialBuilder: (context) => CartModel.empty(),
|
||||
builder: (context, catalog, previousCart) =>
|
||||
CartModel(catalog, previousCart),
|
||||
),
|
||||
],
|
||||
child: MaterialApp(
|
||||
title: 'Provider Demo',
|
||||
|
||||
Reference in New Issue
Block a user