Terminei a Atividade 2 da aula 5, porém o código não executa de jeito nenhum. Recentemente criei um tópico https://cursos.alura.com.br/forum/topico-erro-no-projeto-da-aula-5-138198
pois mesmo baixando a aula anterior completa e aplicando o erro persistia mas como mencionei no tópico anterior com o comando
Flutter Clean
o problema foi resolvido. Porém ao terminar a Atividade 2 novamente o erro voltou. Pelo que parece é devido a declaração do Local Storage
final LocalStorage storage =
new LocalStorage('local_unsecure_version_1.json');
segue novamente o erro
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Launching lib/main.dart on AOSP on IA Emulator in debug mode...
[!] Your app isn't using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY .
Running Gradle task 'assembleDebug'...
lib/http/interceptors/logging_interceptor.dart:7:24: Error: The getter 'requestUrl' isn't defined for the class 'RequestData'.
- 'RequestData' is from 'package:http_interceptor/models/request_data.dart' ('../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/http_interceptor-0.3.3/lib/models/request_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'requestUrl'.
print('url: ${data.requestUrl}');
^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script '/home/aloizio/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/aloizio/snap/flutter/common/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4m 25s
Exception: Gradle task assembleDebug failed with exit code 1
Podem me ajudar? EStou usando o Ubuntu 20.04 LTS e Android Studio 4.1.1