You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.9, on Microsoft Windows [Version 10.0.19045.3930], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[✓] Chrome - develop for the web
[✗] Visual Studio - develop Windows apps
✗ Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.86.2)
[✓] Connected device (4 available)
Package
dio
Version
5.4.0
Operating-System
Windows
Output of
flutter doctor -v
Dart Version
3.2.6
Steps to Reproduce
`
@riverpod
Dio dio(DioRef ref) {
final dio = Dio();
dio.interceptors.add(InterceptorsWrapper(
onRequest: (RequestOptions requestOptions,
RequestInterceptorHandler handler) async {
requestOptions.baseUrl = baseurl;
var accessToken = await storage.read(key: 'accessToken');
requestOptions.headers
.putIfAbsent('Authorization', () => 'Bearer $accessToken');
handler.next(requestOptions);
},
onError: (DioException err, ErrorInterceptorHandler handler) async {
));
return dio;
}
`
Expected Result
`
@riverpod
Dio dio(DioRef ref) {
final dio = Dio();
dio.interceptors.add(InterceptorsWrapper(
onRequest: (RequestOptions requestOptions,
RequestInterceptorHandler handler) async {
requestOptions.baseUrl = baseurl;
var accessToken = await storage.read(key: 'accessToken');
requestOptions.headers
.putIfAbsent('Authorization', () => 'Bearer $accessToken');
handler.next(requestOptions);
},
onError: (DioException err, ErrorInterceptorHandler handler) async {
));
return dio;
}
`
Actual Result
`
@riverpod
Dio dio(DioRef ref) {
final dio = Dio();
dio.interceptors.add(InterceptorsWrapper(
onRequest: (RequestOptions requestOptions,
RequestInterceptorHandler handler) async {
requestOptions.baseUrl = baseurl;
var accessToken = await storage.read(key: 'accessToken');
requestOptions.headers
.putIfAbsent('Authorization', () => 'Bearer $accessToken');
handler.next(requestOptions);
},
onError: (DioException err, ErrorInterceptorHandler handler) async {
));
return dio;
}
`
The text was updated successfully, but these errors were encountered: