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,
|
buttonSelectedBorderWidth: buttonSelectedBorderWidth,
|
||||||
child: MobileToolbarWidget(
|
child: MobileToolbarWidget(
|
||||||
// Use selection as key to force rebuild toolbar widget when selection changed.
|
// Use selection as key to force rebuild toolbar widget when selection changed.
|
||||||
key: ValueKey(selection),
|
// key: ValueKey(selection),
|
||||||
editorState: editorState,
|
editorState: editorState,
|
||||||
selection: selection,
|
selection: selection,
|
||||||
toolbarItems: toolbarItems,
|
toolbarItems: toolbarItems,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
|
||||||
typedef MobileToolbarItemMenuBuilder = Widget Function(
|
typedef MobileToolbarItemMenuBuilder = Widget Function(
|
||||||
EditorState editorState,
|
EditorState editorState,
|
||||||
Selection selection,
|
Selection selection,
|
||||||
// To accees to the state of MobileToolbarWidget
|
// To access to the state of MobileToolbarWidget
|
||||||
MobileToolbarWidgetService service,
|
MobileToolbarWidgetService service,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue