ruby_text 2.0.2 copy "ruby_text: ^2.0.2" to clipboard
ruby_text: ^2.0.2 copied to clipboard

A RubyText widget, you can easily use this library to achieve the furigana effect.

RubyText #

Pub

A ruby text widget with flutter.

Install #

dependencies:
    ruby_text: <Latest version.>

Example #

  RubyText(
    [
      RubyTextData(
        '検査',
        ruby: 'けんさ',
      ),
    ],
  );

Other #

  RubyText(
    this.data, {
    this.style,
    this.rubyStyle,
    this.onTapDown,
    this.onTapUp,
    this.onTap,
    this.onTapCancel,
    this.textAlign,
    this.textDirection,
    this.softWrap,
    this.overflow,
    this.maxLines,
  });

  RubyTextData(
    this.text, {
    this.ruby,
    this.style,
    this.rubyStyle,
    this.onTapDown,
    this.onTapUp,
    this.onTap,
    this.onTapCancel,
  });

// if you want to can use buildRubySpan 

WidgetSpan buildRubySpan(
  String text, {
  String ruby,
  BuildContext context,
  TextStyle style,
  TextStyle rubyStyle,
  GestureTapDownCallback onTapDown,
  GestureTapUpCallback onTapUp,
  GestureTapCallback onTap,
  GestureTapCancelCallback onTapCancel,
})
36
likes
120
pub points
79%
popularity

Publisher

verified publisheryeungkc.com

A RubyText widget, you can easily use this library to achieve the furigana effect.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on ruby_text