buildAppIcon method

Widget buildAppIcon({
  1. double size = 40,
})

Helper to build an app icon Widget from the memoryIcon.

Implementation

Widget buildAppIcon({double size = 40}) {
  if (memoryIcon != null && memoryIcon!.isNotEmpty) {
    return Image.memory(
      memoryIcon!,
      width: size,
      height: size,
      fit: BoxFit.contain,
    );
  } else {
    return Icon(
      Icons.apps,
      size: size,
    );
  }
}