Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[QUESTION] How to remove dragbar #42

Closed
fynn-lemburg opened this issue May 17, 2021 · 11 comments
Closed

[QUESTION] How to remove dragbar #42

fynn-lemburg opened this issue May 17, 2021 · 11 comments
Labels
question Further information is requested

Comments

@fynn-lemburg
Copy link

Hi,
Is there a way to remove this dragbar at the bottom of HtmlEditor
and disable scrolling?

Bildschirmfoto 2021-05-17 um 16 19 14

@fynn-lemburg fynn-lemburg added the question Further information is requested label May 17, 2021
@tneotia
Copy link
Owner

tneotia commented May 17, 2021

Yes, you can do controller.setFullscreen() to accomplish this. If you want it on editor startup use the onInit callback.

@tneotia
Copy link
Owner

tneotia commented May 18, 2021

Closing for now, hope it helped!

@tneotia tneotia closed this as completed May 18, 2021
@Fauzdar1
Copy link

I don't understand why does it not let the page scroll in Flutter web? Why it eats up all the scroll events even when setting a fix height, auto scroll or even full screen?

@tneotia
Copy link
Owner

tneotia commented Jul 10, 2021

@Fauzdar1 unfortunately this is just how the webviews work in flutter. If I disable scrolling, then the user cannot scroll the content they have entered in the editor. Nothing I can do here, but I am considering creating a native version of the editor which should resolve these issues. This will take a while though

@iBog
Copy link

iBog commented Feb 7, 2022

Yes, you can do controller.setFullscreen() to accomplish this. If you want it on editor startup use the onInit callback

Not a solution, it causes an ugly blink effect when bottom panel disappear in a second

@tneotia
Copy link
Owner

tneotia commented Feb 12, 2022

The blink effect is likely the editor initializing, removing the dragbar should not have any blink effect.

@iBog
Copy link

iBog commented Feb 18, 2022

Example, feeback dialog with default bottom dragbar
editor_with_line
with applied controller.setFullscreen() in Callbacks onInit:
editor_with_no_line

@Fauzdar1
Copy link

Hey @iBog, can you please share your code, as I've been using it in a dialog and previously, used it without a dialog, and I didn't, even now don't face this issue.

My code:

HtmlEditor(
 key: editorKey,
 controller: htmlEditorController,
 callbacks: Callbacks(onInit: () {
   htmlEditorController.setFullScreen();
 }),
 otherOptions: OtherOptions(height: 300),
 htmlEditorOptions: HtmlEditorOptions(
   autoAdjustHeight: false,
   hint: hint,
)),

@tneotia
Copy link
Owner

tneotia commented Feb 19, 2022

@iBog I'll be honest I don't see much of a difference. Out of curiosity maybe delay the setFullscreen by a few seconds to see specifically what effect that command has on the editor flickering?

@iBog
Copy link

iBog commented Feb 21, 2022

@Fauzdar1 @tneotia thanks for your attention!
I think the flickering reason not in setFullScreen method,
the most similar issue is in native webview: flutter/flutter#27198
Slowed demo with pure code from @Fauzdar1 above this post, plus
androidUseHybridComposition: false, to prevent Gl_surface crash,
emulator "Pixel 5 API 29 (Android 10)"
added 1 second Delay before apply setFullScreen

Can't attach file anymore ((
https://media.giphy.com/media/wGzI4TKyW2DHnuHG9y/giphy.gif

Also doesn't make sense reproduce this issue on 120Hz screen devices )

@iBog
Copy link

iBog commented Feb 21, 2022

Show Dialog code:

showGeneralDialog(
      context: context,
      barrierDismissible: true,
      barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
      barrierColor: Colors.black54,
      transitionDuration: const Duration(milliseconds: 100),
      pageBuilder: (context, anim1, anim2) {
        return Center(
          child: Container(
            width: width,
            height: height,
            child: StatefulBuilder(
              builder: (context, snapshot) {
                return Card(
                  color: backgroundColor,
                  shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(8.0)),
                  child: HtmlEditor(....),
                );
              },
            ),
          ),
        );
      },
    );

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants