v1.0.2aura_box
一个结合了多个径向渐变和模糊效果的 Flutter 小部件。
74喜欢 422近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
结合多个径向渐变和模糊效果的 Flutter 小部件
以下为英文项目原文快照,最新内容请访问 GitHub。
Flutter widget that combines multiple radial gradients and blur effect.
Add this line into the project pubspec.yaml file.
dependencies:
aura_box: ^1.0.4
Then in your files you can import it:
import 'package:aura_box/aura_box.dart';
The package exposes two widgets.
AuraBox acts as a container which can receive a child, a decoration and a list of AuraSpot.AuraSpot represent the point where the radiant gradients are generated.AuraBox(
spots: [
// Places one blue spot in the center
AuraSpot(
color: Colors.blue,
radius: 100.0,
alignment: Alignment.center,
blurRadius: 5.0,
stops: const [0.0, 0.5],
),
// Places one red spot in the bottom right
AuraSpot(
color: Colors.red,
radius: 150.0,
alignment: Alignment.bottomRight,
blurRadius: 10.0,
stops: const [0.0, 0.7],
),
],
decoration: BoxDecoration(
color: Colors.transparent,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(10.0),
),
child: const SizedBox(
height: 100,
width: 100,
),
)
The single spots are positioned inside a stack widget.
This gives control over their position using the alignment property.
For further details you can refer to the Alignment class documentation.
An example project is available within the project:
依赖清单 4 项
{"sdk":"flutter"}{"sdk":"flutter"}>=1.0.0 <3.0.0>=5.1.0 <11.0.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗