# ResultWrapper<T>.fromJson constructor

ResultWrapper<T>.fromJson(

1. Map<String, dynamic> json, {
2. T fromJsonT(
   1. dynamic
   )?,

})

## Implementation

    factory ResultWrapper.fromJson(
      Map<String, dynamic> json, {
      T Function(dynamic)? fromJsonT,
    }) {
      final status = OperationStatusExtension.fromString(json['status']) ??
          (throw ArgumentError('Invalid status value: ${json['status']}'));

      final rawData = json['data'];
      final message = json['message'] as String?;

      final T? parsedData =
          (rawData != null && fromJsonT != null) ? fromJsonT(rawData) : null;

      return ResultWrapper(
        status: status,
        data: parsedData,
        errorMessage: message,
      );
    }