feat: added font choosing for android

This commit is contained in:
jideguru
2021-05-31 13:53:10 +01:00
parent 5e20c582e6
commit 27b4992817
14 changed files with 419 additions and 33 deletions

View File

@@ -3,13 +3,28 @@ import 'package:rich_editor/src/models/enum.dart';
import 'command_state.dart';
class EditorState {
bool didHtmlChange;
String html;
Map<CommandName, CommandState> commandStates;
bool? didHtmlChange;
String? html;
Map<CommandName, CommandState>? commandStates;
EditorState({
this.didHtmlChange = false,
this.html = '',
this.commandStates = const <CommandName, CommandState>{},
});
EditorState.fromJson(Map<String, dynamic> json) {
didHtmlChange = json['didHtmlChange'];
html = json['html'];
commandStates = json['commandStates'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['didHtmlChange'] = this.didHtmlChange;
data['html'] = this.html;
data['commandStates'] = this.commandStates;
return data;
}
}