在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):florent37/Flutter-ShapeOfView开源软件地址(OpenSource Url):https://github.com/florent37/Flutter-ShapeOfView开源编程语言(OpenSource Language):Dart 90.0%开源软件介绍(OpenSource Introduction):flutter_shape_of_viewGive a custom shape to any flutter widget, Material Design 2 ready Downloadhttps://pub.dev/packages/shape_of_view
Give a custom shape to any android view Useful for Material Design 2 ShapeOfView(
shape: YOUR_SHAPE,
elevation: 4,
height: 300, //height & width are optional
child: ...
), Use implemented shapesShapeOfView came with pre-created shapes : CircleShapeOfView(
shape: CircleShape(
borderColor: Colors.white, //optional
borderWidth: 2, //optional
),
child: ... RoundRectShapeOfView(
shape: RoundRectShape(
borderRadius: BorderRadius.circular(12),
borderColor: Colors.white, //optional
borderWidth: 2, //optional
),
child: ... ClipCornerShapeOfView(
shape: CutCornerShape(
borderRadius: BorderRadius.circular(12);
),
child: ... ArcShapeOfView(
shape: ArcShape(
direction: ArcDirection.Outside,
height: 20,
position: ArcPosition.Bottom
),
child: ...
) DiagonalShapeOfView(
elevation: 4,
height: 300,
shape: DiagonalShape(
position: DiagonalPosition.Bottom,
direction: DiagonalDirection.Right,
angle: DiagonalAngle.deg(angle: 10)
),
child: ...
) TriangleShapeOfView(
shape: TriangleShape(
percentBottom: 0.5,
percentLeft: 0,
percentRight: 0
),
child: ...,
) BubbleShapeOfView(
shape: BubbleShape(
position: BubblePosition.Bottom,
arrowPositionPercent: 0.5,
borderRadius: 20,
arrowHeight: 10,
arrowWidth: 10
),
child: ...,
) StarShapeOfView(
shape: StarShape(
noOfPoints: 5
),
child: ...,
) PolygonShapeOfView(
shape: PolygonShape(
numberOfSides: 9
),
child: ...,
) Use a custom ShapeShapeOfView(
shape: CustomShape(
builder: (rect) => Path()
..moveTo(0, 0)
..close()
),
child: ...,
) or extend Shape class MyShape extends Shape {
@override
Path build({Rect rect, double scale}) {
return Path()
..moveTo(0, 0)
..close();
}
} then ShapeOfView(
shape: MyShape(),
child: ...,
) Getting Started with FlutterFor help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference. License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论