Viewing version 3.3.0. Open the latest package page.
w_common
3.3.0General utilities for Dart projects.
Readme
w_common
A collection of helpful utilities for use in Dart projects. Right now, it includes the following:
Disposableinterface / 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.
InvalidationMixinmixin used to mark a class as requiring validation.JsonSerializableinterface to indicate that something can be serialized to JSON.
Changelog
3.3.0
- Allow a nullable to be managed via
Disposable.manageDisposableandDisposable.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 viaDisposable.getManagedTimerandDisposable.getManagedPeriodicTimerto be controlled by thefake_asyncpackage.
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, andDisposableManagerV6. UseDisposableManagerV7instead. - Removes
w_common.dartentrypoint. 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
keysgetter. UseliveKeysandreleasedKeysinstead. - Removes
valuesgetter. UseliveValuesinstead. - Removes
containsKeymethod. Use.containsonliveKeysandreleasedKeysinstead.
- Removes
- Changes to
Disposable:- Removes
isDisposedOrDisposing. UseisOrWillBeDisposedinstead. This also returns true when theDisposableinstance is in the "awaiting disposal" state that is entered as soon as [dispose] is called. - Removes
isDisposing. UseisOrWillBeDisposedinstead. - Removes
manageAndReturnDisposable. UsemanageAndReturnTypedDisposableinstead. - Removes
manageDisposer. UsegetManagedDisposerinstead. - Removes
manageStreamSubscription. UselistenToStreaminstead.
- Removes
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
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | Cached · Upstream SHA-256 matched | Download | 35bd85a4…c95f44 |
| 0.2.0 | Cached · Upstream SHA-256 matched | Download | 75f9146b…826bea |
| 1.0.0 | Cached · Upstream SHA-256 matched | Download | f338ef94…f5816c |
| 1.1.0 | Cached · Upstream SHA-256 matched | Download | e55646cc…9017da |
| 1.2.0 | Cached · Upstream SHA-256 matched | Download | 6d844259…8c7ed1 |
| 1.3.0 | Cached · Upstream SHA-256 matched | Download | 06503434…828a9e |
| 1.4.0 | Cached · Upstream SHA-256 matched | Download | fd7920e7…a72b5b |
| 1.4.1 | Cached · Upstream SHA-256 matched | Download | a70077a5…dd566b |
| 1.5.0 | Cached · Upstream SHA-256 matched | Download | 28f984be…bb529b |
| 1.6.0 | Cached · Upstream SHA-256 matched | Download | 4f059242…f56fc1 |
| 1.6.1 | Cached · Upstream SHA-256 matched | Download | 7f14fe3c…a1606b |
| 1.7.0 | Cached · Upstream SHA-256 matched | Download | e245942f…cc1c51 |
| 1.7.1 | Cached · Upstream SHA-256 matched | Download | ade99ad4…dc7be8 |
| 1.7.2 | Cached · Upstream SHA-256 matched | Download | 9420f343…c3a0a1 |
| 1.8.0 | Cached · Upstream SHA-256 matched | Download | 2ad352db…30b4bc |
| 1.8.1 | Cached · Upstream SHA-256 matched | Download | eb7f651e…826e66 |
| 1.8.2 | Cached · Upstream SHA-256 matched | Download | 3d3f3bbe…ae47cb |
| 1.9.0 | Cached · Upstream SHA-256 matched | Download | 4c021436…e5e889 |
| 1.10.0 | Cached · Upstream SHA-256 matched | Download | af7da8a6…393515 |
| 1.11.0 | Cached · Upstream SHA-256 matched | Download | d10de3a2…171c76 |
| 1.11.1 | Cached · Upstream SHA-256 matched | Download | 5e256bb5…5972d1 |
| 1.11.2 | Cached · Upstream SHA-256 matched | Download | ffaa953d…61ac30 |
| 1.12.0 | Cached · Upstream SHA-256 matched | Download | ecf387eb…846cb4 |
| 1.13.0 | Cached · Upstream SHA-256 matched | Download | 8d4bfec8…3cb6bc |
| 1.14.0 | Cached · Upstream SHA-256 matched | Download | 78c4330d…1e004f |
| 1.15.0 | Cached · Upstream SHA-256 matched | Download | a9c640da…a27351 |
| 1.15.1 | Cached · Upstream SHA-256 matched | Download | 3ae01cc2…e5d59b |
| 1.16.0 | Cached · Upstream SHA-256 matched | Download | a0b818b1…ac359c |
| 1.17.0 | Cached · Upstream SHA-256 matched | Download | 09ae174d…df7f6a |
| 1.18.0 | Cached · Upstream SHA-256 matched | Download | 7fb14445…5ffaf2 |
| 1.18.1 | Cached · Upstream SHA-256 matched | Download | 1db52511…6781ef |
| 1.19.0 | Cached · Upstream SHA-256 matched | Download | 7afa95e0…12a73d |
| 1.20.0 | Cached · Upstream SHA-256 matched | Download | 36919388…9ca163 |
| 1.20.1 | Cached · Upstream SHA-256 matched | Download | 3c8999dc…f47749 |
| 1.20.2 | Cached · Upstream SHA-256 matched | Download | 14ac013c…c4a2d8 |
| 1.20.3 | Cached · Upstream SHA-256 matched | Download | 532cbeaa…d0a85a |
| 1.20.4 | Cached · Upstream SHA-256 matched | Download | 6e8629c5…0b83bf |
| 1.20.7 | Cached · Upstream SHA-256 matched | Download | e531c7c8…2657b8 |
| 1.20.8 | Cached · Upstream SHA-256 matched | Download | 3eb65235…73f718 |
| 1.20.9 | Cached · Upstream SHA-256 matched | Download | 111051ce…af4862 |
| 1.20.10 | Cached · Upstream SHA-256 matched | Download | 5cf5b635…2216ec |
| 1.21.0 | Cached · Upstream SHA-256 matched | Download | 481a0382…b5eb51 |
| 1.21.1 | Cached · Upstream SHA-256 matched | Download | b6405c3d…c3f636 |
| 1.21.8 | Cached · Upstream SHA-256 matched | Download | 72e71793…386cf3 |
| 2.0.0 | Cached · Upstream SHA-256 matched | Download | 346fe0e8…a1a1c2 |
| 2.1.0 | Cached · Upstream SHA-256 matched | Download | fe15c170…7a9ac4 |
| 2.1.1 | Cached · Upstream SHA-256 matched | Download | ce90e2a3…7f9833 |
| 2.1.2 | Cached · Upstream SHA-256 matched | Download | 2e65f7be…1ecc80 |
| 3.0.0 | Cached · Upstream SHA-256 matched | Download | 54e34b48…6ee32e |
| 3.0.1 | Cached · Upstream SHA-256 matched | Download | de0c9f7c…0f19e9 |
| 3.1.1 | Cached · Upstream SHA-256 matched | Download | dfed94b2…d5cc28 |
| 3.2.0 | Cached · Upstream SHA-256 matched | Download | 4daab34b…48ea1e |
| 3.3.0 | Cached · Upstream SHA-256 matched | Download | a1eec8c6…45f94d |
| 3.4.0 | Cached · Upstream SHA-256 matched | Download | 8d0470e2…e9b7df |
| 3.5.0 | Cached · Upstream SHA-256 matched | Download | 4ba9d6b1…4ac558 |
| 3.6.0 | Cached · Upstream SHA-256 matched | Download | a6b52a67…42f483 |
| 4.0.0 | Cached · Upstream SHA-256 matched | Download | bae042f7…6b6d7f |
Dependencies
intl "\u003e=0.17.0 \u003c0.19.0"
js "^0.6.3"
logging "^1.0.0"
meta "^1.16.0"