Skip to main content

flutterx_utils 2.0.0 copy "flutterx_utils: ^2.0.0" to clipboard
flutterx_utils: ^2.0.0 copied to clipboard

Flutter toolkit of typed extensions, JSON helpers, mutex and cancellation, tagged logging and layout widgets shared by the flutterx packages.

2.0.0 #

Major release on Dart 3.11 / Flutter 3.41: bug fixes across the toolkit, the web helpers removed in favour of package:web, a new folder layout. Every other public name is unchanged.

  • Breaking: requires Dart ^3.11.0 and Flutter >=3.41.0.
  • Breaking: web helpers removed: window, Window, WindowExt, Location, LocationExt, openUri, hrefUri. Use package:web (web.window.location.href, web.window.open(...)).
  • Breaking: removed unused symbols: ScrollPositionExt, RenderSizeObserver, RenderSafeDryLayout (now private), titleCase, FromJsonList, Printable, FrameCallback.
  • Breaking: ConcurrentExecutionError is a plain Exception (it implemented Future). A MutexRun call that does not run and has no fallback completes with Future.error(ConcurrentExecutionError()), so catchError/on ConcurrentExecutionError now work.
  • Breaking: MutexRun validates fallback in every mode: a value that is not a FutureOr<T> (including null for a non-nullable T) throws ArgumentError immediately (it was a debug-only assert).
  • Breaking: Map accessors follow one rule — require* throws, opt* returns null, get* returns the fallback — also for invalid strings in getBool/getInt/getDouble, enum indexes out of range and unknown enum names (they threw). require* errors are ArgumentError/FormatException naming the key. *EnumList honour index.
  • Breaking: fromJsonInt rejects numbers with a fractional part with FormatException (it truncated); 3.0 is still 3.
  • Breaking: hashMap hashes by content and by key-value pair, recursively: hash values differ from 1.x.
  • Breaking: SizeObserver and the size callbacks of ScrollableView run after the frame and only when the size changes; calling setState inside them is now safe.
  • Mutex.lock always releases the lock, also on a synchronous error, and returns a failed future instead of throwing.
  • MutexRun.last answers every call arriving during an execution with the fallback; MutexRun.every uses clock.
  • CancellationToken: cancelling twice or after completion is a no-op, no unhandled asynchronous errors.
  • Loggable: setLevelFor<T>() works for both the widget and its State type.
  • TypedFactoryMap caches by key and type; new optional release callback invoked by remove, clear and replacements.
  • WidgetDataSync throws a descriptive ArgumentError for a non-nullable T without fallback.
  • Fixed lowerCamelCase with leading separators and snakeCase after a digit.
  • ScrollableView disposes its TransformationController, PanAxis.aligned picks the dominant axis, and changes to matchContainerX/Y apply immediately.
  • Integration skills for Claude Code in .claude-plugin/ and skills/.

Migration from 1.x #

  1. Raise the app to Dart 3.11 / Flutter 3.41 and depend on flutterx_utils: ^2.0.0.
  2. Replace window/Location/openUri/hrefUri with package:web.
  3. Code that catches the StateError of a discarded MutexRun call: catch ConcurrentExecutionError.
  4. Code that relied on getEnum/optEnum/getBool/... throwing on bad data: use the require* variant.
  5. Code that relied on fromJsonInt truncating: round the value before converting.
  6. Persisted hashMap values (if any) must be recomputed.
  7. Size callbacks that read layout state synchronously now receive it after the frame.

1.7.0 #

  • Refactoring, removed some unused utils

1.6.8 #

  • Fix types

1.6.5 #

  • Add hashMap

1.6.4 #

  • Fix string ext

1.6.3 #

  • Add WidgetDataSync

1.6.2 #

  • Restore SafeDryLayout

1.6.1 #

  • Improve ScrollableView

1.5.8 #

  • Update flutter

1.5.7 #

  • Add list extension

1.5.6 #

  • Include RootMediaQuery in library

1.5.5 #

  • Improve code style

1.5.4 #

  • Improve mutex

1.5.1 #

  • Fix fromJson check

1.5.0 #

  • Fix int parsing

1.4.7 #

  • Improve json utilities

1.4.5 #

  • Add map function

1.4.4 #

  • Improve SafeDryLayout

1.4.3 #

  • Improve SizeObserver

1.4.2 #

  • Add UI utils

1.4.1 #

  • Add Future extension

1.4.0 #

  • Improve mutex

1.3.9 #

  • Add web utils

1.3.8 #

  • Add NeverFuture

1.3.7 #

  • Improvements

1.3.6 #

  • Fix optInt

1.3.5 #

  • Add get enum from mapping

1.3.4 #

  • Fix parseBool

1.3.3 #

  • Improve Json utilities

1.3.2 #

  • Improve Result

1.3.1 #

  • Improve runtimeType references

1.3.0 #

  • Improve Mutex

1.2.9 #

  • Improve CancellationToken

1.2.8 #

  • Improve CancellationToken

1.2.7 #

  • Add Set utility function

1.2.5 #

  • Add Map extension functions

1.2.4 #

  • Add utility functions

1.2.3 #

  • Use debugPrint for loggable

1.2.2 #

  • Improve cancellation token

1.2.1 #

  • Refactoring

1.2.0 #

  • Improve Loggable

1.1.9 #

  • Fix mutex

1.1.8 #

  • Add Mutex

1.1.7 #

  • Add CancellationToken

1.1.6 #

  • Improve DTO functions

1.1.5 #

  • Add Symbol ext

1.1.4 #

  • Add some utilities

1.1.3 #

  • Improve json utils

1.1.2 #

  • Add wrapIfNotNull utility function

1.1.1 #

  • Improve json utility

1.1.0 #

  • Initial stable release

1.0.14-dev #

  • Improve Color extensions

1.0.13-dev #

  • Improve Color extensions

1.0.12-dev #

  • Improve DTO extensions

1.0.11-dev #

  • Improve DTO extensions

1.0.10-dev #

  • Add DTO extension

1.0.9-dev #

  • Add DTO to library

1.0.8-dev #

  • Add DTO utils

1.0.7-dev #

  • Add iterable extension

1.0.6-dev #

  • Fix JsonPath get root element

1.0.5-dev #

  • Add option to mute Loggable

1.0.4-dev #

  • Add Strings extensions to library.

1.0.3-dev #

  • Improve Result.

1.0.2-dev #

  • Improve Result.

1.0.1-dev #

  • Add Result getter.

1.0.0-dev #

  • Initial release.
2
likes
150
points
202
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter toolkit of typed extensions, JSON helpers, mutex and cancellation, tagged logging and layout widgets shared by the flutterx packages.

Repository (GitLab)
View/report issues

License

BSD-3-Clause (license)

Dependencies

clock, flutter, vector_math

More

Packages that depend on flutterx_utils