ClassToMapExtension extension Null safety

This converts the give class to a Map representation of its values For exampe

class Test{
  String name = "My name";
  int age = 20;
  List<Friend> friends = [Friend('Friend1'), Friend('Friend2')];
}
class Friend{
  Friend(this.name);
  late String name;
}

to

{
  "name": 'My name',
  "age": 20,
  "friends": [{"name": 'Friend1'}, {"name": 'Friend2'}]
}
on

Methods

toMap() Map<String, dynamic>