|
|
|
@ -303,6 +303,9 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
|
_updateToggleButtonsStateOnButtonPressed,
|
|
|
|
|
updateToggleButtonStateOnSelectionChanged:
|
|
|
|
|
_updateToggleButtonsStateOnSelectionChanged,
|
|
|
|
|
child: TextEditingDeltaHistoryManager(
|
|
|
|
|
history: _textEditingDeltaHistory,
|
|
|
|
|
updateHistoryOnInput: _updateTextEditingDeltaHistory,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
@ -325,8 +328,8 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
|
manager.toggleButtonsState
|
|
|
|
|
.contains(ToggleButtonsState.underline),
|
|
|
|
|
],
|
|
|
|
|
onPressed: (index) =>
|
|
|
|
|
manager.updateToggleButtonsOnButtonPressed(index),
|
|
|
|
|
onPressed: (index) => manager
|
|
|
|
|
.updateToggleButtonsOnButtonPressed(index),
|
|
|
|
|
children: const [
|
|
|
|
|
Icon(Icons.format_bold),
|
|
|
|
|
Icon(Icons.format_italic),
|
|
|
|
@ -340,9 +343,6 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 35.0),
|
|
|
|
|
child: TextEditingDeltaHistoryManager(
|
|
|
|
|
history: _textEditingDeltaHistory,
|
|
|
|
|
updateHistoryOnInput: _updateTextEditingDeltaHistory,
|
|
|
|
|
child: BasicTextField(
|
|
|
|
|
controller: _replacementTextEditingController,
|
|
|
|
|
style: const TextStyle(
|
|
|
|
@ -351,15 +351,11 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
_buildTextEditingDeltaViewHeader(),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: TextEditingDeltaHistoryManager(
|
|
|
|
|
history: _textEditingDeltaHistory,
|
|
|
|
|
updateHistoryOnInput: _updateTextEditingDeltaHistory,
|
|
|
|
|
child: Builder(
|
|
|
|
|
builder: (innerContext) {
|
|
|
|
|
final TextEditingDeltaHistoryManager manager =
|
|
|
|
@ -381,7 +377,6 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -391,6 +386,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|