faded_text 0.0.1 faded_text: ^0.0.1 copied to clipboard
The package for creating fading text in case of overflow
Faded Text #
This package is part of the SurfGear toolkit made by Surf.
Description #
Faded Text is a package that allows you to create a fading text in case of overflow.
Installation #
Add faded_text
to your pubspec.yaml
file:
dependencies:
faded_text: $currentVersion$
At this moment, the current version of faded_text
is .
Example #
You need to create an instance of the FadedText
class like a regular Text
. The text will overflow according to maxLines
, which by default corresponds to 1.
FadedText(
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur siƒnt occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum',
maxLines: 5,
)
You can also create FadedText.rich
like regular Text.rich
.
FadedText.rich(
TextSpan(
children: [
TextSpan(
text:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. '),
TextSpan(
text:
'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
style: TextStyle(fontWeight: FontWeight.bold),
),
],
),
maxLines: 4,
)
Changelog #
All notable changes to this project will be documented in this file.
Issues #
To report your issues, file directly in the Issues section.
Contribute #
If you would like to contribute to the package (e.g. by improving the documentation, fixing a bug or adding a cool new feature), please read our contribution guide first and send us your pull request.
Your PRs are always welcome.
How to reach us #
Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.