mirrored_repositories/awesome-flutter/examples/plugins/packages/quick_actions/quick_actions
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';

import 'package:quick_actions_platform_interface/platform_interface/quick_actions_platform.dart';
import 'package:quick_actions_platform_interface/types/types.dart';

export 'package:quick_actions_platform_interface/types/types.dart';

/// Quick actions plugin.
class QuickActions {
  /// Initializes this plugin.
  ///
  /// Call this once before any further interaction with the the plugin.
  Future<void> initialize(QuickActionHandler handler) async =>
      QuickActionsPlatform.instance.initialize(handler);

  /// Sets the [ShortcutItem]s to become the app's quick actions.
  Future<void> setShortcutItems(List<ShortcutItem> items) async =>
      QuickActionsPlatform.instance.setShortcutItems(items);

  /// Removes all [ShortcutItem]s registered for the app.
  Future<void> clearShortcutItems() =>
      QuickActionsPlatform.instance.clearShortcutItems();
}
