Use the easiest way to create a dotted line view 👀!

Overview

fdottedline

Use the easiest way to create a dotted line view 👀 !

[FDottedLine] provides developers with the ability to create dashed lines. It also supports creating a dashed border for a [Widget]. Support for controlling the thickness, spacing, and corners of the dotted border.

Author:Newton([email protected])

English | 简体中文

Like it? Please cast your Star 🥰

Features

  • Supports dotted lines in both horizontal and vertical directions

  • Support to create dashed shapes

  • Provide super easy way to add dotted border to Widget

  • Support creating flexible dotted corner effects

⚙️ Parameter & Interface

🔩 FDottedLine param

Param Type Necessary Default desc
color Color false Colors.black Dotted line color
height double false null height. If there is only [height] and no [width], you will get a dotted line in the vertical direction.If there are both [width] and [height], you will get a dotted border.
width double false null width. If there is only [width] and no [height], you will get a dotted line in the horizontal direction.If there are both [width] and [height], you will get a dotted border.
strokeWidth double false 1.0 The thickness of the dotted line
dottedLength double false 5.0 The length of each small segment in the dotted line
space double false 3.0 The distance between each segment in the dotted line
corner FDottedLineCorner false null The corners of the dotted border. See [FDottedLineCorner] for details
child Widget false null If [child] is set, [FDottedLine] will serve as the dotted border of [child].At this time, [width] and [height] will no longer be valid.

📺 Demo

🔩 Horizontal Demo

FDottedLine(
  color: color,
  width: 160.0,
  strokeWidth: 2.0,
  dottedLength: 10.0,
  space: 2.0,
)

It is very simple to create a horizontal dotted line through FDottedLine.

The developer only needs to set the width parameter, but not the height parameter, which is all the developer needs to do for this.

If you want to control the thickness of the dotted line, set strokeWidth.

Through the dottedLength and space parameters, developers can freely control the length of each small segment in the dotted line and the distance between them.

Vertical Demo

FDottedLine(
  color: color,
  height: 160.0,
  strokeWidth: 2.0,
  dottedLength: 10.0,
  space: 2.0,
)

If you want to create a dotted line in the vertical direction, it is also very simple.

Developers only need to assign a value to height and leave width to be null or 0.

🔹 Dotted Shape Demo

FDottedLine(
  color: Colors.lightBlue[600],
  height: 100.0,
  width: 50,
  strokeWidth: 2.0,
  dottedLength: 10.0,
  space: 2.0,
)

FDottedLine can not only create simple dotted lines 🌝 .

When developers assign values ​​to both width and height, they will be able to get a dotted rectangle! It's incredible.

🌏 Corner Demo

FDottedLine(
  color: Colors.lightBlue[600],
  height: 70.0,
  width: 70.0,
  strokeWidth: 2.0,
  dottedLength: 10.0,
  space: 2.0,
  
  /// Set corner
  corner: FDottedLineCorner.all(50),
)

With FDottedLine, developers can even create corner effects of dashed rectangles. For example: dotted rounded rectangle, dotted round...

🧩 Child Demo

FDottedLine(
  color: color,
  strokeWidth: 2.0,
  dottedLength: 8.0,
  space: 3.0,
  corner: FDottedLineCorner.all(6.0),
  
  /// add widget
  child: Container(
    color: Colors.blue[100],
    width: 130,
    height: 70,
    alignment: Alignment.center,
    child: Text("0873"),
  ),
)

In the past, it was very difficult to add a dotted border to a Widget.

Because the official did not provide us with a good solution. But now, FDottedLine makes things easier than ever. Developers only need to use their Widget as a child of FDottedLine.

/// #1
FDottedLine(
  color: color,
  strokeWidth: 2.0,
  dottedLength: 8.0,
  space: 3.0,
  corner: FDottedLineCorner.all(75.0),
  child: Container(
    width: 130,
    height: 130,
    alignment: Alignment.center,
    /// #2
    child: FDottedLine(
      color: color,
      strokeWidth: 2.0,
      dottedLength: 8.0,
      space: 3.0,
      corner: FDottedLineCorner.all(20.0),
      child: Container(
        width: 43.0,
        height: 43.0,
        color: Colors.grey[900],
      ),
    ),
  ),
)

This also means that through the nesting of FDottedLine, many super interesting views can be created.

💡 More Demo

See what FDottedLine can do!

When there is such a simple way to create a dotted line, developers can freely build more wonderful views.

More about the application of FDottedLine , look forward to the exploration of developers 🔆 .

😃 How to use?

Add dependencies in the project pubspec.yaml file:

🌐 pub dependency

dependencies:
  fdottedline: ^<version number>

⚠️ Attention,please go to [pub] (https://pub.dev/packages/fdottedline) to get the latest version number of FDottedLine

🖥 Git dependency

dependencies:
  fdottedline:
    git:
      url: '[email protected]:Fliggy-Mobile/fdottedline.git'
      ref: '<Branch number or tag number>'

⚠️ Attention,please refer to [FDottedLine] (https://github.com/Fliggy-Mobile/fdottedline) official project for branch number or tag.

💡 License

Copyright 2020-present Fliggy Android Team <[email protected]>.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at following link.

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Like it? Please cast your Star 🥰


How to run Demo project?

1.clone project to local

2.Enter the project example directory and run the following command

flutter create .

3.Run the demo in example

You might also like...

EasiestSqlFlutter - The Easiest and the Laziest approach to Flutter SQL Database.

EasiestSqlFlutter - The Easiest and the Laziest approach to Flutter SQL Database.

The Easiest and the Laziest approach to Flutter SQL Database for Flutter. • How to use • Contribution • License • Support • Share Sharing with your fr

Jul 27, 2022

This library provides the easiest and powerful Dart/Flutter library for Mastodon API 🎯

This library provides the easiest and powerful Dart/Flutter library for Mastodon API 🎯

The Easiest and Powerful Dart/Flutter Library for Mastodon API 🎯 1. Guide 🌎 1.1. Features 💎 1.2. Getting Started ⚡ 1.2.1. Install Library 1.2.2. Im

Jul 27, 2023

Flutter list view - An unofficial list view for flutter

Flutter list view - An unofficial list view for flutter

Flutter List View I don't like official list view. There are some features don't

Dec 15, 2022

Grid-View-App - Grid View App For Flutter

Grid-View-App - Grid View App For Flutter

grid_view_app practice purpose flutter application Getting Started This project

Jun 9, 2022

-UNDER DEVELOPMENT- a project built demonstrating model view view model architecture

mvvm_project A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Nov 28, 2022

Toast Library for Flutter, Easily create toast messages in single line of code

Toast Library for Flutter, Easily create toast messages in single line of code

Create Toast messages on a Flutter Event. fluttertoast: ^8.0.8 Toast Library for Flutter, Easily create Personalised toast messages in single line of

Feb 14, 2022

Photo Seeds 🖼 🌱 An easier way for humans to create and recover wallets

Photo Seeds 🖼 🌱  An easier way for humans to create and recover wallets

Photo Seeds 🖼 🌱 An easier way for humans to create and recover wallets

Jun 2, 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

Movies4u app UI is simple enough to use and the app is a fun way to get an overview of your movie experience. This repo created with help of awesome UI, material Design and latest feature. this repo contain major feature like : dark theme.

Movies4u app UI is simple enough to use and the app is a fun way to get an overview of your movie experience. This repo created with help of awesome UI, material Design and latest feature. this repo contain major feature like : dark theme.

Moviesfree4U This is simple repository, that help in fetch latest, upcomming movies. Website https://movies4u-ef56f.firebaseapp.com/#/ https://movies4

Dec 10, 2022
Comments
  • Could you fix your plugin to be compatible with flutter 3.0?

    Could you fix your plugin to be compatible with flutter 3.0?

    After I upgrade flutter SDK to 3.0, I can't run my app. Could you provide a new version to add compatibility with flutter 3.0?

    Related: https://github.com/flutter/flutter/issues/103571#issuecomment-1125694094

    opened by YowFung 2
  • 不指定高、宽则显示不了Child Widget?

    不指定高、宽则显示不了Child Widget?

    在指定了Child Wideget,但没有指定FDottedLine的高或宽属性值时,显示不了??

    @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: FDottedLine( color: Colors.amber, strokeWidth: 2.0, dottedLength: 8.0, space: 3.0, corner: FDottedLineCorner.all(6.0),

          /// add widget
          child: Container(
            color: Colors.blue[100],
            width: 130,
            height: 70,
            alignment: Alignment.center,
            child: Text("0873"),
          ),
        ),
      ),
    );
    

    }

    [✓] Flutter (Channel dev, 1.19.0-3.0.pre, on Microsoft Windows [Version 10.0.19041.264], locale zh-CN) • Flutter version 1.19.0-3.0.pre at C:\flutter • Framework revision 6135091de9 (7 days ago), 2020-06-01 17:17:03 -0700 • Engine revision e39301f23f • Dart version 2.9.0 (build 2.9.0-13.0.dev 6489a0c68d) • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn

    opened by bagualing 1
  • Sometimes not loading

    Sometimes not loading

    I am wrapping this around an image. It's only working as intended for half of the time. It doesn't even load fully even if I wait for 5-6 mins.

    I am using fdottedline: ^1.0.1

    ss ss1

    opened by Karthick47v2 1
Owner
Fliggy Mobile
We create legends
Fliggy Mobile
Flutter ui boilerplate is easiest way to create new flutter project with clean code and well organized file folder.

Flutter UI Boilerplate "Sharing for fun" Flutter ui boilerplate is easiest way to create new flutter project with clean code and well organized file f

Dimas Ibnu Malik 122 Dec 1, 2022
The easiest way to use navigation, context less and useful methods.

Starlight Utils The easiest way to use navigation, context less and useful methods. Features Name Status Context Less Navigation Service ✅ Context Les

Ye Myo Aung 5 Jul 10, 2022
This package allows you to draw dotted lines with Flutter.

About This package allows you to draw dotted lines with Flutter. Usage Parameter Default Description direction Axis.horizontal The direction of the en

umechanhika 33 Nov 16, 2022
Easiest way to add support for light and dark theme in your flutter app.

Adaptive Theme Easiest way to add support for light and dark theme in your Flutter app. It allows to manually set light or dark theme and also lets yo

Birju Vachhani 287 Dec 27, 2022
The easiest way to style custom text snippets in flutter

Super Rich Text Check it out at Pub.Dev The easiest way to style custom text snippets Help Maintenance I've been maintaining quite many repos these da

Woton Sampaio 14 Nov 4, 2022
This library provides the easiest way to integrate Twitter Cards in Flutter web apps 🐦

The Easiest Way to Integrate Twitter Cards into Your Flutter Web App ?? 1. Guide ?? 1.1. Features ?? 1.2. Getting Started ⚡ 1.2.1. Install Library 1.2

Twitter.dart 3 Aug 7, 2022
This library provides the optimized and easiest way to authenticate with Mastodon's OAuth 2.0 in your Flutter app 🎯

The Optimized and Easiest Way to Integrate OAuth 2.0 with Mastodon API in Flutter ?? 1. Guide ?? 1.1. Getting Started ⚡ 1.1.1. Install Library 1.1.2.

Mastodon.dart 11 Jul 7, 2023
Swipeable button view - Create Ripple Animated Pages With Swipeable Button View

swipeable_button_view You can create ripple animated pages with swipeable_button

cemreonur 3 Apr 22, 2022
changelog.dart provides a library and a command-line application to manage in the correct way the git metadata to build the changelog between two release

changelog.dart ?? changelog.dart: a collection of tools to manages in a fashion way a repository as maintainer. ?? Project Homepage Table of Content I

Vincenzo Palazzo 7 Dec 18, 2022
Flutter The lightest, easiest and most convenient route management!

Language: English | 中文简体 nav_router nav_router is the simplest / lightweight / convenient routing management solution for flutter. It supports various

FlutterCandies 104 Jan 3, 2023