visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
283 stars 44 forks source link

Sys - Remove Tuple package dependency #45

Closed adrian-moisa closed 2 years ago

adrian-moisa commented 2 years ago

Atm, there is a dependency to the tuple package which I think should be either removed or should be exposed so visual-editor users won't have to import the tuple package as well. I add to import the package manually to edit the lineSpacing for instance:

quill.VisualEditor(
                customStyles: quill.DefaultStyles(
                    paragraph: quill.DefaultTextBlockStyle(
                  Theme.of(context).textTheme.bodyText2!,
                  const Tuple2(8, 0),
                  const Tuple2(0, 0),
                  null,
                )),
// ....
)

This seems to have been used a lot in the package. However, having a Tuple instead of a concrete class makes the implementation quite obscure. Here for instance, I don't see why the lineSpacing is not a simple double instead of a Tuple.

sebastian0107 commented 2 years ago

When I start working on visual-editor, I had difficulty cloning the repo and running the demo so I made a tutorial to help other users who want to contribute:

  1. Clone the repository using "https://github.com/visual-space/visual-editor.git"
  2. Run flutter pub get and enable dart editor
  3. If you can't run the main.dart you have to change it with the one from example (example is used to run the demo app) -> edit configurations -> set the dart entrypoint with: C:*your path*\visual-editor\example\lib\main.dart
  4. To push commits we have to ask the moderator to give you access.

It can be found also in the README.md

adrian-moisa commented 2 years ago

Congrats! Great work on this ticket!