flexi_cart 0.3.0
flexi_cart: ^0.3.0 copied to clipboard
A versatile and reactive cart solution for Flutter apps, supporting grouping, notes, delivery, quantity control, and custom logic.
0.3.0 #
- Added a private
_metadatamap to store key-value pairs. - Added a public getter
metadatawhich returns an unmodifiable view of the_metadata. - Introduced
setMetadata(String key, dynamic value)to add or update metadata entries. - Introduced
getMetadata<D>(String key)to retrieve metadata values by key. - Introduced
removeMetadata(String key)to remove metadata entries. - Ensured metadata is cleared during
reset(). - Metadata operations can optionally trigger listener notifications.
- The
reset()method now clears metadata, lock status, and logs, providing a more complete reset.
0.2.0 #
- Added
CartInputThemeas aThemeExtensionfor consistent styling. - Introduced
CartInputStyleto define visual and structural styles. CartInputnow supportsAxis.verticallayout and custom border styles.- Updated
CartInputto useAnimatedPhysicalModelfor styled layout with elevation. - Added
BuildContext.safeReadandsafeWatchextensions for safer Provider access. - Updated tests to cover new theming capabilities and widget enhancements.
- Updated dependencies in the example app.
- Minor refactor in
mixins.dartto prevent notifying listeners after disposal. - Corrected method name in README from
onCartChangedtoonChange. - introduces a new example application called
ShineShopAppthat showcases the usage of theflexi_cart - introduces a new example application called
Shiny Eatsthat showcases the usage of theflexi_cart - introduces a new example application called
Shpping Appthat showcases the usage of theflexi_cart
0.1.6 #
- Update the README to reflect current usage examples.
- Remove the deprecated
onCartChangedmethod fromICartPlugin. - Clean up internal calls to the removed method.
0.1.5 #
- Introduced new callbacks in the
ICartPlugininterface:onChange,onError, andonClose. These provide plugins with more granular notifications about the cart's lifecycle and state changes. onChange: Called whenever a change occurs in the cart.onError: Called when an error is thrown within the cart.onClose: Called just before the cart is disposed.- The deprecated
onCartChangedmethod will be removed soon. - Updated logging to include whether a listener was notified for cart actions.
- Added tests to verify plugin notifications for the new callbacks.
- Modified example to use the new plugin callbacks for printing cart logs, errors, and close events.
0.1.4 #
- Removed the
taxanddiscountfields from theCartItemclass incart_item.dart.
0.1.3 #
- Adds support for locking and unlocking the cart to prevent accidental modifications.
- Implements cart expiration with a set duration.
- Introduces internal logging for debugging cart changes.
- Implements Stream for state emission.
- Adds a plugin architecture for extending cart functionality.
- Includes a new
CartDiffclass to track differences between cart states. - Adds
setExpiration,lock,unlock,registerPluginandlogsoptions. - Enhances the README.md file with new usage examples.
- Adds unit tests for the new functionalities.
0.1.2 #
- Update Links update package metadata
0.1.1 #
- License Update: Changed the LICENSE file to the MIT License and updated the copyright to abed-supy-io.
- Pubspec Update: Updated the package description, version to 0.1.1, repository, issue tracker,
homepage and add
topicsto pubspec.yaml. - Cart Input Formatter: Modified the
formatEditUpdatemethod incart_input_formatter.dartto handle empty strings and special characters like ',' and '.' more gracefully. - Cart Test: added
decrementtest case inflexi_cart_test.dart. - Cart Input Widget: Added a condition to
_onTextChangedincart_input_widget.dartto handle zero quantity. - Cart Input Widget: remove unused
_quantityNotifier.removeListenerindispose. - Cart Mixins: remove unused
disposeinCartChangeNotifierDisposeMixin - FlexiCartTest: added
resetItemsandresettest case inflexi_cart_test.dart. - example: updated example app and add more test cases.
- FlexiCart: exported
mixins.dartinflexi_cart.dart. - FlexiCartInputTest: fix type in
CartInput. - Added
CONTRIBUTING.mdwith guidelines for contributing.
0.1.0 #
- Introduced
CartQuantityInputFormatterfor quantity fields, allowing customizable decimal precision. - Introduced
CartPriceInputFormatterfor price fields, allowing customizable decimal precision. - Added
CartInputNumberFormatteras a base class to normalize Arabic digits, limit decimal places, and constrain values. - Deprecated
QuantityInputFormatter, advising to useCartQuantityInputFormatterinstead. - Improved documentation.
- Added various example on cart input.
- Adds
description,metadata,tax, anddiscountfields in theICartItemmodel - Added
CartChangeNotifierDisposeMixinto handle the disposal ofChangeNotifier. - Add flexi-cart formatter and mixin tests.
- Add flexi-cart input test.
0.0.9 #
- Added
ChangeNotifierDisposeMixinto prevent callingnotifyListeners()after dispose. - Updated test cases to include
shouldNotifyListenersoption and assertDateTimetype.
0.0.8 #
- Removed
removeNullQuantityoption & fixed cart logic.
0.0.7 #
- Added
removeNullQuantityoption.
0.0.5 #
- Allowed
,inCartInputwidget. - Added group methods in cart.
0.0.4 #
- Added
setNote()&setDeliveredAt()functions instead of setters, withshouldNotifyListenerstoggle.
0.0.3 #
- Added
Ordableproperty.
0.0.2 #
- Updated README file.
0.0.1 #
- Initial version.