v0.1.2
splash_tap
当点击其子部件时,会产生有趣的水花效果
15喜欢 14近 30 天下载30Pub 分数
平台暂无数据
点击时在子部件上创建叠加水花效果的 Flutter 效果部件。
{"sdk":"flutter"}{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
Makes an interesting splash effect when tapping its child widget.
To use this plugin, add splash_tap as a dependency in your pubspec.yaml file.
The color can be set with the splashColor property. The splash size is dependent on the size of the child widget passed in - which is constrained by the minRadius and maxRadius parameters.
import 'package:flutter/material.dart';
import 'package:splash_tap/splash_tap.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Splash Tap Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: SplashTapDemo(),
);
}
}
class SplashTapDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Splash(
onTap: () {},
child: Text(
'Splash!',
style: TextStyle(fontSize: 32),
),
),
),
);
}
}