marcusedu / flutter_show_more

Flutter widget for limiting the amount of text to show

Home Page:https://pub.dartlang.org/packages/flutter_show_more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flutter_show_more

Flutter widget for limiting the amount of text to show.

pub package

Installation

Add this to your package's pubspec.yaml file

dependencies:
  ...
  flutter_show_more: ^latest.version.here

Usage

First import show_more.dart

import 'package:flutter_show_more/flutter_show_more.dart';

ShowMoreText with all attributes

ShowMoreText(
  veryLongText,
  maxLength: 100,
  style: TextStyle(fontSize: 12, color: Colors.grey),
  showMoreText: 'show more',
  showMoreStyle: TextStyle(
  fontSize: 12,
    fontWeight: FontWeight.bold,
    color: Theme.of(context).accentColor,
  ),
  shouldShowLessText: true,
  showLessText: 'show less',
),

Screenshots

License

MIT License

About

Flutter widget for limiting the amount of text to show

https://pub.dartlang.org/packages/flutter_show_more

License:MIT License


Languages

Language:Dart 86.5%Language:Objective-C 9.1%Language:Java 4.4%