getWhitelistedPackages static method

Future<List<String>> getWhitelistedPackages()

Retrieves the list of whitelisted packages on the device Only applicable for MIUI devices Returns a list of package names that are whitelisted for MIUI

Implementation

// Inside your autostarter.dart file
static Future<List<String>> getWhitelistedPackages() async {
  final List<dynamic>? result =
      await _channel.invokeMethod("getWhitelistedPackages");
  return List<String>.from(result ?? []);
}