patch 1.0.1 copy "patch: ^1.0.1" to clipboard
patch: ^1.0.1 copied to clipboard

A wrapper for copyWith arguments, so that a nullable field can be cleared as well as replaced.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add patch

With Flutter:

 $ flutter pub add patch

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  patch: ^1.0.1

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:patch/patch.dart';
0
likes
160
points
146
downloads

Documentation

API reference

Publisher

verified publisherandyhorn.dev

Weekly Downloads

A wrapper for copyWith arguments, so that a nullable field can be cleared as well as replaced.

Repository (GitHub)
View/report issues

Topics

#copywith #immutability #data-classes

License

MIT (license)

Dependencies

meta

More

Packages that depend on patch