https://github.com/taym95/flutter_read_more_text
flutter_read_more_text
https://github.com/taym95/flutter_read_more_text
flutter flutter-ui flutter-widget readmore
Last synced: about 1 year ago
JSON representation
flutter_read_more_text
- Host: GitHub
- URL: https://github.com/taym95/flutter_read_more_text
- Owner: Taym95
- License: mit
- Created: 2019-06-13T13:14:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-13T13:48:08.000Z (about 7 years ago)
- Last Synced: 2023-08-20T22:04:26.837Z (almost 3 years ago)
- Topics: flutter, flutter-ui, flutter-widget, readmore
- Language: Dart
- Size: 63.5 KB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_read_more_text

### Installation
Add `flutter_read_more_text` to your `pubspec.yamlfile`.
### Usage
```dart
import 'package:flutter/material.dart';
import 'package:flutter_read_more_text/flutter_read_more_text.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
final text = 'What is Lorem Ipsum?\nLorem Ipsum is simply dummy
text of the printing and typesetting industry.
Lorem Ipsum has been the industry standard dummy text ever since the 1500s,
when an unknown printer took a galley
of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap
into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of
Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus
PageMaker including versions of Lorem Ipsum';
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Your app'),
),
body: ReadMoreText(text),
),
);
}
}
```