covertToMap method

Map<String, dynamic> covertToMap(
  1. dynamic result
)

Implementation

Map<String,dynamic> covertToMap(dynamic result){
  if(result is Map<Object?,Object?>){
   return Map<String,dynamic>.from(result);
  }
  return {'errorMessage': result};
}