All Projects → yungzhu → flutter_link_preview

yungzhu / flutter_link_preview

Licence: MIT License
This is a Flutter URL preview plugin for Flutter that previews the content of a URL

Programming Languages

dart
5743 projects
ruby
36898 projects - #4 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to flutter link preview

tube2gif
Search and Generate Gif from Youtube
Stars: ✭ 21 (-67.19%)
Mutual labels:  gif
GifBackgroundView
Gif background view demo
Stars: ✭ 21 (-67.19%)
Mutual labels:  gif
ls refresher
ls_refresher
Stars: ✭ 12 (-81.25%)
Mutual labels:  gif
Countdown-Gif-Generator
Generates a gif of a countdown clock at the endpoint that can be used on websites and in emails
Stars: ✭ 21 (-67.19%)
Mutual labels:  gif
imagor
Fast, Docker-ready image processing server in Go and libvips
Stars: ✭ 2,276 (+3456.25%)
Mutual labels:  gif
gcnet
GCNet (GIF Caption Network) | Neural Network Generated GIF Captions
Stars: ✭ 14 (-78.12%)
Mutual labels:  gif
img2gcode
convert jpg, png,gif to gcode with nodejs and jimp
Stars: ✭ 31 (-51.56%)
Mutual labels:  gif
ProcessingStuff
Various pretty-ish Processing sketches by Odditica. About 50% shaders.
Stars: ✭ 164 (+156.25%)
Mutual labels:  gif
ZLPhotoBrowser-objc
(ZLPhotoBrowser oc 版本)轻量级照片选择框架,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑裁剪图片/视频,支持多语言国际化等功能
Stars: ✭ 54 (-15.62%)
Mutual labels:  gif
animwall
Animated wallpapers for Linux
Stars: ✭ 28 (-56.25%)
Mutual labels:  gif
durdraw
Animated Unicode, ANSI and ASCII Art Editor for Linux/Unix/macOS
Stars: ✭ 55 (-14.06%)
Mutual labels:  gif
GifWriter.js
GIF (version 89a) Encoder written in TypeScript
Stars: ✭ 41 (-35.94%)
Mutual labels:  gif
reactnative-gallery-web
🎬 visualize RN apps at a glance
Stars: ✭ 54 (-15.62%)
Mutual labels:  gif
glips
screen clip to gif on web
Stars: ✭ 18 (-71.87%)
Mutual labels:  gif
GodotRecorder
A simple addon to record frames of in-game footage.
Stars: ✭ 47 (-26.56%)
Mutual labels:  gif
KGySoft.Drawing
KGy SOFT Drawing is a library for advanced image, icon and graphics handling.
Stars: ✭ 27 (-57.81%)
Mutual labels:  gif
AGMobileGiftInterface
simplified interaction with GIF animations
Stars: ✭ 40 (-37.5%)
Mutual labels:  gif
canvas-capture
Record the canvas as an image, mp4 video, or gif from the browser
Stars: ✭ 35 (-45.31%)
Mutual labels:  gif
asciisciit
ASCII Art, Video, and Plotting Toolbox
Stars: ✭ 71 (+10.94%)
Mutual labels:  gif
tenor-android-core
Tenor Android Core
Stars: ✭ 24 (-62.5%)
Mutual labels:  gif

flutter_link_preview

This is a URL preview plugin that previews the content of a URL

Language: English | 中文简体

Demo

Special feature

  • Use multi-processing to parse web pages, avoid blocking the main process
  • Support for content caching and expiration mechanisms to return results faster
  • Better fault tolerance, multiple ways to find icons, titles, descriptions, image
  • Better support gbk code, no messy code
  • Optimized for large files with better crawl performance
  • Support for second hop authentication with cookies
  • Support gif, video and other content capture
  • Supports custom builder

Getting Started

FlutterLinkPreview(
    url: "https://github.com",
    titleStyle: TextStyle(
        color: Colors.blue,
        fontWeight: FontWeight.bold,
    ),
)

Result:

Result Image

Custom Rendering

Widget _buildCustomLinkPreview(BuildContext context) {
  return FlutterLinkPreview(
    key: ValueKey("${_controller.value.text}211"),
    url: _controller.value.text,
    builder: (info) {
      if (info == null) return const SizedBox();
      if (info is WebImageInfo) {
        return CachedNetworkImage(
          imageUrl: info.image,
          fit: BoxFit.contain,
        );
      }

      final WebInfo webInfo = info;
      if (!WebAnalyzer.isNotEmpty(webInfo.title)) return const SizedBox();
      return Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(10),
          color: const Color(0xFFF0F1F2),
        ),
        padding: const EdgeInsets.all(10),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Row(
              children: <Widget>[
                CachedNetworkImage(
                  imageUrl: webInfo.icon ?? "",
                  imageBuilder: (context, imageProvider) {
                    return Image(
                      image: imageProvider,
                      fit: BoxFit.contain,
                      width: 30,
                      height: 30,
                      errorBuilder: (context, error, stackTrace) {
                        return const Icon(Icons.link);
                      },
                    );
                  },
                ),
                const SizedBox(width: 8),
                Expanded(
                  child: Text(
                    webInfo.title,
                    overflow: TextOverflow.ellipsis,
                  ),
                ),
              ],
            ),
            if (WebAnalyzer.isNotEmpty(webInfo.description)) ...[
              const SizedBox(height: 8),
              Text(
                webInfo.description,
                maxLines: 5,
                overflow: TextOverflow.ellipsis,
              ),
            ],
            if (WebAnalyzer.isNotEmpty(webInfo.image)) ...[
              const SizedBox(height: 8),
              CachedNetworkImage(
                imageUrl: webInfo.image,
                fit: BoxFit.contain,
              ),
            ]
          ],
        ),
      );
    },
  );
}

Result Image

Sample code

Click here for a detailed example.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].