singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.6k stars 839 forks source link

QuillToolbarSelectAlignmentButtons is not exported #2315

Open hjkim-mango opened 1 month ago

hjkim-mango commented 1 month ago

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 ```console [Paste your logs here] ```
EchoEllet commented 1 month ago

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.

hjkim-mango commented 1 month ago

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.

EchoEllet commented 1 month ago

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