Skip to content

Instantly share code, notes, and snippets.

View DattatreyaReddy's full-sized avatar
🎯
Focusing

Padya DattatreyaReddy

🎯
Focusing
View GitHub Profile
@DattatreyaReddy
DattatreyaReddy / dio_client.dart
Last active October 26, 2022 18:41
DIo Client is a wrapper around Dio to support decoder with Compute (Threads)
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'dio_error_util.dart';
typedef ResponseDecoderCallBack<DecoderType> = DecoderType Function(dynamic);
class DioClient {
final Dio dio;
DioClient(this.dio);