v1.2.1
link_previewer
새로운 Flutter 패키지입니다. 단순한 인라인 링크나 기본 하이퍼링크보다 링크를 더 예쁘게 보이게 만들기 위해 제작되었습니다.
14좋아요 5930일 다운로드40Pub 점수
플랫폼 정보 없음
Flutter용 패키지입니다. 예쁜 링크 미리보기를 생성합니다.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A new Flutter package. Build container with image, title, description from web-site (link) will be provided.
Use this package as a library
Add this to your package's pubspec.yaml file:
dependencies:
link_previewer: ^1.2.1
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.
Now in your Dart code, you can use:
import 'package:link_previewer/link_previewer.dart';
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,
),
],
);
}
| 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) |
| 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 |
| 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 |
의존성 목록 6 개
{"sdk":"flutter"}^2.0.8^0.14.0+2^0.12.0+2^5.1.1{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗