Rich text editor for Flutter
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.

34 lines
698 B

import 'package:flutter/material.dart';
class QuillToolbarIconButton extends StatelessWidget {
const QuillToolbarIconButton({
required this.onPressed,
2 years ago
required this.icon,
required this.isFilled,
this.afterPressed,
this.tooltip,
super.key,
});
final VoidCallback? onPressed;
final VoidCallback? afterPressed;
2 years ago
final Widget icon;
final String? tooltip;
2 years ago
final bool isFilled;
@override
Widget build(BuildContext context) {
2 years ago
if (isFilled) {
return IconButton.filled(onPressed: onPressed, icon: icon);
}
return IconButton(
2 years ago
onPressed: () {
onPressed?.call();
afterPressed?.call();
},
2 years ago
icon: icon,
);
}
}