platform/packages/serialize/angel_serialize_generator/README.md
thomashii@dukefirehawk.com 630c527381 Upgrade library
2023-09-23 11:31:46 +08:00

1 KiB

Angel3 Serialize Generator

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

The builder for Angel3 serialization.

Usage

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

        import 'package:angel3_serialize/angel3_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