fix: don't rebuild mobile toolbar everytime (#579)
This commit is contained in:
parent
0bb39dec7f
commit
a47fc6fc71
2 changed files with 2 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ class MobileToolbar extends StatelessWidget {
|
|||
buttonSelectedBorderWidth: buttonSelectedBorderWidth,
|
||||
child: MobileToolbarWidget(
|
||||
// Use selection as key to force rebuild toolbar widget when selection changed.
|
||||
key: ValueKey(selection),
|
||||
// key: ValueKey(selection),
|
||||
editorState: editorState,
|
||||
selection: selection,
|
||||
toolbarItems: toolbarItems,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
|
|||
typedef MobileToolbarItemMenuBuilder = Widget Function(
|
||||
EditorState editorState,
|
||||
Selection selection,
|
||||
// To accees to the state of MobileToolbarWidget
|
||||
// To access to the state of MobileToolbarWidget
|
||||
MobileToolbarWidgetService service,
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue