refreshWidget method

Future<void> refreshWidget({
  1. required String widgetSize,
})

Refreshes a specific widget.

widgetSize is the size of the widget to refresh.

Implementation

Future<void> refreshWidget({required String widgetSize}) async {
  try {
    await _methodChannel.invokeMethod('refreshWidget', {
      'widgetSize': widgetSize,
    });
  } catch (e) {
    throw Exception('Failed to refresh widget: $e');
  }
}