dart_mem_annotation 0.0.2 copy "dart_mem_annotation: ^0.0.2" to clipboard
dart_mem_annotation: ^0.0.2 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
0
points
240
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

Funding

Consider supporting this project:

resam.site

License

unknown (license)

Dependencies

build_runner, dartdoc

More

Packages that depend on dart_mem_annotation