text_divider 1.0.0 copy "text_divider: ^1.0.0" to clipboard
text_divider: ^1.0.0 copied to clipboard

This library provides a customizable Flutter widget that makes it easy to display text in the middle of a Divider.

example/example.dart

// Copyright (c) 2022, Kato Shinya. All rights reserved.
// Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) => const MaterialApp(home: MyHomePage());
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(
          title: const Text('Test TextDivider'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(20),
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                TextDivider.horizontal(
                  text: const Text('Horizontal Test'),
                  color: Colors.black45,
                  thickness: 3.0,
                ),
                TextDivider.vertical(
                  text: const Text('Vertical Test'),
                  color: Colors.black45,
                  thickness: 3.0,
                ),
                TextDivider.horizontal(
                  text: const Text('Horizontal Test'),
                  color: Colors.black45,
                  thickness: 3.0,
                ),
                TextDivider.vertical(
                  text: const Text('Vertical Test'),
                  color: Colors.black45,
                  thickness: 3.0,
                ),
                TextDivider.horizontal(
                  text: const Text('Horizontal Test'),
                  color: Colors.black45,
                  thickness: 3.0,
                ),
              ],
            ),
          ),
        ),
      );
}
12
likes
140
pub points
87%
popularity

Publisher

unverified uploader

This library provides a customizable Flutter widget that makes it easy to display text in the middle of a Divider.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on text_divider