dartlangeditorflutterflutter-appsflutter-examplesflutter-packageflutter-widgetquillquill-deltaquilljsreactquillrich-textrich-text-editorwysiwygwysiwyg-editor
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
679 B
33 lines
679 B
4 years ago
|
import 'package:flutter/material.dart';
|
||
|
|
||
2 years ago
|
class QuillToolbarIconButton extends StatelessWidget {
|
||
|
const QuillToolbarIconButton({
|
||
4 years ago
|
required this.onPressed,
|
||
2 years ago
|
required this.icon,
|
||
|
required this.isFilled,
|
||
3 years ago
|
this.afterPressed,
|
||
4 years ago
|
this.size = 40,
|
||
2 years ago
|
this.tooltip,
|
||
2 years ago
|
super.key,
|
||
|
});
|
||
4 years ago
|
|
||
|
final VoidCallback? onPressed;
|
||
3 years ago
|
final VoidCallback? afterPressed;
|
||
2 years ago
|
final Widget icon;
|
||
2 years ago
|
|
||
4 years ago
|
final double size;
|
||
2 years ago
|
final String? tooltip;
|
||
2 years ago
|
final bool isFilled;
|
||
4 years ago
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
2 years ago
|
if (isFilled) {
|
||
|
return IconButton.filled(onPressed: onPressed, icon: icon);
|
||
|
}
|
||
|
return IconButton(
|
||
|
onPressed: onPressed,
|
||
|
icon: icon,
|
||
4 years ago
|
);
|
||
|
}
|
||
|
}
|