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

パッケージ詳細v1.2.1

link_previewer

新しいFlutterパッケージ。インラインリンクやデフォルトのハイパーリンクよりも、リンクをより洗練された見た目にすることを目的としています。

30日間ダウンロード
59
いいね数
14
Pub ポイント
40

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

flutter pub add link_previewer

パッケージ概要

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

Link Previewer は、アプリ内のリンクの視覚的表現を向上させるために設計された Flutter パッケージです。単純な URL を、サムネイル、タイトル、説明、およびリンク先コンテンツから取得したメタデータを含む豊富でインタラクティブなプレビューに変換します。ソーシャルメディアアプリ、メッセージングプラットフォーム、またはユーザーがウェブリンクを共有するすべてのアプリに最適です。リンクをより情報豊かで視覚的に魅力的なものにすることで、ユーザーの関与を高めます。このパッケージは動的レンダリングをサポートしており、既存のテキストウィジェットとシームレスに統合できます。

用途

  • ソーシャルメディアアプリ
  • メッセージインターフェース
  • コンテンツ共有機能
  • ブログまたはニュースフィードの表示
  • ユーザー生成コンテンツプラットフォーム

主な機能

  • リンクのメタデータを自動取得します
  • サムネイルと説明を表示
  • 動的プレビューのレンダリングをサポート
  • テキストウィジェットとの簡単な統合
  • クリーンでカスタマイズ可能なUI

適している対象

  • ソーシャルアプリを開発する開発者
  • ユーザーが共有するリンクを含むアプリ
  • 豊富なリンクの可視化が必要なプロジェクト
  • UX向上に焦点を当てたチーム

注意事項

  • メタデータの取得にはインターネット接続が必要です
  • 多数のプレビューがあるとパフォーマンスに影響する可能性があります
  • HTTP/HTTPS URL に限定
  • オフラインプレビューはサポートされていません
  • 外部サイトのメタタグに依存しています

元の README

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

link_previewer

A new Flutter package. Build container with image, title, description from web-site (link) will be provided.

Getting Started

alt text

Installing

Use this package as a library

  1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  link_previewer: ^1.2.1
  1. Install it

You can install packages from the command line: with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

  1. Import it

Now in your Dart code, you can use:

import 'package:link_previewer/link_previewer.dart';

Usage

Widget build() {
  return Column(
    mainAxisAlignment: MainAxisAlignment.center,
    children: <Widget>[
      LinkPreviewer(
        link: "https://www.linkedin.com/feed/",
        direction: ContentDirection.horizontal,
      ),
      LinkPreviewer(
        link: "https://www.linkedin.com/feed/",
        direction: ContentDirection.vertical,
      ),
    ],
  );
}

Properties (Constructor props)

PropName Value Definition
link String value (Ex: "http://...") Link to website will be shown as LinkPreviewer
titleFontSize double (default: 15, but it's auto resizable depends on layout(parent) width or hight) Title font size
bodyFontSize double (default: 14, but it's auto resizable depends on layout(parent) width or hight) Body font size
backgroundColor Color (default: Colors.white) Background color in case there will be not much text and will be whitespace
borderColor Color (default: Colors.deepOrangeAccent) Border color of the previewer
borderRadius double (default: 3.0) Border radius
direction ContentDirection from the package (default: ContentDirection.horizontal) Options: 1. ContentDirection.horizontal 2. ContentDirection.vertical Content direction (image -> title -> body)
From version 1.1.0
PropName Value Definition
placeholder Widget Custom placeholder while data is loading
defaultPlaceholderColor Color (default: light-grey) If placeholder is not set, will be used the default one and its color can be set using this prop (empty container with background)
showTitle bool (default: true) Title can be hiden using this prop, if it set to false
showBody bool (default: true) Body can be hiden using this prop, if it set to false
From version 1.2.0
PropName Value Definition
bodyTextOverflow TextOverflow (default: TextOverflow.ellipsis or TextOverflow.fade) Text overflow prop
bodyMaxLines int (default: depends on hight) Max Lines that will be shown in the body

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

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

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