FLUTTER ECOSYSTEM

MaherSafadii/Drops-Flutter

iOS 靜音模式警告的 Flutter 實作

Drops-Flutter 專案封面
Stars
25
Forks
9
最近推送(UTC)
2025年3月9日
專案狀態
未封存
MaherSafadii GitHub avatar
GITHUB User

MaherSafadii ↗

語言DartSwiftHTMLKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • flutter_lints開發依賴^5.0.0

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

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.

Features

https://raw.githubusercontent.com/MaherSafadii/Drops-Flutter/HEAD/screenshots/example.gif

Getting started

Add to your dependencies:

dependencies:
  drops: ^0.0.1

Then import:

import 'package:drops/drops.dart';

Usage

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  

Additional information

Report any bugs if any via github.