mirror of
https://github.com/Iconica-Development/flutter_shopping.git
synced 2025-05-18 16:33:45 +02:00
chore: latest versions (#2)
This commit is contained in:
parent
33184a3b01
commit
756fa00be6
4 changed files with 10 additions and 8 deletions
|
@ -88,7 +88,7 @@ FlutterShoppingConfiguration(
|
|||
// (RECOMMENDED) Function that is fired when the shop selection
|
||||
// changes. You could use this to clear your shopping cart or to
|
||||
// change the products so they belong to the correct shop again.
|
||||
onShopSelectionChange: (shopId) => productService.clear(),
|
||||
onShopSelectionChange: (ProductPageShop shop) => productService.clear(),
|
||||
|
||||
// (RECOMMENDED) The shop that is initially selected.
|
||||
// Must be one of the shops in the [shops] list.
|
||||
|
|
|
@ -19,15 +19,16 @@ FlutterShoppingConfiguration getFlutterShoppingConfiguration() =>
|
|||
configuration: ProductPageConfiguration(
|
||||
// (REQUIRED): List of shops that should be displayed
|
||||
// If there is only one, make a list with just one shop.
|
||||
shops: getShops(),
|
||||
shops: Future.value(getShops()),
|
||||
|
||||
// (REQUIRED): Function to add a product to the cart
|
||||
onAddToCart: (ProductPageProduct product) =>
|
||||
productService.addProduct(product as MyProduct),
|
||||
|
||||
// (REQUIRED): Function to get the products for a shop
|
||||
getProducts: (String shopId) => Future<ProductPageContent>.value(
|
||||
getShopContent(shopId),
|
||||
getProducts: (ProductPageShop shop) =>
|
||||
Future<ProductPageContent>.value(
|
||||
getShopContent(shop.id),
|
||||
),
|
||||
|
||||
// (REQUIRED): Function to navigate to the shopping cart
|
||||
|
@ -46,11 +47,12 @@ FlutterShoppingConfiguration getFlutterShoppingConfiguration() =>
|
|||
// (RECOMMENDED) Function that is fired when the shop selection
|
||||
// changes. You could use this to clear your shopping cart or to
|
||||
// change the products so they belong to the correct shop again.
|
||||
onShopSelectionChange: (shopId) => productService.clear(),
|
||||
onShopSelectionChange: (ProductPageShop shop) =>
|
||||
productService.clear(),
|
||||
|
||||
// (RECOMMENDED) The shop that is initially selected.
|
||||
// Must be one of the shops in the [shops] list.
|
||||
initialShop: getShops().first,
|
||||
initialShopId: getShops().first.id,
|
||||
|
||||
// (RECOMMENDED) Localizations for the product page.
|
||||
localizations: const ProductPageLocalization(),
|
||||
|
|
|
@ -23,7 +23,7 @@ dependencies:
|
|||
flutter_product_page:
|
||||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_product_page
|
||||
ref: 1.1.0
|
||||
ref: 1.3.0
|
||||
flutter_shopping_cart:
|
||||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_shopping_cart
|
||||
|
|
|
@ -13,7 +13,7 @@ dependencies:
|
|||
flutter_product_page:
|
||||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_product_page
|
||||
ref: 1.1.0
|
||||
ref: 1.3.0
|
||||
flutter_shopping_cart:
|
||||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_shopping_cart
|
||||
|
|
Loading…
Reference in a new issue