[flutter]: fix bugs

This commit is contained in:
appflowy 2021-11-03 23:03:42 +08:00
parent 99d39e30f8
commit 955bc3e103
3 changed files with 6 additions and 3 deletions

View File

@ -58,7 +58,10 @@ class DocBloc extends Bloc<DocEvent, DocState> {
Future<void> close() async {
await listener.stop();
await _subscription?.cancel();
if (_subscription != null) {
await _subscription?.cancel();
}
docManager.closeDoc();
return super.close();
}

View File

@ -71,7 +71,7 @@ class EditorToolbar extends StatelessWidget implements PreferredSizeWidget {
),
FlowyToggleStyleButton(
attribute: Attribute.italic,
normalIcon: 'editor/restore',
normalIcon: 'editor/italic',
iconSize: toolbarIconSize,
controller: controller,
),

View File

@ -80,7 +80,7 @@ pub enum AttributeKey {
Italic,
#[serde(rename = "underline")]
Underline,
#[serde(rename = "strikethrough")]
#[serde(rename = "strike")]
StrikeThrough,
#[serde(rename = "font")]
Font,