copy_with_isar 0.0.3 copy "copy_with_isar: ^0.0.3" to clipboard
copy_with_isar: ^0.0.3 copied to clipboard

Small lib for add annotations to isar models.

example/example.dart

import 'package:copy_with_isar/annotations.dart';

part 'example.icopy.dart';

@IsarCopy()
class ExampleModel {
  String? firstName;
  String? lastName;
}

void main() {
  final model = ExampleModel()
    ..firstName = 'Json'
    ..lastName = 'Smith';
  print('Original: ${model.firstName} ${model.lastName}');

  final updatedModel = model.copyWith(firstName: 'Jane');
  print('Updated: ${updatedModel.firstName} ${updatedModel.lastName}');
}
1
likes
0
points
64
downloads

Publisher

unverified uploader

Weekly Downloads

Small lib for add annotations to isar models.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, build, source_gen

More

Packages that depend on copy_with_isar