loadConfig method

Future<Map<String, dynamic>?> loadConfig()

Loads widget configuration from App Group container.

Returns the configuration map, or null if not found.

Implementation

Future<Map<String, dynamic>?> loadConfig() async {
  try {
    final result = await _methodChannel.invokeMethod('loadConfig');
    return result != null
        ? Map<String, dynamic>.from(result as Map)
        : null;
  } catch (e) {
    throw Exception('Failed to load config: $e');
  }
}