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

Overview

pub package

1. About

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

Using TextDivider, you can easily display the following objects that you often see in websites and mobile apps. In addition, TextDivider has flexible customization options that allow you to change the style to suit your taste.

  • Wellknown text divider

スクリーンショット 2022-02-08 18 00 39

Also TextDivider supports vertical as well as horizontal direction.

To see exactly what kind of output you can get by using TextDivider, see this GitHub Pages made with Flutter and TextDivider.

1.1. Introduction

1.1.1. Install Library

With Dart:

 dart pub add text_divider

With Flutter:

 flutter pub add text_divider

1.1.2. Import It

import 'package:text_divider/text_divider.dart';

1.1.3. Use TextDivider

import 'package:text_divider/text_divider.dart';

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

  @override
  Widget build(BuildContext context) => Scaffold(
        body: Padding(
          padding: const EdgeInsets.all(20),
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                // Outputs a horizontal Divider with the text placed in the center.
                TextDivider.horizontal(text: const Text('Horizontal Test')),
                // Outputs a vertical Divider with the text placed in the center.
                TextDivider.vertical(text: const Text('Vertical Test')),
              ],
            ),
          ),
        ),
      );
}

1.2. Details

1.2.1. Customization Options

Name Type Required Initial Value Remarks
text Text - This is a Text widget included in a commonly used material package. The text data set in this Text widget will be output to the center of the Divider.
direction Direction Direction.horizontal This option specifies the direction of the Divider to be output.
size double? 16.0 This option indicates the height if the Divider direction is horizontal, and the width if the Divider direction is vertical.
thickness double? 0.0 The thickness of the line drawn within the divider.
indent double? 0.0 The amount of empty space to the leading edge of the divider.
endIndent double? 0.0 The amount of empty space to the trailing edge of the divider.
color Color? DividerThemeData.color OR ThemeData.dividerColor The color to use when painting the line.

1.2.2. Horizontal Constructor

It is possible to specify the direction of the Divider with the argument of the default constructor, but a simpler way is to use the horizontal constructor. However, keep in mind that you cannot specify const in the caller of the TextDivider if you use this horizontal constructor.

1.2.3. Vertical Constructor

Also you can use the vertical constructor for vertical direction. However, keep in mind that you cannot specify const in the caller of the TextDivider if you use this vertical constructor.

1.3. License

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.

1.4. More Information

TextDivider was designed and implemented by Kato Shinya.

You might also like...

Dart JS interop for Mermaid - The Javascript tool that makes use of a markdown based syntax to render customizable diagrams, charts and visualizations.

Mermaid (Dart) Dart JS interop for Mermaid - Javascript library that makes use of a markdown based syntax to render customizable diagrams, charts and

Dec 12, 2022

Flutter plugin to display a popup menu button widget with handsome design and easy to use.

Flutter plugin to display a popup menu button widget with handsome design and easy to use.

menu_button Flutter widget to display a popup menu button very simply and easily customizable. Resources Documentation Pub Package GitHub Repository I

Sep 27, 2022

🧾 Flutter widget allowing easy cache-based data display in a ListView featuring pull-to-refresh and error banners.

Often, apps just display data fetched from some server. This package introduces the concept of fetchable streams. They are just like normal Streams, b

Jan 18, 2022

Display images flutter - Simple app to display images in flutter

Display images flutter - Simple app to display images in flutter

Display Images In Flutter Simple app to display images in a flutter. In this dem

Jan 29, 2022

⚡️A highly customizable, powerful and easy-to-use alerting library for Flutter.

⚡️A highly customizable, powerful and easy-to-use alerting library for Flutter.

Flash ⚡️ A highly customizable, powerful and easy-to-use alerting library for Flutter. Website: https://sososdk.github.io/flash Specs This library all

Jan 5, 2023

An Instagram like text editor Flutter widget that helps you to change your text style.

An Instagram like text editor Flutter widget that helps you to change your text style.

TextEditor An instagram like text editor widget for flutter Show some ❤️ and star the repo to support the project Features Edit TextStyle object font

Dec 16, 2022

Grad text package - A Flutter Widget to draw gradients into text

Grad text package - A Flutter Widget to draw gradients into text

grad_text A Flutter Widget to draw gradients into text.(Null safe) Demo Install

Jan 31, 2022

A Flutter slidable widget that provides an easy to use configuration. Highly customisable. Just as you want it!

A Flutter slidable widget that provides an easy to use configuration. Highly customisable. Just as you want it!

A Flutter slidable widget that provides an easy to use configuration. Highly customisable. Just as you want it!

Dec 8, 2022

The EasyRichText widget provides an easy way to use RichText.

The EasyRichText widget provides an easy way to use RichText.

easy_rich_text The EasyRichText widget makes the RichText widget easy. You do not have to split the string manually. This widget use regular expressio

Jan 4, 2023
Releases(1.0.0)
  • 1.0.0(Feb 9, 2022)

    Please refer to the following release note for the updated contents

    • https://github.com/myConsciousness/text-divider/blob/main/CHANGELOG.md
    Source code(tar.gz)
    Source code(zip)
  • 0.0.1(Feb 9, 2022)

Owner
Kato Shinya
Freelance software developer. Web and Batch development in Java. Also mobile development in Flutter.
Kato Shinya
Masked text field - A flutter package for masked text field for formet your text and good UI

Masked Text Field Masked Text Field Features A package for masked text field for

Alok Dubey 7 Sep 4, 2022
Text analyzer that extracts tokens from text for use in full-text search queries and indexes.

Tokenize text, compute document readbility and compare terms in Natural Language Processing. THIS PACKAGE IS PRE-RELEASE, and SUBJECT TO DAILY BREAKIN

GM Consult Pty Ltd 5 Dec 12, 2022
Flutter ticket pass - A Flutter Widget to display the details of a ticket/pass purchased by customers and display the details of the purchase

ticket_pass_package A Flutter package to display the purchase of a ticket/pass along with additional details such as list of buyers. The source code i

null 40 Aug 13, 2022
A library that makes it easy for you to create your own custom wizard.

Flutter Wizard Author: Jop Middelkamp A library that makes it easy for you to create your custom wizard. You'll have 100% control over the appearance

Baseflow 13 Dec 2, 2022
Nexus is a state management library that makes it easy to create and consume your application's reactive data to the user interface.

Nexus ?? Nexus is a state management library that makes it easy to create and consume your application's reactive data to the user interface. With nex

Gor Mkhitaryan 3 Sep 7, 2022
Flutter Widget to display gradient text

GradientText A Flutter Widget for displaying gradient text, text with a gradient drawn through it. Getting Started Add the plugin (pub coming soon): d

Tony Owen 28 Nov 4, 2022
A customizable Flutter library that provides a circular context menu

Flutter Pie Menu ?? A customizable Flutter library that provides a circular context menu similar to Pinterest's. Usage Wrap the widget that will react

Raşit Ayaz 14 Jan 4, 2023
🙌🏾 This package makes it easy to use the Mono connect widget in a flutter project

Flutter Mono ** This is an unofficial SDK for flutter This package makes it easy to use the Mono connect widget in a flutter project. ?? Screen Shots

Chiziaruhoma Ogbonda 12 Dec 20, 2022
A package that provides a highly customizable sheet widget that snaps to different vertical & horizontal positions

Snapping Sheet A package that provides a highly customizable sheet widget that snaps to different vertical & horizontal positions Can adapt to scrolla

Adam Jonsson 364 Dec 6, 2022