텍스트 내에서 사용자 정의 하이라이트 및 클릭 가능한 링크 참조를 포함한 풍부한 텍스트 렌더링을 가능하게 하는 플러터 패키지입니다. 개발자가 텍스트 흐름 내에 강조된 키워드와 하이퍼링크 같은 상호작용 요소를 직접 삽입할 수 있도록 표준 텍스트 위젯을 확장합니다. 동적 스타일링과 탐색 기능을 갖춘 기사, 채팅 메시지 또는 문서와 같은 형식화된 콘텐츠를 표시하는 데 이상적입니다. 이 패키지는 Android, iOS, 웹, macOS, Windows, Linux 등 여러 플랫폼을 지원합니다.
사용 사례
서식이 지정된 기사 표시
인터랙티브 채팅 메시지 만들기
링크를 사용하여 문서 렌더링
텍스트 내 키워드 강조
풍부한 노트 작성 앱 구축
주요 기능
사용자 정의 텍스트 강조
클릭 가능한 링크 참조
크로스 플랫폼 지원
확장 가능한 텍스트 스타일
기존 위젯과의 간편한 통합
적합한 대상
풍부한 텍스트 UI를 구축하는 개발자
상호작용형 텍스트 콘텐츠가 필요한 앱
콘텐츠 중심 애플리케이션
교육 또는 문서 플랫폼
채팅 또는 메시지 인터페이스
고려 사항
터치 제스처를 신중하게 처리해야 합니다
복잡한 레이아웃을 위해 추가 스타일링이 필요할 수 있습니다
기본 하이퍼링크 기능에 국한됨
기능이 풍부한 WYSIWYG 에디터에는 적합하지 않습니다
큰 텍스트 블록과 함께하는 성능 영향
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Custom RichText
CustomRichText is a package that allows highlighting and link reference to the text.
Key Features
Highlights email, phone number, web link, custom RegExp, certain sub-strings
Provides a call back on each highlighted string
Option for read more, read less and a call back for both
Allow text styling as per requirement
Note
If you want to highlight any specific type of text then need to add the following on tap method.
If any link or email consists the provided sub-string then it will ignore that and will be highlighted as web link or email.
CustomRichText(
text: 'MindInventory is first-rate choice of the '
'clients worldwide. With sheer customer satisfaction in mind, we are profoundly '
'dedicated to developing highly intriguing apps that strictly meet the business '
'requirements and catering a wide spectrum of projects. Kickstart Your Digital '
'Journey Today and get all your queries and concerns answered by our business '
'development team. Our email address is sales@mindinventory.com, our website '
'https://www.mindinventory.com and our Contact number is +91-951-229-3490',
caseSensitive: false,
readMoreLessModel: ReadMoreLessModel(
trimLines: 3,
readMoreText: ' read more',
readLessText: ' read less',
readMoreLessStyle: kReadMoreLessStyle,
),
textStyle: kTextStyle,
linkStyle: kLinkStyle,
highlightTermsStyle: kLinkStyle,
onWebLinkTap: (web) async {
await launch(web);
},
onPhoneTap: (phone) async {
await launch('tel:$phone');
},
onEmailTap: (email) async {
await launch('mailto:$email');
},
highlightTerms: [kMindinventory],
onTermTap: (text) async {
await launch('https://www.mindinventory.com/');
},
),
Guideline for contributors
Contribution towards our repository is always welcome, we request contributors to create a pull request to the develop branch only.
Guideline to report an issue/feature request
It would be great for us if the reporter can share the below things to understand the root cause of the issue.
Library version
Code snippet
Logs if applicable
Device specification like (Manufacturer, OS version, etc)
Screenshot/video with steps to reproduce the issue
We’d be really happy if you send us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.