flutter_siri_suggestions 1.0.2+hotfix1

Flutter Android iOS

Flutter plugin for exposure on Siri Suggestions also awake specific function by Siri.

flutter_siri_suggestions #

Flutter plugin for exposure on Siri Suggestions.

Note: This plugin only work in iOS.

Getting Started #

Add flutter_siri_suggestions as a dependency in your pubspec.yaml file.

Check out the example directory for a sample app.

Usage #

Import the library via

import 'package:flutter_siri_suggestions/flutter_siri_suggestions.dart';

Example :


await FlutterSiriSuggestions.instance.buildActivity(
  FlutterSiriActivity(
     "Open App 👨‍💻",
     "mainActivity",
     isEligibleForSearch: true,
     isEligibleForPrediction: true,
     contentDescription: "Did you enjoy that?",
     suggestedInvocationPhrase: "open my app"
  )
);

FlutterSiriSuggestions.instance.configure(
  onLaunch: (Map<String, dynamic> message) async {
      // Awaken from Siri Suggestion
      // message = {title: "Open App 👨‍💻", key: "mainActivity", userInfo: {}}
      // Do what you want :)

      switch (message["key"]) {
        case "mainActivity":
          __text = "No Beer 😨";
          break;
        case "beerActivity":
          __text = "Let's Beer Time 🍻";
          break;
        case "searchActivity":
          __text = "Search for meaning...";
          break;
        case "TalkActivity":
          __text = "Let's talk about you 😘";
          break;
        default:
          __text = "hmmmm...... made a typo";
      }

      setState(() {
        _text = __text;
      });


  }
);

call buildActivity method if you want.


suggestedInvocationPhrase #

suggestedInvocationPhrase, only available iOS 12+

enjoy! 💃

10
likes
80
pub points
74%
popularity

Publisher

handmade.software

Flutter plugin for exposure on Siri Suggestions also awake specific function by Siri.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_siri_suggestions