ScrellaApiBaseResponse<T>.fromJson2 constructor
Creates a ScrellaApiBaseResponse from a decoded JSON map.
Throws FormatException if:
jsonisnull(empty body) – this is always an error.statusormessagefields are missing or have the wrong type.datais null for this factory.
Implementation
factory ScrellaApiBaseResponse.fromJson2(
Map<String, dynamic>? json, // non‑nullable – null JSON is an error
) {
final status = json?['status'] ?? false;
final message = json?['message'] ?? "";
return ScrellaApiBaseResponse(status: status, message: message, data: null);
}