bordered_text 2.0.0
bordered_text: ^2.0.0 copied to clipboard

Flutter plugin for applying subtle stroke to a Text widget. Supports Android, iOS, and Web.

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  @override
  MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  final String title = 'Bordered Text Example';
  final String message = 'M';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Bordered Text Example App',
      home: Scaffold(
        appBar: AppBar(
          title: Text(title),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              BorderedText(
                strokeWidth: 4.0,
                strokeColor: Colors.red,
                child: Text(
                  message,
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 21.0,
                  ),
                ),
              ),
              SizedBox(height: 10.0),
              BorderedText(
                strokeWidth: 4.0,
                strokeColor: Colors.green,
                child: Text(
                  'Bold Text',
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 21.0,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
              SizedBox(height: 10.0),
              BorderedText(
                strokeWidth: 4.0,
                strokeColor: Colors.blue,
                child: Text(
                  'Bold Italicised Text',
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 21.0,
                    fontStyle: FontStyle.italic,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
89
likes
130
pub points
95%
popularity

Flutter plugin for applying subtle stroke to a Text widget. Supports Android, iOS, and Web.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on bordered_text