A new Flutter plugin to create Pinned shortcuts for Android similer to Messenger chat bubble.
import 'package:flutter_pinned_shortcut/flutter_pinned_shortcut.dart';
final FlutterPinnedShortcut flutterPinnedShortcutPlugin = FlutterPinnedShortcut();
void addPinnedShortcut() {
_flutterPinnedShortcutPlugin.createPinnedShortcut(
id: "1",
label: "Followers",
action: "followers",
iconAssetName: "assets/icon.png"
);
}
@override
void initState() {
super.initState();
getIncomingAction();
}
void getIncomingAction() {
_flutterPinnedShortcutPlugin.getLaunchAction((action) {
switch (action) {
case "followers":
///navigate to follower screen.
break;
case "profile":
///navigate to profile screen.
}
});
}