Answers for "dart convert a object to map"

0

dart object to map

class Human {
  String name;
  int age;

  Map<String, dynamic> toMap() {
    return {
      'name': name,
      'age': age,
    };
  }
}
Posted by: Guest on December-28-2020

Code answers related to "Dart"

Browse Popular Code Answers by Language