getIcon method

  1. @override
Future<Uint8List> getIcon(
  1. String packageName
)
override

Retrieves the icon of the app with the given packageName.

Returns the icon as a Uint8List.

Implementation

@override
Future<Uint8List> getIcon(String packageName) {
  return methodChannel
      .invokeMethod("getIcon", {"package_name": packageName}).then(
          (value) => Uint8List.fromList(value.cast<int>()));
}