custom_text_widget_pro 1.0.6 copy "custom_text_widget_pro: ^1.0.6" to clipboard
custom_text_widget_pro: ^1.0.6 copied to clipboard

Rich Text Formatting Support for custom fonts, colors, and styling.

custom_text_widget_pro #

This Flutter plugin provides a way to customise the textview from the view.

Platform Support #

Android iOS MacOS Web Linux Windows

Requirements #

  • Flutter >=3.19.0
  • Dart >=3.3.0 <4.0.0
  • iOS >=12.0
  • MacOS >=10.14
  • Android compileSDK 34
  • Java 17
  • Android Gradle Plugin >=8.3.0
  • Gradle wrapper >=8.4

Usage #

You can use the TextWidget to customise based your text views on your needs.

import 'package:custom_text_widget_pro/custom_text_widget_pro.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

class SampleCustomText extends StatelessWidget {
  const SampleCustomText({super.key});

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      child: Column(
        children: [
          Container(
            padding: EdgeInsets.all(16),
            child: TextWidget(
                text: "Normal Text",
                size: 16.0,
                color: Colors.black,
                fontWeight: FontWeight.w500,
                textAlign: TextAlign.center),
          ),
          Container(
            padding: EdgeInsets.all(16),
            child: ClickableTextWidget(
                onTap: () => print("Hello Clickable Text"),
                text: "Clickable Text",
                size: 16.0,
                color: Colors.black,
                fontWeight: FontWeight.w500,
                textAlign: TextAlign.center),
          ),
          Container(
            padding: EdgeInsets.all(16),
            child: TextWidget(
                text: "Normal Text with Underline",
                size: 16.0,
                underLine: true,
                underlineColor: Colors.green,
                color: Colors.black,
                fontWeight: FontWeight.w500,
                textAlign: TextAlign.center),
          ),
          Container(
            padding: EdgeInsets.all(16),
            child: RichTextWidget(textSpanList: [
              richTextSpan(
                text: 'Rich Text Span 1 ',
                size: 16.0,
                color: Colors.black,
                fontWeight: FontWeight.w500,
                textAlign: TextAlign.center,
              ),
              richTextSpan(
                underLine: true,
                text: 'Rich Text Span 2 with tap function ',
                size: 20.0,
                color: Colors.green,
                fontWeight: FontWeight.w500,
                textAlign: TextAlign.center,
                recognizer: TapGestureRecognizer()
                  ..onTap = () {
                    // call needed action after click here
                    print("Hello Clickable Rich Text");
                  },
              ),
              richTextSpan(
                text: 'Rich Text Span 3',
                size: 16.0,
                color: Colors.black,
                fontWeight: FontWeight.bold,
                textAlign: TextAlign.center,
              ),
            ]),
          ),
          Container(
            padding: EdgeInsets.all(16),
            child: SelectableTextWidget(
                text: "Selectable Text",
                size: 16.0,
                color: Colors.black,
                fontWeight: FontWeight.w500,
                textAlign: TextAlign.center),
          ),
        ],
      ),
    );
  }
}



2
likes
130
points
61
downloads

Publisher

unverified uploader

Weekly Downloads

Rich Text Formatting Support for custom fonts, colors, and styling.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, path

More

Packages that depend on custom_text_widget_pro