mirror of
https://github.com/block/buzz.git
synced 2026-11-02 07:22:55 +00:00
Updates mobile toast animations and styling. | Sign in | Retry | Copied | | --- | --- | --- | |  |  |  | --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
19 lines
595 B
Dart
19 lines
595 B
Dart
import 'dart:async';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../toast_haptic.dart';
|
|
|
|
export '../toast_haptic.dart' show ToastKind;
|
|
|
|
/// Applies the shared feedback pulse to the remaining actionable snackbars.
|
|
extension FeedbackSnackBar on ScaffoldMessengerState {
|
|
/// Shows the original snackbar, preserving its actions, queue, and lifetime.
|
|
ScaffoldFeatureController<SnackBar, SnackBarClosedReason>
|
|
showFeedbackSnackBar(SnackBar snackBar, {required ToastKind kind}) {
|
|
final controller = showSnackBar(snackBar);
|
|
unawaited(toastHaptic(kind));
|
|
return controller;
|
|
}
|
|
}
|