flutter_text_helpers 1.0.1 flutter_text_helpers: ^1.0.1 copied to clipboard
A widget collection which simplifies the usage of Text(). No need to use Theme.of(context) to access textTheme elements like bodytext1 or headline1, etc.
Flutter Text Helpers #
A collection of widgets which simplifies the usage of Text()
Usage #
Import package:
import 'package:flutter_text_helpers/flutter_text_helpers.dart';
Use as widget instead of Text()
Column(widgets: [
// Shortcut for Text('Body text', style: Theme.of(context).textTheme.bodyText)
BodyText1('Body text'),
//Shortcut for Text('Body text', style: Theme.of(context).textTheme.bodyText.copyWith(color: Colors.blue))
BodyText1('Body text', color: Colors.blue),
//Shortcut for Text('Body text', style: Theme.of(context).textTheme.bodyText.copyWith(color: Colors.blue, fontSize: 12))
BodyText1('YourBody text', color: Colors.blue, fontSize: 12),
// All parameters that Text() uses are still available
BodyText('Your text', style: TextStyle(color: Colors.blue), overflow: Overflow.elipsis)
])
Available Widgets #
BodyText1()
BodyText2()
HeadlineText1()
HeadlineText2()
HeadlineText3()
HeadlineText4()
HeadlineText5()
HeadlineText6()
SubtitleText1()
SubtitleText2()
ButtonText()
CaptionText()
OverlineText()
Features and bugs #
Please file feature requests and bugs at the issue tracker.