AppInfo.fromJson constructor

AppInfo.fromJson(
  1. Map<String, dynamic> json
)

Create a new AppInfo object from a JSON object.

Implementation

factory AppInfo.fromJson(Map<String, dynamic> json) {
  return AppInfo(
    appName: json['appName'] as String? ?? '',
    packageName: json['packageName'] as String? ?? '',
    isSystemApp: json['isSystemApp'] as bool? ?? false,
    icon: json['icon'] != null ? List<int>.from(json['icon']) : null,
  );
}