パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.0.3

custom_rich_text

テキストのハイライトおよびリンク参照を可能にするカスタムリッチテキストパッケージ。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
135
いいね数
36
Pub ポイント
140

パッケージをインストール

flutter pub add custom_rich_text

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutterパッケージで、テキスト内にカスタマイズ可能なハイライトとクリック可能なリンク参照を含むリッチテキストのレンダリングを可能にします。標準的なテキストウィジェットを拡張し、開発者がテキストフロー内にハイライトされたキーワードやハイパーリンクなどのインタラクティブな要素を直接埋め込めるようにします。記事、チャットメッセージ、または動的スタイルとナビゲーションを備えたドキュメントのようなフォーマットされたコンテンツを表示するのに最適です。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど複数のプラットフォームをサポートしています。

用途

  • フォーマットされた記事を表示しています
  • インタラクティブなチャットメッセージの作成
  • リンク付きドキュメントのレンダリング
  • テキスト内のキーワードを強調する
  • 豊富なノート作成アプリの構築

主な機能

  • カスタムテキストのハイライト
  • クリック可能なリンク参照
  • クロスプラットフォーム対応
  • 拡張可能なテキストスタイル
  • 既存のウィジェットとの簡単な統合

適している対象

  • 豊富なテキストUIを構築する開発者
  • インタラクティブなテキストコンテンツを必要とするアプリ
  • コンテンツ重視のアプリケーション
  • 教育またはドキュメンテーションプラットフォーム
  • チャットまたはメッセージインターフェース

注意事項

  • タップジェスチャーの慎重な処理が必要です
  • 複雑なレイアウトには追加のスタイリングが必要になる場合があります
  • 基本的なハイパーリンク機能に限定
  • 機能豊富な WYSIWYG エディタには適していません
  • 大規模なテキストブロックによるパフォーマンスへの影響

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Custom RichText

CustomRichText is a package that allows highlighting and link reference to the text.

Image Plugin

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.

Getting Started

To use this package, add custom_rich_text as a dependency in your pubspec.yaml file.

dependencies:
  ...
  custom_rich_text: any

Now in your Dart code, you can use:

 import 'package:custom_rich_text/custom_rich_text.dart';

Usage

Example
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

LICENSE!

Custom RichText is MIT-licensed.

Let us know!

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.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。