apptomate_custom_text 0.0.2 copy "apptomate_custom_text: ^0.0.2" to clipboard
apptomate_custom_text: ^0.0.2 copied to clipboard

A versatile text display widget with advanced features like read-more functionality, text selection, and customizable styling.

example/lib/main.dart

import 'package:apptomate_custom_text/apptomate_custom_text.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Center(
          child: Padding(
            padding: const EdgeInsets.all(18.0),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                CustomText(
                    txtName: "SampleText1",
                    style: TextStyle(
                        fontWeight: FontWeight.w300, color: Colors.red)),
                CustomText(
                    txtName: "SampleText2",
                    margin: EdgeInsets.symmetric(vertical: 16),
                    style:
                        TextStyle(fontSize: 22, fontWeight: FontWeight.bold)),
                CustomText(
                  txtName: "Selectable Text",
                  maxLines: 1,
                  isSelectableText: true,
                  style: TextStyle(color: Colors.black, fontSize: 25),
                  align: TextAlign.end,
                ),
                CustomText(
                  txtName:
                      "Before we get into 7 specific examples of the best text messages to customers, what factors should you actually consider when thinking about the best sample text messages?",
                  style: TextStyle(
                      fontWeight: FontWeight.w400, color: Colors.purple),
                  maxLines: 4,
                  margin: EdgeInsets.symmetric(vertical: 16),
                  align: TextAlign.start,
                ),
                CustomText(
                  maxLines: 2,
                  isReadMore: true,
                  onTap: () {
                    print("Text Pressed");
                  },
                  txtName:
                      "Before we get into 7 specific examples of the best text messages to customers, what factors should you actually consider when thinking about the best sample text messages?",
                  style: TextStyle(
                      color: Colors.black, fontWeight: FontWeight.w300),
                  align: TextAlign.start,
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

A versatile text display widget with advanced features like read-more functionality, text selection, and customizable styling.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, readmore

More

Packages that depend on apptomate_custom_text