MethodChannelFlutterMcp class
An implementation of FlutterMcpPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- FlutterMcpPlatform
- MethodChannelFlutterMcp
Constructors
- MethodChannelFlutterMcp.new()
- Constructor
Properties
- eventChannel → EventChannel
-
The event channel for platform events
final
-
eventStream
→ Stream<
Map< String, dynamic> > -
Platform event stream
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBackgroundServiceRunning → bool
-
Check if background service is running
no setteroverride
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancelAllNotifications(
) → Future< void> -
Cancel all notifications
override
-
cancelBackgroundTask(
String taskId) → Future< void> - Cancel a scheduled background task
-
cancelNotification(
String id) → Future< void> - Cancel a notification
-
checkPermission(
String permission) → Future< bool> -
Check if a permission is granted
override
-
configureBackgroundService(
BackgroundConfig config) → Future< void> - Configure background service
-
configureNotifications(
NotificationConfig config) → Future< void> - Configure notification settings
-
configureTray(
TrayConfig config) → Future< void> - Configure system tray
-
dispose(
) → void - Dispose resources
-
executeBackgroundTaskTyped(
{required String taskId, required Map< String, dynamic> data}) → Future<void> - Type-safe version of executeBackgroundTask
-
getPlatformVersion(
) → Future< String?> -
Returns a String containing the version of the platform.
override
-
getSystemInfoTyped(
) → Future< SystemInfoResponse> - Type-safe version of checking system info
-
hideTrayIcon(
) → Future< void> - Hide system tray icon
-
initialize(
MCPConfig config) → Future< void> -
Initialize the platform implementation with config
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestNotificationPermission(
) → Future< bool> - Request notification permission
-
requestPermission(
String permission) → Future< bool> -
Request a permission
override
-
requestPermissions(
List< String> permissions) → Future<Map< String, bool> > -
Request multiple permissions
override
-
requestPermissionTyped(
String permission, {String? rationale}) → Future< bool> - Type-safe version of requesting permission
-
scheduleBackgroundTask(
{required String taskId, required Duration delay, Map< String, dynamic> ? data}) → Future<void> - Schedule a background task
-
secureContainsKey(
String key) → Future< bool> - Check if key exists in secure storage
-
secureDelete(
String key) → Future< void> - Delete a secure storage entry
-
secureDeleteAll(
) → Future< void> - Delete all secure storage entries
-
secureRead(
String key) → Future< String?> -
Read a value from secure storage
override
-
secureStore(
String key, String value) → Future< void> -
Store a value securely
override
-
setTrayMenu(
List< Map< items) → Future<String, dynamic> >void> - Set tray menu items
-
showNotification(
{required String title, required String body, String? icon, String id = 'mcp_notification'}) → Future< void> -
Show notification
override
-
showNotificationTyped(
{required String id, required String title, required String body, NotificationConfig? config}) → Future< void> - Type-safe version of showNotification
-
showTrayIcon(
{String? iconPath, String? tooltip}) → Future< void> - Show system tray icon
-
shutdown(
) → Future< void> -
Shutdown all services
override
-
startBackgroundService(
) → Future< bool> -
Start background service
override
-
stopBackgroundService(
) → Future< bool> -
Stop background service
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateTrayTooltip(
String tooltip) → Future< void> - Update tray tooltip
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited