No description
Find a file
2024-10-22 11:16:07 +02:00
.github Feature/melos-variant (#8) 2024-06-26 16:12:48 +02:00
packages feat: add readme 2024-10-22 11:16:07 +02:00
.gitignore Feature/melos-variant (#8) 2024-06-26 16:12:48 +02:00
CHANGELOG.md feat: add new userstory structure 2024-10-21 10:58:40 +02:00
CONTRIBUTING.md chore: initial commit 2024-05-23 13:40:28 +02:00
LICENSE Feature/melos-variant (#8) 2024-06-26 16:12:48 +02:00
melos.yaml Feature/melos-variant (#8) 2024-06-26 16:12:48 +02:00
pubspec.yaml Feature/melos-variant (#8) 2024-06-26 16:12:48 +02:00
README.md feat: add readme 2024-10-22 11:16:07 +02:00

Flutter Shopping

Flutter Shopping is a package that allows you to create a shopping experience in your Flutter app. By default, it uses a ShoppingService with a local implementation ,it provides a simple shopping experience with a list of products and a shopping cart. You can implement your own ShoppingService by overriding the shopRepository, cartRepository, categoryRepository and orderRepository properties.

Setup

To use this package, add flutter_shopping as a dependency in your pubspec.yaml file:

  flutter_chat:
    git:
      url: https://github.com/Iconica-Development/flutter_shopping
      path: packages/flutter_shopping

If you are going to use Firebase as the back-end of flutter_shopping, you should also add the following package as a dependency to your pubspec.yaml file:

  firebase_shopping_repository:
    git:
      url: https://github.com/Iconica-Development/flutter_shopping
      path: packages/firebase_shopping_repository

Create a Firebase project for your application and add firebase firestore and storage.

make sure you are authenticated using the Firebase_auth package or adjust your firebase rules, otherwise you won't be able to retreive data.

Also make sure you have the corresponding collections in your firebase project as defined in the FirebaseRepositories, you can override the default paths as you wish:

  FirebaseCategoryRepository({
    this.collectionName = 'shopping_category',
  });

 FirebaseCartRepository({
    this.collectionName = 'shopping_cart',
  });   

 FirebaseOrderRepository({
    this.collectionName = 'shopping_order',
  });

Also the structure of your data should be equal to our predefined models.

How to use

To use this package, add the following widget FlutterShoppingNavigatorUserstory to your widget tree:

class FlutterShopping extends StatelessWidget {
  const FlutterShopping({super.key});

  @override
  Widget build(BuildContext context) {
    return FlutterShoppingNavigatorUserstory(
      options: const FlutterShoppingOptions(),
      translations: const ShoppingTranslations(),
      shoppingService: ShoppingService(),
      initialShopId: "1",
    );
  }
}

All of the properties are optional.

Issues

Please file any issues, bugs or feature request as an issue on our GitHub page. Commercial support is available if you need help with integration with your app or services. You can contact us at support@iconica.nl.

Want to contribute

If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.

Author

This flutter_shopping for Flutter is developed by Iconica. You can contact us at support@iconica.nl