showBanner static method

Future<ABUSResult> showBanner({
  1. required String message,
  2. BannerType type = BannerType.info,
  3. List<BannerAction> actions = const [],
  4. Duration? duration,
  5. Set<String>? tags,
  6. int priority = 1,
  7. bool replace = false,
})

Show a banner

Implementation

static Future<ABUSResult> showBanner({
  required String message,
  BannerType type = BannerType.info,
  List<BannerAction> actions = const [],
  Duration? duration,
  Set<String>? tags,
  int priority = 1,
  bool replace = false,
}) {
  final event = BannerEvent(
    id: 'banner_${DateTime.now().millisecondsSinceEpoch}',
    message: message,
    type: type,
    actions: actions,
    duration: duration,
    tags: tags ?? {},
    priority: priority,
  );

  return ABUS
      .execute(ShowFeedbackInteraction(event: event, replace: replace));
}