Skip to content

Deprecated "insertImageBlock" What is the alternative #2691

@rashidotm

Description

@rashidotm

Have you checked for an existing issue?

Flutter Quill Version

11.0.0

Steps to Reproduce

"insertImageBlock" is deprecated, no suggestion is given on its replacement. does it mean that it will be totally removed with no replacement or what?

Expected results

give a suggestion on replacement function

  @Deprecated('Invalid extension method and will be removed. **use foo instead**')
  void insertImageBlock({
    required String imageSource,
  }) {
    this
      ..skipRequestKeyboard = true
      ..replaceText(
        index,
        length,
        BlockEmbed.image(imageSource),
        null,
      )
      ..moveCursorToPosition(index + 1);
  }

Actual results

  @Deprecated('Invalid extension method and will be removed.')
  void insertImageBlock({
    required String imageSource,
  }) {
    this
      ..skipRequestKeyboard = true
      ..replaceText(
        index,
        length,
        BlockEmbed.image(imageSource),
        null,
      )
      ..moveCursorToPosition(index + 1);
  }

Additional Context

Screenshots / Video demonstration

[Attach media here]

Logs
[Paste logs here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions