memspace / zefyr

Soft and gentle rich text editing for Flutter applications.

Home Page:https://zefyr-editor.gitbook.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: ZefyrEmbedBuilder add ZefyrController parameter

taojoe opened this issue · comments

make ZefyrEmbedBuilder add ZefyrController as third parameter, so the embed builder can change itself by controller.

it's required when building a image cropper or image resizer.

typedef ZefyrEmbedBuilder = Widget Function(
    BuildContext context, EmbedNode node, ZefyrController controller);

Hi,

not sure what's the official reason for the API.

Just in case you can do something along those lines:

            ZefyrEditor(
              controller: controller,
              focusNode: focusNode,
              embedBuilder: (context, node) => yourEmbedBuilder(context, node, controller),
            ),

Hi,

not sure what's the official reason for the API.

Just in case you can do something along those lines:

            ZefyrEditor(
              controller: controller,
              focusNode: focusNode,
              embedBuilder: (context, node) => yourEmbedBuilder(context, node, controller),
            ),

Thanks, it's good.

Great. Lets close then.

😁