import 'package:flutter/services.dart';

class WidgetManager {
  static const platform = MethodChannel('com.mobileapp.store.ride/widget');

  static Future<void> updateWidget() async {
    try {
      await platform.invokeMethod('updateWidget');
    } on PlatformException catch (e) {
      print("Failed to update widget: '${e.message}'.");
    }
  }
}

// Example usage:
void updateHomeScreenWidget() {
  WidgetManager.updateWidget();
}
