rich_text_writer 0.0.5 copy "rich_text_writer: ^0.0.5" to clipboard
rich_text_writer: ^0.0.5 copied to clipboard

A Rich text writer for Flutter.

example/lib/main.dart

import 'package:example/demos.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'RichTextWriter Example',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _demoIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
      ),
      body: Container(
        padding: const EdgeInsets.only(
          top: 100,
          left: 200,
          right: 200,
        ),
        alignment: Alignment.center,
        child: demos[_demoIndex](context),
      ),
      floatingActionButton: _demoIndex + 1 < demos.length
          ? FloatingActionButton.extended(
              label: const Text('Next'),
              onPressed: () {
                setState(() {
                  _demoIndex++;
                });
              },
            )
          : null,
    );
  }
}
7
likes
140
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A Rich text writer for Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on rich_text_writer