hnvn/flutter_image_cropper

7.0.3 WebUiSettings customDialogBuilder expects a Dialog, not a widget

blaneyneil opened this issue · 2 comments

When creating a stateful widget for WebUiSettings, per your updated example, so that it can be initialized:

@override
    void initState() {
      super.initState();
      /// IMPORTANT: must to call this function
      widget.initCropper();
    }

the customDialogBuilder will not actually take a widget. it's throwing with this error:

The return type '_CropperWidget' isn't a 'Dialog', as required by the closure's context.

hnvn commented

that's my bug, customDialogBuilder should return Widget instead, I've just release 7.0.4 to fix it. Please have a try

Yep, thanks much. I still had to wrap it in a Dialog for my custom design purposes, but it properly takes any widget now.