flutter_text_styled 0.5.3 copy "flutter_text_styled: ^0.5.3" to clipboard
flutter_text_styled: ^0.5.3 copied to clipboard

Flutter package to get styled Text with basic HTML text tags.

example/lib/main.dart

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

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

class StyledPage extends StatefulWidget {
  const StyledPage({super.key});

  @override
  StyledPageState createState() => StyledPageState();
}

class StyledPageState extends State<StyledPage> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Text Style Demo',
      home: Scaffold(
        appBar: AppBar(
          title: const Text("Title"),
        ),
        body: Padding(
          padding: const EdgeInsets.all(8.0),
          child: SingleChildScrollView(
            child: TextStyled(
              textStyle: const TextStyle(
                fontSize: 30,
                color: Colors.grey,
              ),
            ).getRichText(
                "This is normal grey by style text [color=blue]blue text[/color] with [b]bold text[/b] [i]italic text[/i] [u]underlined text[/u] and [color=0xFFFFD600][b][i][u]mixed styled[/b][/i][/u][/color] and [a=https://pub.dev/packages/flutter_text_styled] link to open pub.dev[/a]"),
          ),
        ),
      ),
    );
  }
}
10
likes
140
points
358
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter package to get styled Text with basic HTML text tags.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, url_launcher

More

Packages that depend on flutter_text_styled