v0.0.4+1
dio_interceptors
Dio पैकेज के उपयोग के लिए आपके लिए इंटरसेप्टर्स कार्यान्वित करता है।
14लाइक 1430-दिन डाउनलोड30Pub अंक
प्लेटफ़ॉर्म डेटा नहीं
gabuldev/dio_interceptors open-source repository details.
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
A interceptors to use on Dio.
You use for mock API requests.
void main() {
Dio dio = Dio();
var mockData = {
"/test" : {
"name" : "Gabul DEV",
"site" : "https://gabul.dev"
}
};
dio.interceptors.add(InterceptorMock(mockData));
void getData() async{
var res = await dio.get("/test");
print(res.data["name"])// "Gabul DEV"
print(res.data["site"])// "https://gabul.dev");
}
getData();
}
You can use for add JWT all requests
Future<String> token() async{
//Implements your logic here
return jwt;
}
dio.interceptors.add(InterceptorToken(token: () async => await token()))
निर्भरता सूची 3 आइटम
^4.0.0-beta2{"sdk":"flutter"}{"sdk":"flutter"}उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗