From 4097c7c7469d00de6f88e1b252ed2a8e2f7ca688 Mon Sep 17 00:00:00 2001 From: jideguru Date: Thu, 3 Jun 2021 00:42:53 +0100 Subject: [PATCH] refactor: format files with dartFmt --- lib/src/extensions/extensions.dart | 2 +- lib/src/models/alias.dart | 2 +- lib/src/models/editor_state.dart | 1 - lib/src/models/enum.dart | 5 +- lib/src/models/family.dart | 3 +- lib/src/utils/constants.dart | 147 -------------------- lib/src/widgets/custom_dialog_template.dart | 1 - 7 files changed, 4 insertions(+), 157 deletions(-) diff --git a/lib/src/extensions/extensions.dart b/lib/src/extensions/extensions.dart index 9d6ceda..d5a28db 100644 --- a/lib/src/extensions/extensions.dart +++ b/lib/src/extensions/extensions.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; extension ColorX on Color { String toHexColorString() { String hex = value.toRadixString(16).replaceAll('ff', ''); - if(hex.isEmpty) hex = '000000'; + if (hex.isEmpty) hex = '000000'; return '#$hex'; } } diff --git a/lib/src/models/alias.dart b/lib/src/models/alias.dart index d628c1a..7d66a32 100644 --- a/lib/src/models/alias.dart +++ b/lib/src/models/alias.dart @@ -18,4 +18,4 @@ class Alias { data['weight'] = this.weight; return data; } -} \ No newline at end of file +} diff --git a/lib/src/models/editor_state.dart b/lib/src/models/editor_state.dart index b43f354..70dde80 100644 --- a/lib/src/models/editor_state.dart +++ b/lib/src/models/editor_state.dart @@ -27,4 +27,3 @@ class EditorState { return data; } } - diff --git a/lib/src/models/enum.dart b/lib/src/models/enum.dart index e4e9e47..3c3a70a 100644 --- a/lib/src/models/enum.dart +++ b/lib/src/models/enum.dart @@ -37,10 +37,7 @@ enum CommandName { INSERTIMAGE, INSERTCHECKBOX, // pseudo commands for toggling grouped command views - ENTER_VIEWING_MODE, EXPANDING_SEARCH_VIEWING, - TOGGLE_GROUPED_TEXT_STYLES_COMMANDS_VIEW, - TOGGLE_GROUPED_INSERT_COMMANDS_COMMANDS_VIEW } -enum BarPosition {TOP, BOTTOM} \ No newline at end of file +enum BarPosition { TOP, BOTTOM } diff --git a/lib/src/models/family.dart b/lib/src/models/family.dart index a56b684..6eb3218 100644 --- a/lib/src/models/family.dart +++ b/lib/src/models/family.dart @@ -12,12 +12,11 @@ class Family { name = json['name']; if (json['font'] != null) { fonts = []; - if(json['font'] is List) { + if (json['font'] is List) { json['font'].forEach((v) { fonts!.add(new Font.fromJson(v)); }); } - } lang = json['lang']; variant = json['variant']; diff --git a/lib/src/utils/constants.dart b/lib/src/utils/constants.dart index 6c78fb6..8b13789 100644 --- a/lib/src/utils/constants.dart +++ b/lib/src/utils/constants.dart @@ -1,148 +1 @@ -import 'package:flutter/material.dart'; -import 'package:rich_editor/src/models/button.dart'; -import 'javascript_executor_base.dart'; - -List