Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart data structures

class DataClass {
	final String value;
    
    const DataClass({this.value = ''});

	DataClass? fromMap(Map map) {
    	if (map.isEmpty) return null;
        return DataClass(
        	value: map['value'],
        );
    }
    
    Map toMap() => {
    	'value': value,
    }
}
 
PREVIOUS NEXT
Tagged: #dart #data #structures
ADD COMMENT
Topic
Name
1+2 =