platform_text

Last updated:

0 purchases

platform_text Image
platform_text Images
Add to Cart

Description:

platform text

PlatformText #
A Flutter package to make your text selectable for web and non-selectable for native builds.



Features #
PlatformText returns Text or SelectableText widget depending on the platform it's running on.

Native → Text
Web → SelectableText

Getting started #
Follow official installation guide. see more...
Usage #
PlatformText supports two constructors/widget classes: Text and SelectableText.
To migrate existing code just replace Text/SelectableText widget with PlatformText.

Create a PlatformText widget.

PlatformText('Hello mom!');
copied to clipboard

Create a PlatformText widget with the InlineSpan.

PlatformText.rich(
TextSpan(
text: 'Hello',
children: <TextSpan>[
TextSpan(
text: ' beautiful ',
style: TextStyle(fontStyle: FontStyle.italic),
),
TextSpan(
text: 'mom!',
style: TextStyle(fontWeight: FontWeight.bold),
),
],
),
);
copied to clipboard
Support #
If you like my package you can buy me a coffee.
buymeacoffee.com/rozpo.dev
Additional information #

Package maintainer: Piotr Rozpończyk rozpo.dev
Technical writer: Dawid Ratusz
Bug reporting: issues
Source code: gitlab

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.