A flutter plugin can create desktop shortcut not actions,currently just support android.
because i didn't find a plugin can add desktop shortcut on android,so i create it by myself.
- Add shortcut to your pubspec.yaml file:
dependencies:
shortcut:
- Import shortcut in files that it will be used:
import 'package:shortcut/shortcut.dart';
Shortcut.addShortcut(
assetName: 'assets/image/xxx',
name: 'Hello',
packageName: 'com.nightmare',
activityName: 'com.nightmare.MainActivity',
intentExtra: {
'route': '/rom',
},
);
now i didn't create single class for options or anothor object,maybe in the future.