import 'command_state.dart'; import 'enum/command_name.dart'; class EditorState { bool? didHtmlChange; String? html; Map? commandStates; EditorState({ this.didHtmlChange = false, this.html = '', this.commandStates = const {}, }); EditorState.fromJson(Map json) { didHtmlChange = json['didHtmlChange']; html = json['html']; commandStates = json['commandStates']; } Map toJson() { final Map data = new Map(); data['didHtmlChange'] = this.didHtmlChange; data['html'] = this.html; data['commandStates'] = this.commandStates; return data; } }