dart_mem_annotation 0.1.0 copy "dart_mem_annotation: ^0.1.0" to clipboard
dart_mem_annotation: ^0.1.0 copied to clipboard

A Code Generator Plugin to Generate Models, Entities and Mappers base on Annotation.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:dart_mem_annotation/annotation.dart';
import 'package:json_annotation/json_annotation.dart';

part 'main.mem.dart';
part 'main.freezed.dart';
part 'main.g.dart';

void main() {
  runApp(const MainApp());
}

enum SampleEnum {
  isEnum,
  notEnum,
}

@Mem.all()
class Sample {
  SampleEnum? sampleEnum;
  String? name;
  String? description;
  InnerSample? innerClass;
  List<String>? sampleList;
  List<InnerSample>? innerSampleList;
}

@Mem.all(withFreezed: true)
class InnerSample {
  const InnerSample({this.name, this.description});
  final String? name;
  final String? description;
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'App Name',
    );
  }
}
2
likes
135
points
249
downloads

Publisher

verified publisherresam.site

Weekly Downloads

A Code Generator Plugin to Generate Models, Entities and Mappers base on Annotation.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Funding

Consider supporting this project:

resam.site

License

BSD-3-Clause (license)

Dependencies

build_runner, dartdoc

More

Packages that depend on dart_mem_annotation