wrapResponse function

List<Object?> wrapResponse({
  1. Object? result,
  2. PlatformException? error,
  3. bool empty = false,
})

Implementation

import'dart:collection';import'dart:async';import'dart:typed_data' show Float64List,Int32List,Int64List,Uint8List;import'package:flutter/foundation.dart' show ReadBuffer,WriteBuffer;import'package:flutter/services.dart';List<Object?> wrapResponse({Object? result,PlatformException? error,bool empty= false}
               ){if(empty){return<Object?>[];}if(error== null){return<Object?>[result];}
return<Object?>[error.code,error.message,error.details];}