glynskyi / zefyrka

Soft and gentle rich text editing for Flutter applications
MIT License
110 stars 74 forks source link

How to reduce Line Spacing #41

Open ayyyushhhhh opened 2 years ago

ayyyushhhhh commented 2 years ago

Hi, I'm using Zefyrka Package in my flutter web project. But I found some issue in Flutter web.

1 - Zefyrka editor takes 4-5 seconds before someone can use the editor. 2- Line spacing is too much. (Almost like you have enter a new line twice). Is there any way to reduce it?

dthuering commented 2 years ago

Same here. Default line spacing on MacOS target. Looks the same on iOS. Could not find how to set the preferred line height yet. Screenshot 2022-05-29 at 09 23 10

dthuering commented 2 years ago

Found the ZefyrTheme class that is responsible for this kind of setting. Here is an example that changes line height.

SizedBox(
  height: 200,
  child: ZefyrTheme(
    data: ZefyrThemeData.fallback(context).copyWith(
      paragraph: TextBlockTheme(
        style: DefaultTextStyle.of(context).style,
        spacing: VerticalSpacing.zero())),
    child: ZefyrEditor(
      controller: _controller,
    ),
  ),
),