This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Conversion from/to JSON to String in Dart | |
// Also simple DIY conversion to a custom class object | |
import 'dart:convert'; | |
class dto{ | |
String name; | |
int age; | |
dto(this.name, this.age); | |
factory dto.fromJson(Map<String, dynamic>? jmap) { |