parent
905512e8e4
commit
e7e71f1cb2
13 changed files with 227 additions and 102 deletions
@ -0,0 +1,32 @@ |
||||
import 'package:flutter/widgets.dart' show VoidCallback, Widget; |
||||
|
||||
import 'base.dart'; |
||||
|
||||
class QuillToolbarCustomButtonExtraOptions |
||||
extends QuillToolbarBaseButtonExtraOptions { |
||||
const QuillToolbarCustomButtonExtraOptions({ |
||||
required super.controller, |
||||
required super.context, |
||||
required super.onPressed, |
||||
}); |
||||
} |
||||
|
||||
class QuillToolbarCustomButtonOptions extends QuillToolbarBaseButtonOptions< |
||||
QuillToolbarBaseButtonOptions, QuillToolbarCustomButtonExtraOptions> { |
||||
const QuillToolbarCustomButtonOptions({ |
||||
this.icon, |
||||
this.iconButtonFactor, |
||||
this.iconSize, |
||||
super.afterButtonPressed, |
||||
super.tooltip, |
||||
super.iconTheme, |
||||
super.childBuilder, |
||||
super.controller, |
||||
this.onPressed, |
||||
}); |
||||
|
||||
final double? iconButtonFactor; |
||||
final double? iconSize; |
||||
final VoidCallback? onPressed; |
||||
final Widget? icon; |
||||
} |
@ -1,26 +1,22 @@ |
||||
import 'package:flutter/material.dart'; |
||||
// import 'package:flutter/material.dart'; |
||||
|
||||
import '../../widgets/toolbar/base_toolbar.dart'; |
||||
// import '../../widgets/toolbar/base_toolbar.dart'; |
||||
|
||||
class QuillCustomButton extends QuillToolbarBaseButtonOptions { |
||||
const QuillCustomButton({ |
||||
super.iconData, |
||||
this.iconColor, |
||||
this.onTap, |
||||
super.tooltip, |
||||
this.iconSize, |
||||
this.child, |
||||
super.iconTheme, |
||||
}); |
||||
// class QuillCustomButton extends QuillToolbarBaseButtonOptions { |
||||
// const QuillCustomButton({ |
||||
// this.icon, |
||||
// this.onTap, |
||||
// super.tooltip, |
||||
// this.child, |
||||
// super.iconTheme, |
||||
// }); |
||||
|
||||
///The icon color; |
||||
final Color? iconColor; |
||||
// /// The icon widget |
||||
// final Widget? icon; |
||||
|
||||
///The function when the icon is tapped |
||||
final VoidCallback? onTap; |
||||
// /// The function when the icon is tapped |
||||
// final VoidCallback? onTap; |
||||
|
||||
///The customButton placeholder |
||||
final Widget? child; |
||||
|
||||
final double? iconSize; |
||||
} |
||||
// /// The customButton placeholder |
||||
// final Widget? child; |
||||
// } |
||||
|
Loading…
Reference in new issue