platform/packages/serialize/serialize_generator/README.md
2024-10-12 18:45:27 -07:00

1 KiB

Protevus Serialize Generator

Pub Version (including pre-releases) Null Safety Discord License

The builder for Protevus serialization.

Usage

  1. Create a model class in todo.dart and annotate it with @serializable

        import 'package:protevus_serialize/protevus_serialize.dart';
        part 'todo.g.dart';
    
        @serializable
        class _Todo {
            String? text;
            bool? completed;
        }
    
  2. Run the following command to generate the associated todo.g.dart file for serialization.

        dart run build_runner build