flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

QuillToolbarSelectAlignmentButtons is not exported

Open hjkim-mango opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

Flutter Quill version

10.8.2

Steps to reproduce

Use the class 'QuillToolbarSelectAlignmentButtons'

Expected results

I can use the class 'QuillToolbarSelectAlignmentButtons'.

Actual results

I cannot use the class 'QuillToolbarSelectAlignmentButtons'.

Additional Context

For my custom toolbar, I want to use custom alignment buttons using QuillToolbarSelectAlignmentButtons. But I can not use it… not defined…

In the latest flutter-quill codes, there is no import for QuillToolbarSelectAlignmentButtons in flutter_quill.dart and base_toolbar.dart. Is not QuillToolbarSelectAlignmentButtons class supported? Or Should I import something to use it?

Screenshots / Video demonstration Screenshot 2024-10-14 at 11 28 09 AM
Logs
[Paste your logs here]

hjkim-mango avatar Oct 14 '24 02:10 hjkim-mango

Does importing the file from the source fix the issue?

// Avoid using this in production
import 'package:flutter_quill/src/toolbar/buttons/alignment/select_alignment_buttons.dart';

FYI: You shouldn't import files from packages using the source path directly as you will face unexpected breaking changes. This question is to confirm the issue.

EchoEllet avatar Oct 14 '24 02:10 EchoEllet

When I import the source file directly, I can use it but something's wrong in UI, I don't know why... Anyway I've solved to create custom alignment buttons using QuillToolbarToggleStyleButton class.

I found out that QuillToolbarToggleStyleButton was used in the QuillToolbarSelectAlignmentButtons source code.

Thanks for helping.

hjkim-mango avatar Oct 14 '24 04:10 hjkim-mango

It looks like the file isn't exported, I will review this as soon as I have the time.

EchoEllet avatar Oct 14 '24 10:10 EchoEllet

Maybe not the same, but I experienced related issue:

Simple toolbar uses internal QuillToolbarSelectAlignmentButtons while QuillToolbarSelectAlignmentButton (which was supposed to be dropdown) are not showing since there's missing builder parameter in MenuAnchor which makes it unusable. So QuillToolbarSelectAlignmentButton looks like dead code right now. Users have to create dropdown menu by themselves.

kacpmu avatar Dec 14 '24 21:12 kacpmu