BudouX-Dart

pub package

This is the Dart implementation of BudouX.

This is referencing the Java implementation of Release v0.6.2 · google/budoux.

Flutter Example

# pubspec.yaml
flutter:
  assets:
    - packages/budoux_dart/models/ja.json
    # or ja_knbc.json
    # or zh-hans.json
    # or zh-hant.json
    # or th.json
  final budouX = BudouX(
    await rootBundle.loadString('packages/budoux_dart/models/ja.json'),
    // or ja_knbc.json
    // or zh-hans.json
    // or zh-hant.json
    // or th.json
  );
return Scaffold(
  body: DefaultTextStyle(
    style: const TextStyle(
      fontSize: 48,
      color: Colors.black,
    ),
    child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        const Text('今日はいい天気ですね。'),
        const Divider(),
        Wrap(
          children: budouX
              .parse(
                '今日はいい天気ですね。',
              )
              .map(Text.new)
              .toList(),
        ),
      ],
    ),
  ),
);
スクリーンショット 2023-09-25 17 59 52

Libraries

budoux