Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter asign class to map

class Human {
  String name;
  int age;

  Map<String, dynamic> toMap() {
    return {
      'name': name,
      'age': age,
    };
  }
}
// Credit:  Lazy Leopard 
 
PREVIOUS NEXT
Tagged: #flutter #asign #class #map
ADD COMMENT
Topic
Name
8+6 =