getMiniApps method

Future<List<NUIMiniProgramModule>> getMiniApps()

Get list of miniapps in cache

Implementation

Future<List<NUIMiniProgramModule>> getMiniApps() async{
  final sharedPref = await getSharedPref();
  final cache = await sharedPref.getString(name, defValue: "[]");
  final List<dynamic> list = jsonDecode(cache);
  if(list.isEmpty) return [];
  return list.map((value){
    return NUIMiniProgramModuleEnt().toEntity(value);
  }).toList();
}