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

A customizable half ellipse container for Flutter

Half Ellipse 半椭圆容器 #

English | 中文

Overview #

HalfEllipse is a lightweight Flutter widget that clips its child into a customizable half ellipse. It supports solid colors, gradients, different shapes (ellipse, bezier, sag), and painter access for advanced layouts.

Getting Started #

HalfEllipse
(
height: 80,
top: true,
shape: HalfEllipseShape.sag,
gradient: const LinearGradient(
colors: [Color(0xFFFFC371), Color(0xFFFF5F6D)],
),
child: const Center(
child: Text('Gradient Banner', style: TextStyle(color: Colors.white)),
),
)

See example/lib/main.dart for a complete interactive demo.

Screenshots #

Half ellipse screenshot

中文 #

HalfEllipse 是一个 Flutter 半椭圆裁剪容器,支持纯色、渐变、三种弧形模式(ellipse、bezier、sag),也可以通过 HalfEllipsePainter 自定义绘制。

快速上手 #

HalfEllipse
(
height: 80,
top: true,
shape: HalfEllipseShape.sag,
gradient: const LinearGradient(
colors: [Color(0xFFFFC371), Color(0xFFFF5F6D)],
),
child: const Center(
child: Text('渐变标题', style: TextStyle(color: Colors.white)),
),
)

更多示例请查看 example/lib/main.dart 并运行 flutter run

截图 #

Half ellipse screenshot
1
likes
150
points
122
downloads

Publisher

verified publisherjsontodart.cn

Weekly Downloads

A customizable half ellipse container for Flutter

Homepage
Repository (GitHub)
View/report issues

Topics

#widget

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on half_ellipse