FLUTTER ECOSYSTEM

mdalameen/dotted_decoration

mdalameen/dotted_decoration open-source repository details.

점선 장식 프로젝트 이미지
Stars
22
Forks
7
최근 푸시(UTC)
2023. 8. 21.
프로젝트 상태
활성
Mohamed Al Ameen GitHub avatar
GITHUB User

Mohamed Al Ameen ↗

언어DartSwiftJavaObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • test개발 의존성^1.25.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

dotted_decoration

Dotted line decoration is custom decoration as simple as BoxDocoration can be used in Container widget to draw dotted divider, dotted border for rectangle, oval or circle.

Preview

Flutter Dotted Decoration screenshot

Installing

To use this package, add dotted_decoration as a dependency in your pubspec.yaml file.

Usage

Create a container widget and assign DottedDecoration as decoration

Container(
    decoration: DottedDecoration()
    child: Text('Dotted Decoration')
)
Container(
    decoration: DottedDecoration()
    child: Text('Dotted Decoration')
)

To draw line

DottedDecoration(
  shape: Shape.line, linePosition: LinePosition.bottom),

To add rounded rection

DottedDecoration(
  shape: Shape.box,
  borderRadius: BorderRadius.circular(10), //remove this to get plane rectange
),

To add circle

//make sure width & height of container is same to get perfect circle or else it will end up in oval
DottedDecoration(shape: Shape.circle, dash: <int>[1, 4]);

Parameters

Shape

Kind of outline shape, default shape is Shape.line.

shape: Shape.line shape: Shape.box shape: Shape.oval

linePosition

Where line is located, default shape is LinePosition.bottom.

linePosition: LinePosition.bottom linePosition: LinePosition.left linePosition: LinePosition.right linePosition: LinePosition.top

dash

Border line order, first in dash and second is space.

dash: <int>[2, 5]

strokeWidth

Line width.

strokeWidth: 2

color

Color of line, default shape is Colors.grey.

color: Colors.red