Flutter upgrade - flutter

After upgrading Flutter, and when i create a new project i'm getting + lines :
Creating project prgh...
Running "flutter pub get" in prgh...
Resolving dependencies in prgh... (1.6s)
+ async 2.10.0
+ boolean_selector 2.1.1
+ characters 1.2.1
+ clock 1.1.1
+ collection 1.17.0 (1.17.1 available)
+ cupertino_icons 1.0.5
+ fake_async 1.3.1
+ flutter 0.0.0 from sdk flutter
+ flutter_lints 2.0.1
+ flutter_test 0.0.0 from sdk flutter
+ js 0.6.5 (0.6.7 available)
+ lints 2.0.1
+ matcher 0.12.13 (0.12.14 available)
+ material_color_utilities 0.2.0
+ meta 1.8.0 (1.9.0 available)
+ path 1.8.2 (1.8.3 available)
+ sky_engine 0.0.99 from sdk flutter
+ source_span 1.9.1
+ stack_trace 1.11.0
+ stream_channel 2.1.1
+ string_scanner 1.2.0
+ term_glyph 1.2.1
+ test_api 0.4.16 (0.4.18 available)
+ vector_math 2.1.4
Changed 24 dependencies in prgh!
Wrote 127 files.
All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider:
https://www.youtube.com/c/flutterdev
In order to run your application, type:
$ cd prgh
$ flutter run
Your application code is in prgh/lib/main.dart.
My question is : what does the + lines mean?. is there anything i'm supposed to do?.

these are the dependencies/packages that I think updated in it's latest version!

Related

Flutter 3.7 create different result from before(3.3) and from doc, based on this command `flutter create --template=package <package_name>`

based on this flutter doc :
this line flutter create --template=package hello
should produce following content :
LICENSE
test/hello_test.dart
hello.iml
.gitignore
.metadata
pubspec.yaml
tool.
README.md
lib/hello.dart
.idea/modules.xml, .idea/workspace.xml
CHANGELOG.md
but when update to flutter 3.7
its generate more content like this following image :
it create more content like :
android
ios
etc
and give some warning :
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
complete log :
PS E:\***\***\****> flutter create --template=package hello
Creating project hello...
Running "flutter pub get" in hello...
Resolving dependencies in hello... (1.8s)
+ async 2.10.0
+ boolean_selector 2.1.1
+ characters 1.2.1
+ clock 1.1.1
+ collection 1.17.0 (1.17.1 available)
+ fake_async 1.3.1
+ flutter 0.0.0 from sdk flutter
+ flutter_lints 2.0.1
+ flutter_test 0.0.0 from sdk flutter
+ js 0.6.5 (0.6.7 available)
+ lints 2.0.1
+ matcher 0.12.13 (0.12.14 available)
+ material_color_utilities 0.2.0
+ meta 1.8.0 (1.9.0 available)
+ path 1.8.2 (1.8.3 available)
+ sky_engine 0.0.99 from sdk flutter
+ source_span 1.9.1
+ stack_trace 1.11.0
+ stream_channel 2.1.1
+ string_scanner 1.2.0
+ term_glyph 1.2.1
+ test_api 0.4.16 (0.4.18 available)
+ vector_math 2.1.4
Changed 23 dependencies in hello!
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app:
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
Wrote 13 files.
All done!
Your package code is in hello\lib\hello.dart
i search online based on that warning, and not single one solution mention about package. my question is Why it is different from before and what should i do about the warning. I need help and your guide, thank you in advance.

Flutter - Build Failed With An Exception. How to upgrade dependencies?

This is the what I am getting in Android Studio
FAILURE: Build failed with an exception.
Where:
Script 'C:\src\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\src\flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1
I tried using flutter pub upgrade --major-versions but the issue has not been resolved.
This is what it showed after using flutter pub upgrade --major-versions
Resolving dependencies...
async 2.9.0 (2.10.0 available)
boolean_selector 2.1.0 (2.1.1 available)
characters 1.2.1
clock 1.1.1
collection 1.16.0 (1.17.0 available)
cupertino_icons 1.0.5
fake_async 1.3.1
flutter 0.0.0 from sdk flutter
flutter_test 0.0.0 from sdk flutter
matcher 0.12.12 (0.12.14 available)
material_color_utilities 0.1.5 (0.2.0 available)
meta 1.8.0
path 1.8.2 (1.8.3 available)
sky_engine 0.0.99 from sdk flutter
source_span 1.9.0 (1.9.1 available)
stack_trace 1.10.0 (1.11.0 available)
stream_channel 2.1.0 (2.1.1 available)
string_scanner 1.1.1 (1.2.0 available)
term_glyph 1.2.1
test_api 0.4.12 (0.4.17 available)
vector_math 2.1.2 (2.1.4 available)
No dependencies changed.
12 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Upon using flutter pub outdated this is what I got
[*] indicates versions that are not the latest available.
Package Name Current Upgradable Resolvable Latest
direct dependencies: all up-to-date.
transitive dependencies:
collection *1.16.0 *1.16.0 *1.16.0 1.17.0
material_color_utilities *0.1.5 *0.1.5 *0.1.5 0.2.0
vector_math *2.1.2 *2.1.2 *2.1.2 2.1.4
transitive dev_dependencies:
async *2.9.0 *2.9.0 *2.9.0 2.10.0
boolean_selector *2.1.0 *2.1.0 *2.1.0 2.1.1
matcher *0.12.12 *0.12.12 *0.12.12 0.12.14
path *1.8.2 *1.8.2 *1.8.2 1.8.3
source_span *1.9.0 *1.9.0 *1.9.0 1.9.1
stack_trace *1.10.0 *1.10.0 *1.10.0 1.11.0
stream_channel *2.1.0 *2.1.0 *2.1.0 2.1.1
string_scanner *1.1.1 *1.1.1 *1.1.1 1.2.0
test_api *0.4.12 *0.4.12 *0.4.12 0.4.17
all dependencies are up-to-date.
Can someone please tell me how to solve this issue? I cannot figure out what needs to be done here.
I keep getting the same error code.
How to update these dependencies to the newer version? I don't know how to do it.

SDK in pubspec.yaml not same as in flutter --version

I'm trying to set environment sdk version to a higher number but it says that my current SDK is as seen below:
The current Dart SDK version is 2.14.4.
Because demo_app_1 requires SDK version >=2.16.0 <3.0.0, version solving failed.
pub get failed (1; Because demo_app_1 requires SDK version >=2.16.0 <3.0.0, version solving failed.)
exit code 1
When i run flutter --version i get the following:
Flutter 3.1.0-0.0.pre.854 • channel master • https://github.com/flutter/flutter.git
Framework • revision ec20ea80ad (17 hours ago) • 2022-05-21 16:28:06 -0400
Engine • revision 1bfe551d6b
Tools • Dart 2.18.0 (build 2.18.0-142.0.dev) • DevTools 2.13.1
Any help would be much appreciated. Thanks.
See you're confusing two things.
The dart SDK version that's mentioned in pubspec.yaml is for the 'dart'
version to be used in the project, not the flutter version.
Important to note that every dart version is compatible with a corresponding flutter version. The dependency can be loose though.
So in your case Flutter 3.1.0-0.0.pre.854 is the flutter version and 2.18.0 is the dart version. This shows that your flutter 3.1 is compatible with dart 2.18 and is installed, but your project uses 2.14.4
You can check the available list from flutter SDK releases
The problem is that demo_app_1 requires an SDK version >= (higher or equal) 2.16.0 but < (below) 3.0.0. The version you have installed is 3.1.0, which does not fulfill the requirement.
You have two options:
Change your flutter installation version
flutter downgrade <version>
flutter doctor
Change the required SDK version in your pubspec.yaml
Change the environment->sdk value
flutter pub get
After that, the issue should be resolved.
Run flutter downgrade 3.0.0 and check if solved

"Flutter, Exception: Gradle task assembleDebug failed with exit code 1" what could be the issue?

When I tried to run the flutter application through "Run without debugging" or "With debugging" in VS CODE the application does not show up in the emulator (emulator is up and running). Android studio is properly installed. SDK path is updated in env. variables. Updated packages with yaml file. restarted VSCODE, restarted the computer, Problem still persists. What could be the issue?
Debug console
Launching lib\main.dart on Android SDK built for x86 in debug mode...
FAILURE: Build failed with an exception.
* Where:
Script 'D:\flutter2.3\packages\flutter_tools\gradle\flutter.gradle' line: 1005
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\flutter2.3\bin\flutter.bat'' 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 5s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Then I tried to upgrade yaml file packages with
flutter pub upgrade
Resolving dependencies...
async 2.8.1 (2.8.2 available)
boolean_selector 2.1.0
characters 1.1.0 (1.2.0 available)
charcode 1.3.1
clock 1.1.0
collection 1.15.0
cupertino_icons 1.0.3
fake_async 1.2.0
flutter 0.0.0 from sdk flutter
flutter_svg 0.23.0+1
flutter_test 0.0.0 from sdk flutter
matcher 0.12.10 (0.12.11 available)
meta 1.7.0
path 1.8.0
path_drawing 0.5.1+1
path_parsing 0.2.1
persistent_bottom_nav_bar 4.0.2
petitparser 4.4.0
sky_engine 0.0.99 from sdk flutter
source_span 1.8.1
stack_trace 1.10.0
stream_channel 2.1.0
string_scanner 1.1.0
term_glyph 1.2.0
test_api 0.4.2 (0.4.6 available)
typed_data 1.3.0
vector_math 2.1.0 (2.1.1 available)
xml 5.3.1
No dependencies changed.
5 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Then ran flutter pub outdated
Showing outdated packages.
[*] indicates versions that are not the latest available.
Package Name Current Upgradable Resolvable Latest
direct dependencies: all up-to-date.
transitive dependencies:
characters *1.1.0 *1.1.0 *1.1.0 1.2.0
vector_math *2.1.0 *2.1.0 *2.1.0 2.1.1
transitive dev_dependencies:
async *2.8.1 *2.8.1 *2.8.1 2.8.2
matcher *0.12.10 *0.12.10 *0.12.10 0.12.11
test_api *0.4.2 *0.4.2 *0.4.2 0.4.6
all dependencies are up-to-date.

How do I identify which flutter packages are blocking others from being updated to latest version?

I want to upgrade my dependencies to the latest possible, but I can't because they are being blocked by one of the packages.
How can I tell which one is causing the issue where others can't be updated? They pretty much all seem to be outdated. Running flutter pub outdated gives me the list of my packages where the resolvable and updatable are always the same as my current package.
> flutter pub outdated
Showing outdated packages.
[*] indicates versions that are not the latest available.
Package Name Current Upgradable Resolvable Latest
direct dependencies:
bip39 *1.0.3 *1.0.3 *1.0.3 1.0.6
cloud_firestore *0.16.0+1 *0.16.0+1 *0.16.0+1 1.0.5
firebase_auth *0.20.1 *0.20.1 *0.20.1 1.1.0
firebase_core *0.7.0 *0.7.0 *0.7.0 1.0.3
firebase_storage *7.0.0 *7.0.0 *7.0.0 8.0.3
flutter_blue *0.7.3 *0.7.3 *0.7.3 0.8.0
google_maps_flutter *1.2.0 *1.2.0 *1.2.0 2.0.3
http *0.12.2 *0.12.2 *0.12.2 0.13.1
image *2.1.19 *2.1.19 *2.1.19 3.0.2
image_picker *0.6.7+22 *0.6.7+22 *0.6.7+22 0.7.4
local_auth *0.6.3+4 *0.6.3+4 *0.6.3+4 1.1.4
permission_handler *5.1.0+2 *5.1.0+2 *5.1.0+2 6.1.3
transitive dependencies:
archive *2.0.13 *2.0.13 *2.0.13 3.1.2
args *1.6.0 *1.6.0 *1.6.0 2.0.0
bech32 *0.1.2 *0.1.2 *0.1.2 0.2.0
bip32 *1.0.7 *1.0.7 *1.0.7 1.0.10
bs58check *1.0.1 *1.0.1 *1.0.1 1.0.2
cloud_firestore_platform_interface *3.0.2 *3.0.2 *3.0.2 4.0.1
cloud_firestore_web *0.3.0+2 *0.3.0+2 *0.3.0+2 1.0.5
convert *2.1.1 *2.1.1 *2.1.1 3.0.0
crypto *2.1.5 *2.1.5 *2.1.5 3.0.1
firebase_auth_platform_interface *3.1.0 *3.1.0 *3.1.0 4.1.0
firebase_auth_web *0.3.3 *0.3.3 *0.3.3 1.0.6
firebase_core_platform_interface *3.0.1 *3.0.1 *3.0.1 4.0.0
firebase_core_web *0.2.1+3 *0.2.1+3 *0.2.1+3 1.0.2
firebase_storage_platform_interface *1.0.4 *1.0.4 *1.0.4 2.0.1
firebase_storage_web *0.1.1+3 *0.1.1+3 *0.1.1+3 1.0.3
fixnum *0.10.11 *0.10.11 *0.10.11 1.0.0
flutter_plugin_android_lifecycle *1.0.11 *1.0.11 *1.0.11 2.0.1
google_maps_flutter_platform_interface *1.2.0 *1.2.0 *1.2.0 2.0.4
hex *0.1.2 *0.1.2 *0.1.2 0.2.0
http_parser *3.1.4 *3.1.4 *3.1.4 4.0.0
image_picker_platform_interface *1.1.6 *1.1.6 *1.1.6 2.1.0
intl *0.16.1 *0.16.1 *0.16.1 0.17.0
permission_handler_platform_interface *2.0.2 *2.0.2 *2.0.2 3.1.3
petitparser *3.1.0 *3.1.0 *3.1.0 4.1.0
plugin_platform_interface *1.0.3 *1.0.3 *1.0.3 2.0.0
pointycastle *1.0.2 *1.0.2 *1.0.2 3.0.1
protobuf *1.1.3 *1.1.3 *1.1.3 2.0.0
quiver *2.1.5 *2.1.5 *2.1.5 3.0.1
rxdart *0.24.1 *0.24.1 *0.24.1 0.26.0
source_span *1.8.0 *1.8.0 *1.8.0 1.8.1
stream_transform *1.2.0 *1.2.0 *1.2.0 2.0.0
uuid *2.2.2 *2.2.2 *2.2.2 3.0.4
xml *4.5.1 *4.5.1 *4.5.1 5.1.0