Fix test failures + New adjustments

pull/1518/head
Ellet 1 year ago committed by Ellet
parent 0632090f44
commit 562f4c99e9
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 43
      lib/src/models/themes/quill_custom_button.dart
  2. 17
      lib/src/widgets/toolbar/toolbar.dart
  3. 1
      test/bug_fix_test.dart

@ -1,43 +0,0 @@
// import 'package:flutter/material.dart';
// import '../../widgets/toolbar/base_toolbar.dart';
<<<<<<< HEAD
// class QuillCustomButton extends QuillToolbarBaseButtonOptions {
// const QuillCustomButton({
// this.icon,
// this.onTap,
// super.tooltip,
// this.child,
// super.iconTheme,
// });
// /// The icon widget
// final Widget? icon;
// /// The function when the icon is tapped
// final VoidCallback? onTap;
// /// The customButton placeholder
// final Widget? child;
// }
=======
class QuillCustomButton extends QuillToolbarBaseButtonOptions {
const QuillCustomButton({
this.icon,
this.onTap,
super.tooltip,
this.child,
super.iconTheme,
});
/// The icon widget
final Widget? icon;
/// The function when the icon is tapped
final VoidCallback? onTap;
/// The customButton placeholder
final Widget? child;
}
>>>>>>> ad642da (Update QuillCustomButton)

@ -411,7 +411,6 @@ class QuillToolbar extends StatelessWidget {
space: configurations.sectionDividerSpace,
),
for (final customButton in configurations.customButtons)
<<<<<<< HEAD
QuillToolbarCustomButton(
options: customButton,
controller: customButton.controller ?? globalController,
@ -430,22 +429,6 @@ class QuillToolbar extends StatelessWidget {
// globalController,
// ),
// ],
=======
if (customButton.child != null) ...[
InkWell(
onTap: customButton.onTap,
child: customButton.child,
),
] else ...[
QuillToolbarCustomButton(
options:
toolbarConfigurations.buttonOptions.customButtons,
controller: toolbarConfigurations
.buttonOptions.customButtons.controller ??
globalController,
),
],
>>>>>>> ad642da (Update QuillCustomButton)
spacerWidget,
],
];

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_quill/src/models/config/toolbar/buttons/custom_button.dart';
import 'package:flutter_quill_test/flutter_quill_test.dart';
import 'package:flutter_test/flutter_test.dart';

Loading…
Cancel
Save