dart_mappable 0.1.1 copy "dart_mappable: ^0.1.1" to clipboard
dart_mappable: ^0.1.1 copied to clipboard

outdated

Serialize / deserialize dart objects effortlessly, without any boilerplate code or annotations.

example/lib/main.dart

import 'main.mapper.g.dart';

class Person {
  dynamic age;
  String name;
  bool isAdmin;
  Car? car;
  List<int> nums;
  List<Car> cars;

  Person(String nameabc, this.age, {this.car, this.isAdmin = false, this.nums = const [], required this.cars})
      : name = nameabc;
  String get nameabc => name;
}

class Animal {
  int age;
  Animal(this.age);
}

class Dog extends Animal {
  String breed;
  Dog(this.breed, int age) : super(age);
}

enum Brand { Toyota, Audi, BMW }

class Car {
  final Brand brand;
  final int miles;

  const Car(this.miles, this.brand);
}

void main() {
  var c = Car(2, Brand.Audi);

  c.toMap();
}
321
likes
0
pub points
97%
popularity

Publisher

verified publisherschultek.de

Serialize / deserialize dart objects effortlessly, without any boilerplate code or annotations.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, build, indent

More

Packages that depend on dart_mappable