v0.0.5
drops
一个用于显示类似从剪贴板复制或连接 Apple Pencil 时使用的警告提示的包,以及在使用静音切换功能时 iPhone 上显示的警告提示。
65喜欢 116近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
iOS 静音模式警告的 Flutter 实现
{"sdk":"flutter"}{"sdk":"flutter"}^5.0.0以下为英文项目原文快照,最新内容请访问 GitHub。
A pacakge for showing alerts like the one used when copying from pasteboard or connecting Apple pencil and the alert shown on iPhones when using the silent toggle.
Add to your dependencies:
dependencies:
drops: ^0.0.1
Then import:
import 'package:drops/drops.dart';
To show a Drop all you have to do it the following:
Drops.show(context, title: 'Why did dash cross the road?',);
this displays a bare minimum Drop, to get the most, you can customize them like this:
Drops.show(
context,
title: 'Title',
subtitle: 'subtitle',
icon: CupertinoIcons.smiley_fill,
isDestructive: false,
highContrastText: true,
position: DropPosition.top,
shape: DropShape.pill,
);
Heres the full list of parameters that you can use to adjust the Drop to match your needs:
required String title
Duration duration
Duration? transitionDuration
TextStyle? textStyle
Curve curve = Curves.easeOutExpo
Curve? reverseCurve
String? subtitle
IconData? icon
bool isDestructive
TextStyle? titleTextStyle
TextStyle? subtitleTextStyle
DropPosition position
EdgeInsets? padding,
DropShape shape
bool highContrastText
Color? iconColor
int titleMaxLines
int subtitleMaxLines
Report any bugs if any via github.