- Fixed analysis issue
chore(deps): upgrade to flutter_helper_utils ^6.0.3
chore(deps): upgrade to flutter_helper_utils ^5.0.0
chore(deps): upgrade to flutter_helper_utils ^4.0.0
- updated the package description to be more concise.
- CHORE: Updated flutter_helper_utils to latest.
- Updated the readme.
- refactored some internal code,
- updated the README.
- Updated some docs.
- Enhanced all the
Watcher
andCachedWatcher
classes.- To improve usability, we recommend using custom classes for built-in types, such
as
ListWatcher<E>
,MapWatcher<K, V>
,DateTimeWatcher
, etc. These specialized classes are designed to behave just like their native counterparts. For instance, you can useListWatcher<E>
with afor
loop just as you would with any standardList
. However, When using the.watcher
extension, there's no need to update your code; it automatically creates the appropriate type based on your context.
- To improve usability, we recommend using custom classes for built-in types, such
as
-
Stream to Watcher: Introduced
toWatcher
extension for streams, enabling conversion of any stream into aWatcher
. -
Cached Data Access: Added
cache
getter inCachedWatcher
for direct cached data access outside theread
function. -
isDisposed in Watcher: Added
isDisposed
in the Watcher. it is useful when you want to safely do some operations on theWatcher
without getting exception if it gets disposed. -
Watch Widget: New
Watch
widget added for reacting to changes in anyListenable
, not limited toWatcher
. -
WatchAll Widget: Introduced
WatchAll
widget, similar toWatch
but for a list ofListenable
instances, monitoring changes in each.
-
Widget Renaming: Renamed
WatchValue
Widget toWatchValue
. -
The
prevValue
is removed from the Watcher class and now available only through the watchWhen in the all watcher widgets. -
Extension Modification: Modified
.watch
extension; it no longer provides the value in the builder function. Use.watchValue
instead. -
CachedWatcher Update:
CachedWatcher
is now abstract, requiring subclasses to implementread
andwrite
methods for enhanced custom data handling.Changes:
- Before:
final typeCachedWatcher = Type().cachedWatcher(read: .., write: ..);
- Now:
final typeCachedWatcher = TypeCachedWatcher(); // TypeCachedWatcher extends CachedWatcher
- Primitive types usage remains the same:
final counter = 0.cachedWatcher('counter_key');
- Before:
-
This version returns the
ListValueNotifierEx
Accidentally removed from the previous version. -
Added new
NullableIterableValueNotifierEx
for NullableIterable
values inside theWatcher
.
- All extensions for the
Watcher<T>
class in Flutter have been enhanced. Included all missing actions for eachWatcher<T>
extension. Updated documentation for each action to provide clearer guidance and use-case examples.- These extensions allow for direct manipulation of the data types within
Watcher<T>
, mirroring operations typically performed on the underlying data types themselves.
- These extensions allow for direct manipulation of the data types within
final boolWatcher = true.watcher;
boolWatcher.toggle
();
final counter = 10.watcher;
counter.increment
(2);
final urlWatcher = Uri.parse("https://example.com").watcher;
urlWatcher.updatePath("/newpage"); // without the extension u would use `urlWatcher.value.updatePath("/newpage");`
final listWatcher = [1,2,3].watch;
listWatcher.clear();
- UPDATE: update flutter_helper_utils
version boundaries to be
'>=3.0.0'
- UPDATE: Updated the docs.
- INITIAL: Initial release.