@@ -263,7 +263,6 @@ class _BBCodeEditorToolbarState extends State<BBCodeEditorToolbar> {
263263
264264 /// Refer: flutter_quill/lib/src/widgets/toolbar/color/color_button.dart
265265 void _changeColor (
266- BuildContext context,
267266 QuillController controller,
268267 bool isBackground,
269268 Color ? color,
@@ -291,14 +290,14 @@ class _BBCodeEditorToolbarState extends State<BBCodeEditorToolbar> {
291290 colorButtonOptions = QuillToolbarColorButtonOptions (
292291 customOnPressedCallback: (controller, isBackground) async {
293292 final pickResult = await widget._colorPicker !(context);
294- if (pickResult == null || ! mounted ) {
293+ if (pickResult == null ) {
295294 return ;
296295 }
297296
298297 if (pickResult.clearColor) {
299- _changeColor (context, controller, false , null );
298+ _changeColor (controller, false , null );
300299 } else {
301- _changeColor (context, controller, false , pickResult.color);
300+ _changeColor (controller, false , pickResult.color);
302301 }
303302 },
304303 );
@@ -309,14 +308,14 @@ class _BBCodeEditorToolbarState extends State<BBCodeEditorToolbar> {
309308 backgroundColorButtonOptions = QuillToolbarColorButtonOptions (
310309 customOnPressedCallback: (controller, isBackground) async {
311310 final pickResult = await widget._backgroundColorPicker !(context);
312- if (pickResult == null || ! mounted ) {
311+ if (pickResult == null ) {
313312 return ;
314313 }
315314
316315 if (pickResult.clearColor) {
317- _changeColor (context, controller, true , null );
316+ _changeColor (controller, true , null );
318317 } else {
319- _changeColor (context, controller, true , pickResult.color);
318+ _changeColor (controller, true , pickResult.color);
320319 }
321320 },
322321 );
0 commit comments