flutter_open_chinese_convert
1.0.0, released 3 months ago by zonble.net
Bridges OpenCC to Flutter for converting Simplified/Traditional Chinese text.
What it does
Provides a Dart API to convert Chinese text between Simplified and Traditional forms with regional standards. Supports Android, iOS, and Web, with optional background processing and web‑specific fallback handling.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need offline or on‑device Chinese script conversion
- You target multiple platforms (mobile and web) and want a single API
- You want to process large texts without blocking the UI
Skip it when
- You require full translation or language understanding
- You need idiom conversion on web without fallback
Strengths
- Multiple conversion options covering regional standards
- Background thread support for large inputs
- Works on Android, iOS, and Web with automatic CDN loading
Weaknesses
- Web implementation lacks some idiom options (e.g., TW2Sp)
- First web conversion requires internet to load the CDN library
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add the package to pubspec.yaml; for web you may optionally preload the opencc-js script in index.html.
import 'package:flutter_open_chinese_convert/flutter_open_chinese_convert.dart';
void main() async {
var text = '鼠标里面的硅二极管坏了,导致光标分辨率降低。';
var result = await ChineseConverter.convert(text, S2TWp());
print(result); // 滑鼠裡面的矽二極體壞了,導致游標解析度降低。
}Alternatives
Packages that do the same job and could replace flutter_open_chinese_convert.
- ogp_data_extract
Extracts Open Graph protocol metadata and favicons from web pages.
48Compare - hex
Provides simple HEX.encode and HEX.decode functions for converting between byte lists and hexadecimal strings.
47Compare - string_to_color
Convert strings to colors, hex strings, or hex integers in Dart and Flutter.
42Compare
Works with
Packages commonly used together with flutter_open_chinese_convert: ones it builds on, ones built on it, and its own family.