Skip to content

shellhong6/flutter_stretchable_text_view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_stretchable_text_view

a library for stretchable and shrinkable text view.

  • just like the image below:

How to Use

# add this line to your dependencies
flutter_stretchable_text_view: ^1.0.0+1
import 'package:flutter_stretchable_text_view/main.dart';
// simple demo
StretchableTextView(
  text: 'your text...'
)
// complex demo
StretchableTextView(
  maxLines: 4, // default value is 3
  suffix: '......', // default value is ...
  spreadBtn: TextSpan(
    text: 'more', // default value is 更多
    style: TextStyle(
      color: Colors.blueGrey,
    ),
  ),
  textStyle: TextStyle(
    height: 1.2,
    fontSize: 12,
    color: Colors.black,
  ),
  text: 'your text...'
)
  • getting example about flutter app, view: books_app

Show some ❤️ and star the repo to support the project