Viewing version 3.3.0. Open the latest package page.

w_common

3.3.0

General utilities for Dart projects.

Download archive

Readme

w_common

A collection of helpful utilities for use in Dart projects. Right now, it includes the following:

  • Disposable interface / mixin to assist with cleaning up streams and other data structures that won't necessarily be garbage collected without some manual intervention.
  • A simple typedef that can be parameterized to represent a zero-arity callback that returns a particular type.
  • InvalidationMixin mixin used to mark a class as requiring validation.
  • JsonSerializable interface to indicate that something can be serialized to JSON.
Changelog

3.3.0

  • Allow a nullable to be managed via Disposable.manageDisposable and Disposable.manageAndReturnTypedDisposable.

3.2.0

  • Adds JsonMap and JsonMapObject typedefs

3.1.0

  • Update SDK minimum to 2.19.0 to support the non-function typedef language feature.
  • Raised package versions to their first nullsafe version.

3.0.0

  • Migrate to null-safety.

2.1.1

  • Implement _ObservableTimer.tick, which allows timers created via Disposable.getManagedTimer and Disposable.getManagedPeriodicTimer to be controlled by the fake_async package.

2.0.0

June 14, 2022

Breaking Changes:

  • Removes sass compilation tool from w_common. Use w_common_tools instead.
  • Removes DisposableManager, DisposableManagerV2, DisposableManagerV3, DisposableManagerV4, DisposableManagerV5, and DisposableManagerV6. Use DisposableManagerV7 instead.
  • Removes w_common.dart entrypoint. Use the specific entrypoint related to the pieces of w_common you want to use instead. For example, package:w_common/disposable.dart.
  • Changes to Cache:
    • Removes keys getter. Use liveKeys and releasedKeys instead.
    • Removes values getter. Use liveValues instead.
    • Removes containsKey method. Use .contains on liveKeys and releasedKeys instead.
  • Changes to Disposable:
    • Removes isDisposedOrDisposing. Use isOrWillBeDisposed instead. This also returns true when the Disposable instance is in the "awaiting disposal" state that is entered as soon as [dispose] is called.
    • Removes isDisposing. Use isOrWillBeDisposed instead.
    • Removes manageAndReturnDisposable. Use manageAndReturnTypedDisposable instead.
    • Removes manageDisposer. Use getManagedDisposer instead.
    • Removes manageStreamSubscription. Use listenToStream instead.

1.21.8

June 2, 2022

  • Added w_common_tools as a separate package.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'w_common:3.3.0'
pubspec.yaml
name: w_common
version: 3.3.0
description: General utilities for Dart projects.
homepage: https://www.github.com/Workiva/w_common

environment:
  sdk: '>=2.19.0 <3.0.0'

dependencies:
  intl: '>=0.17.0 <0.19.0'
  js: ^0.6.3
  logging: ^1.0.0
  meta: ^1.16.0

dev_dependencies:
  build_runner: ^2.0.0
  build_test: ^2.0.0
  build_web_compilers: '>=3.0.0 <5.0.0'
  dependency_validator: ^3.0.0
  mocktail: ^1.0.4
  test: ^1.21.1
  workiva_analysis_options: ^1.4.2

dependency_validator:
  ignore:
    - mockito

Version history

VersionPublishedArchiveSHA-256
0.1.0Cached · Upstream SHA-256 matchedDownload35bd85a4…c95f44
0.2.0Cached · Upstream SHA-256 matchedDownload75f9146b…826bea
1.0.0Cached · Upstream SHA-256 matchedDownloadf338ef94…f5816c
1.1.0Cached · Upstream SHA-256 matchedDownloade55646cc…9017da
1.2.0Cached · Upstream SHA-256 matchedDownload6d844259…8c7ed1
1.3.0Cached · Upstream SHA-256 matchedDownload06503434…828a9e
1.4.0Cached · Upstream SHA-256 matchedDownloadfd7920e7…a72b5b
1.4.1Cached · Upstream SHA-256 matchedDownloada70077a5…dd566b
1.5.0Cached · Upstream SHA-256 matchedDownload28f984be…bb529b
1.6.0Cached · Upstream SHA-256 matchedDownload4f059242…f56fc1
1.6.1Cached · Upstream SHA-256 matchedDownload7f14fe3c…a1606b
1.7.0Cached · Upstream SHA-256 matchedDownloade245942f…cc1c51
1.7.1Cached · Upstream SHA-256 matchedDownloadade99ad4…dc7be8
1.7.2Cached · Upstream SHA-256 matchedDownload9420f343…c3a0a1
1.8.0Cached · Upstream SHA-256 matchedDownload2ad352db…30b4bc
1.8.1Cached · Upstream SHA-256 matchedDownloadeb7f651e…826e66
1.8.2Cached · Upstream SHA-256 matchedDownload3d3f3bbe…ae47cb
1.9.0Cached · Upstream SHA-256 matchedDownload4c021436…e5e889
1.10.0Cached · Upstream SHA-256 matchedDownloadaf7da8a6…393515
1.11.0Cached · Upstream SHA-256 matchedDownloadd10de3a2…171c76
1.11.1Cached · Upstream SHA-256 matchedDownload5e256bb5…5972d1
1.11.2Cached · Upstream SHA-256 matchedDownloadffaa953d…61ac30
1.12.0Cached · Upstream SHA-256 matchedDownloadecf387eb…846cb4
1.13.0Cached · Upstream SHA-256 matchedDownload8d4bfec8…3cb6bc
1.14.0Cached · Upstream SHA-256 matchedDownload78c4330d…1e004f
1.15.0Cached · Upstream SHA-256 matchedDownloada9c640da…a27351
1.15.1Cached · Upstream SHA-256 matchedDownload3ae01cc2…e5d59b
1.16.0Cached · Upstream SHA-256 matchedDownloada0b818b1…ac359c
1.17.0Cached · Upstream SHA-256 matchedDownload09ae174d…df7f6a
1.18.0Cached · Upstream SHA-256 matchedDownload7fb14445…5ffaf2
1.18.1Cached · Upstream SHA-256 matchedDownload1db52511…6781ef
1.19.0Cached · Upstream SHA-256 matchedDownload7afa95e0…12a73d
1.20.0Cached · Upstream SHA-256 matchedDownload36919388…9ca163
1.20.1Cached · Upstream SHA-256 matchedDownload3c8999dc…f47749
1.20.2Cached · Upstream SHA-256 matchedDownload14ac013c…c4a2d8
1.20.3Cached · Upstream SHA-256 matchedDownload532cbeaa…d0a85a
1.20.4Cached · Upstream SHA-256 matchedDownload6e8629c5…0b83bf
1.20.7Cached · Upstream SHA-256 matchedDownloade531c7c8…2657b8
1.20.8Cached · Upstream SHA-256 matchedDownload3eb65235…73f718
1.20.9Cached · Upstream SHA-256 matchedDownload111051ce…af4862
1.20.10Cached · Upstream SHA-256 matchedDownload5cf5b635…2216ec
1.21.0Cached · Upstream SHA-256 matchedDownload481a0382…b5eb51
1.21.1Cached · Upstream SHA-256 matchedDownloadb6405c3d…c3f636
1.21.8Cached · Upstream SHA-256 matchedDownload72e71793…386cf3
2.0.0Cached · Upstream SHA-256 matchedDownload346fe0e8…a1a1c2
2.1.0Cached · Upstream SHA-256 matchedDownloadfe15c170…7a9ac4
2.1.1Cached · Upstream SHA-256 matchedDownloadce90e2a3…7f9833
2.1.2Cached · Upstream SHA-256 matchedDownload2e65f7be…1ecc80
3.0.0Cached · Upstream SHA-256 matchedDownload54e34b48…6ee32e
3.0.1Cached · Upstream SHA-256 matchedDownloadde0c9f7c…0f19e9
3.1.1Cached · Upstream SHA-256 matchedDownloaddfed94b2…d5cc28
3.2.0Cached · Upstream SHA-256 matchedDownload4daab34b…48ea1e
3.3.0Cached · Upstream SHA-256 matchedDownloada1eec8c6…45f94d
3.4.0Cached · Upstream SHA-256 matchedDownload8d0470e2…e9b7df
3.5.0Cached · Upstream SHA-256 matchedDownload4ba9d6b1…4ac558
3.6.0Cached · Upstream SHA-256 matchedDownloada6b52a67…42f483
4.0.0Cached · Upstream SHA-256 matchedDownloadbae042f7…6b6d7f

Dependencies

intl "\u003e=0.17.0 \u003c0.19.0"

js "^0.6.3"

logging "^1.0.0"

meta "^1.16.0"