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

Overview

PlatformText

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

pipeline status coverage report latest release

Features

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

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.

PlatformText('Hello mom!');
PlatformText.rich(
  TextSpan(
    text: 'Hello',
    children: <TextSpan>[
      TextSpan(
        text: ' beautiful ',
        style: TextStyle(fontStyle: FontStyle.italic),
      ),
      TextSpan(
        text: 'mom!',
        style: TextStyle(fontWeight: FontWeight.bold),
      ),
    ],
  ),
);

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
You might also like...

Let's create a selectable Flutter Navigation Drawer with routing that highlights the current item within the Flutter Sidebar Menu.

Let's create a selectable Flutter Navigation Drawer with routing that highlights the current item within the Flutter Sidebar Menu.

Flutter Tutorial - Sidebar Menu & Selectable Navigation Drawer Let's create a selectable Flutter Navigation Drawer with routing that highlights the cu

Dec 26, 2022

how to Integrating facebook audience network to flutter app for banner, interstitial, rewarded, native and native banner

fb_ads_flutter_12 A new Flutter project. Getting Started Watch the complite tutorial for integrating Facebook ads into the Flutter app in our Youtube

Nov 26, 2022

Grad text package - A Flutter Widget to draw gradients into text

Grad text package - A Flutter Widget to draw gradients into text

grad_text A Flutter Widget to draw gradients into text.(Null safe) Demo Install

Jan 31, 2022

Easy-to-make native ads in flutter using AdMOB SDK.

native_admob_flutter Easy-to-make ads in Flutter with Google's AdMob SDK. English | Português Get started To get started with Native Ads for Flutter,

Dec 12, 2022

Learn to make beautiful, native apps for Android & iOS

Learn to make beautiful, native apps for Android & iOS

name title subtitle description speaker flutter Flutter Learn to make beautiful, native apps for Android & iOS Flutter is a cross-platform, mobile dev

Nov 4, 2019

Flutter native ads - Show AdMob Native Ads use PlatformView

Flutter native ads - Show AdMob Native Ads use PlatformView

flutter_native_ads Flutter plugin for AdMob Native Ads. Compatible with Android and iOS using PlatformView. Android iOS Getting Started Android Androi

Dec 20, 2022

react-native native module for In App Purchase.

react-native native module for In App Purchase.

Documentation Published in website. Announcement Version 8.0.0 is currently in release candidate. The module is completely rewritten with Kotlin and S

Dec 31, 2022

dna, dart native access. A lightweight dart to native super channel plugin

dna, dart native access. A lightweight dart to native super channel plugin, You can use it to invoke any native code directly in contextual and chained dart code.

Jul 11, 2022

Detectable text field - Flutter Text widgets with detection features

Detectable text field - Flutter Text widgets with detection features

detectable_text_field Text widgets with detection features. You can detect hasht

Feb 2, 2022
Owner
Piotr Rozpończyk
With great code, comes great responsibility
Piotr Rozpończyk
Masked text field - A flutter package for masked text field for formet your text and good UI

Masked Text Field Masked Text Field Features A package for masked text field for

Alok Dubey 7 Sep 4, 2022
This is a Flutter app which shows how to use the Selectable Text in your app

selectable_text A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Shehzaan Mansuri 1 Oct 25, 2021
This is a flutter app which uses the Bitrise Api(https://api-docs.bitrise.io/) to show the bitrise projects and builds and lets you download your artifacts.

Bitrise Artifact Downloader Introduction ??‍♂️ This is a flutter app which uses the Bitrise Api(https://api-docs.bitrise.io/) to show the bitrise proj

Jens Klingenberg 9 Apr 30, 2021
Flutter's compute function made available for all non-Flutter Dart programs

compute Flutter's compute function made available for all non-Flutter Dart programs The compute package takes Flutter's compute function and makes it

dartside.dev 6 Nov 10, 2022
Text analyzer that extracts tokens from text for use in full-text search queries and indexes.

Tokenize text, compute document readbility and compare terms in Natural Language Processing. THIS PACKAGE IS PRE-RELEASE, and SUBJECT TO DAILY BREAKIN

GM Consult Pty Ltd 5 Dec 12, 2022
Meal-App-flutter - Meal App builds with flutter

Meal App - flutter In our complete chat app. I create a nice clean archetecture

null 0 Feb 2, 2022
Flutter package that provide selectable items in list like Column

vertical_picker vertical_picker is flutter package that you can use it as item selector. users with this package be able to select item that is in ver

Sajad Rahimi 6 Nov 19, 2022
Selectable Circle where colors can be customized and a child widget can be defined

selectable_circle A Flutter package for an Circle that can be Selected with animation. How to use SelectableCircle( width: 80.0, onSelected: (

null 11 Sep 29, 2021
An Instagram like text editor Flutter widget that helps you to change your text style.

TextEditor An instagram like text editor widget for flutter Show some ❤️ and star the repo to support the project Features Edit TextStyle object font

Mehdi Zarepour 68 Dec 16, 2022
A text field that displays text on different languages based on your selection.

translatable_text_field A text field that displays text on different languages based on your selection. Its basic idea is that you place this fields i

null 0 Mar 13, 2022