|
|
@ -310,13 +310,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
ToggleButtonsStateManager(
|
|
|
|
Builder(builder: (innerContext) {
|
|
|
|
isToggleButtonsSelected: _isSelected,
|
|
|
|
|
|
|
|
updateToggleButtonsStateOnButtonPressed:
|
|
|
|
|
|
|
|
_updateToggleButtonsStateOnButtonPressed,
|
|
|
|
|
|
|
|
updateToggleButtonStateOnSelectionChanged:
|
|
|
|
|
|
|
|
_updateToggleButtonsStateOnSelectionChanged,
|
|
|
|
|
|
|
|
child: Builder(builder: (innerContext) {
|
|
|
|
|
|
|
|
final ToggleButtonsStateManager manager =
|
|
|
|
final ToggleButtonsStateManager manager =
|
|
|
|
ToggleButtonsStateManager.of(innerContext);
|
|
|
|
ToggleButtonsStateManager.of(innerContext);
|
|
|
|
|
|
|
|
|
|
|
@ -331,8 +325,8 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
manager.toggleButtonsState
|
|
|
|
manager.toggleButtonsState
|
|
|
|
.contains(ToggleButtonsState.underline),
|
|
|
|
.contains(ToggleButtonsState.underline),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
onPressed: (index) => manager
|
|
|
|
onPressed: (index) =>
|
|
|
|
.updateToggleButtonsOnButtonPressed(index),
|
|
|
|
manager.updateToggleButtonsOnButtonPressed(index),
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Icon(Icons.format_bold),
|
|
|
|
Icon(Icons.format_bold),
|
|
|
|
Icon(Icons.format_italic),
|
|
|
|
Icon(Icons.format_italic),
|
|
|
@ -340,19 +334,12 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 35.0),
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 35.0),
|
|
|
|
child: ToggleButtonsStateManager(
|
|
|
|
|
|
|
|
isToggleButtonsSelected: _isSelected,
|
|
|
|
|
|
|
|
updateToggleButtonsStateOnButtonPressed:
|
|
|
|
|
|
|
|
_updateToggleButtonsStateOnButtonPressed,
|
|
|
|
|
|
|
|
updateToggleButtonStateOnSelectionChanged:
|
|
|
|
|
|
|
|
_updateToggleButtonsStateOnSelectionChanged,
|
|
|
|
|
|
|
|
child: TextEditingDeltaHistoryManager(
|
|
|
|
child: TextEditingDeltaHistoryManager(
|
|
|
|
history: _textEditingDeltaHistory,
|
|
|
|
history: _textEditingDeltaHistory,
|
|
|
|
updateHistoryOnInput: _updateTextEditingDeltaHistory,
|
|
|
|
updateHistoryOnInput: _updateTextEditingDeltaHistory,
|
|
|
@ -365,7 +352,6 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|