df_generate_dart_models 0.10.4 copy "df_generate_dart_models: ^0.10.4" to clipboard
df_generate_dart_models: ^0.10.4 copied to clipboard

A tool for generating data models and classes from annotations, offering greater flexibility than json_serializable or freezed.

example/example.dart

//.title
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// Dart/Flutter (DF) Packages by DevCetra.com & contributors. The use of this
// source code is governed by an MIT-style license described in the LICENSE
// file located in this project's root directory.
//
// See: https://opensource.org/license/mit
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~

import 'package:df_generate_dart_models_core/df_generate_dart_models_core.dart';

import 'models/model_test/model_test.dart';
import 'models/model_user/model_user.dart';

void main() {
  final a = const ModelTest(
    users: [
      ModelUser(
        ref: DataRefModel(
          collection: ['users'],
          id: '123',
        ),
      ),
    ],
    checks: [1, 2, 3, 4],
  );
  print(a);
  final b = a.mergeWith(
    const ModelTest(checks: [4, 5, 6]),
    deepMerge: false,
  );
  print(b);
}
1
likes
150
pub points
0%
popularity

Publisher

verified publisherdevcetra.com

A tool for generating data models and classes from annotations, offering greater flexibility than json_serializable or freezed.

Repository (GitHub)
View/report issues

Topics

#build-runner #cli #codegen #freezed #json-serializable

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

analyzer, args, df_collection, df_config, df_gen_core, df_generate_dart_models_core, df_log, df_string, df_type, google_generative_ai, path

More

Packages that depend on df_generate_dart_models