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

Kotlin-inspired scope functions implemented in Dart with the goal of executing a block of code within the context of an object

0.0.1 #

  • Initial version.

0.0.2 #

  • Update pubspec.yaml with a more detailed description.

0.0.3 #

  • Bump Dart SDK version constraint.

0.0.4 #

  • Bump Dart SDK version constraint.

0.0.5 #

  • Bump Dart SDK version constraint.

0.0.6 #

  • GitHub repository cleanup.
  • Regenerate analysis_options.yaml file.

0.0.7 #

  • Dart 3 ready: new analysis_options.yaml file + bumped Dart SDK constraints.

0.0.8 #

  • Update analysis_options.yaml file.

0.1.0 #

  • Bump Dart SDK version constraint.

0.1.1 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.
  • Add topics to pubspec.yaml.

0.1.2 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.
  • Create a new extension method letWithElse that can be used on nullable types.

0.1.3 #

  • Create a new extension method withDefault.

0.1.4 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.

0.1.5 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.
  • Regenerate analysis_options.yaml file.

0.1.6 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.
  • Regenerate analysis_options.yaml file.

0.1.7 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.
  • Update documentation.

0.1.8 #

  • Bump SDK version constraint.
  • Add @pragma annotations to try and inline functions.

0.1.9 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.
  • Regenerate analysis_options.yaml file.

1.0.0 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.

1.0.1 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.
  • Change repository URL.

1.0.2 #

  • Bump SDK version constraint.
  • Bump dependencies to latest.
  • Change repository URL.

1.0.3 #

  • Bump SDK version constraints.
  • Bump dependencies to latest.

1.0.4 #

  • Bump SDK version constraints.
  • Bump dependencies to latest.

1.0.5 #

  • Bump SDK version constraints.

1.0.6 #

  • Bump SDK version constraints.
  • Replace the repository URL from GitHub to GitLab.

1.0.7 #

  • Update version to 1.0.7, bump SDK constraints to >=3.11.0, and update dev dependencies for lints and test packages.
  • Improve tests.

1.0.8 #

  • Update dependencies and Dart SDK constraints.

2.0.0 #

Breaking changes

  • letWithElse's orElse is now a function (R Function()) instead of a value, so it is only evaluated when the receiver is null. Migration: orElse: x → orElse: () => x.
  • The takeIf / takeUnless parameter is renamed from predicament to predicate (only affects callers passing it by name).
  • Bump Dart SDK constraint to >=3.13.3.

Bug fixes

  • letWithElse no longer falls back to orElse when the receiver is non-null but block legitimately returns null (nullable R).

Other changes

  • Add wasm:prefer-inline pragma so dart2wasm gets the same inline hint as the VM and dart2js; use dart2js:prefer-inline instead of the legacy tryInline alias.
  • Document that also does not await an async block, and that let does not short-circuit on null (use value?.let(...) or letWithElse).
  • Extend tests: call-count, instance identity, exception propagation, nullable receivers, async blocks, lazy orElse.
  • Add GitLab CI (format check, analyze, tests, example run, publish dry-run).
  • Bump dev dependencies to latest; regenerate analysis_options.yaml.
20
likes
160
points
2.66k
downloads

Documentation

API reference

Publisher

verified publisherbizjak.dev

Weekly Downloads

Kotlin-inspired scope functions implemented in Dart with the goal of executing a block of code within the context of an object

Repository (GitLab)
View/report issues

Topics

#kotlin #scope #function #scope-functions #utility

License

BSD-3-Clause (license)

More

Packages that depend on dart_scope_functions