openSettings method
Opens the given panel on the current platform.
Returns true if the panel was opened successfully.
Implementation
@override
Future<bool> openSettings(
SettingsPanel panel, {
String? packageName,
}) async {
try {
final result = await methodChannel.invokeMethod<bool>(
'openSettings',
{
'panel': panel.name,
if (packageName != null) 'packageName': packageName,
},
);
return result ?? false;
} on PlatformException catch (e) {
debugPrint('[OpenSettingsPanel] Error opening ${panel.name}: ${e.message}');
return false;
}
}