wrapResponse function
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];}