super_rich_text 0.1.0 copy "super_rich_text: ^0.1.0" to clipboard
super_rich_text: ^0.1.0 copied to clipboard

outdated

The easiest way to style custom text snippets.

example/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Main(),
    );
  }
}

class Main extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    //To add global markers
    SuperRichText.globalMarkerTexts.add(MarkerText(
        marker: '|',
        style: TextStyle(
          color: Colors.deepPurple
        )
      )
    );

    return Scaffold(
      body: Center(
        child: SuperRichText(
          text: 'Text in *bold* and /italic/ with color llOrangell and color rrRedrr',
          style: TextStyle(
            color: Colors.black87,
            fontSize: 22
          ),
          othersMarkers: [
            MarkerText(
              marker: 'll',
              style: TextStyle(
                color: Colors.orangeAccent
              )
            ),
            MarkerText(
              marker: 'rr',
              style: TextStyle(
                  color: Colors.redAccent
              )
            ),
          ],
        ),
      ),
    );
  }
}
35
likes
0
pub points
86%
popularity

Publisher

verified publishercleancode.dev

The easiest way to style custom text snippets.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on super_rich_text