Why is my FlutterFlow project not launching on the emulator and How can I fix it?

83 Views Asked by At

I am new to FlutterFlow, Flutter and Android Studio. I have almost zero knowledge about Flutter's code and how all of this works.

I created a really simple project in FlutterFlow, practically just made a new project in FlutterFlow and didn't change anything in it. I downloaded the code and set up everything as showed by this one video - https://www.youtube.com/watch?v=xtB21Be3qqc - except I didn't use github and firebase for my application - I'm planning to just use local database - SQLite database, but in this current project it is not added.

Flutter doctor is compeletly fine:

C:\Users\Rencis>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.1, on Microsoft Windows [Version 10.0.22621.3235], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.1)
[√] Android Studio (version 2023.2)
[√] VS Code (version 1.86.2)
[√] Connected device (4 available)
[√] Network resources

• No issues found!

Android Studio is in it's latest version - Iguana. I tried flutter pub get.

PS C:\Users\Rencis\dev\achieve_potential\achieve_potential> flutter pub get
Resolving dependencies... 
  google_fonts 6.2.0 (6.2.1 available)
  intl 0.18.1 (0.19.0 available)
  leak_tracker_flutter_testing 2.0.1 (3.0.3 available)
  leak_tracker_testing 2.0.3 (3.0.1 available)
  material_color_utilities 0.8.0 (0.11.1 available)
  test_api 0.6.1 (0.7.0 available)
  vm_service 13.0.0 (14.1.0 available)
Got dependencies!
7 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
PS C:\Users\Rencis\dev\achieve_potential\achieve_potential> flutter pub outdated
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name  Current  Upgradable  Resolvable  Latest

direct dependencies:
google_fonts  *6.2.0   *6.2.0      *6.2.0      6.2.1
intl          *0.18.1  *0.18.1     *0.18.1     0.19.0

dev_dependencies: all up-to-date.
You are already using the newest resolvable versions listed in the 'Resolvable' column.
Newer versions, listed in 'Latest', may not be mutually compatible.

I tried dart fix.

PS C:\Users\Rencis\dev\achieve_potential\achieve_potential> dart fix
Apply automated fixes to Dart source code.

This tool looks for and fixes analysis issues that have associated automated fixes.

To use the tool, run either 'dart fix --dry-run' for a preview of the proposed changes for a project, or 'dart fix --apply' to apply the changes.

Usage: dart fix [arguments]
-h, --help                      Print this usage information.
-n, --dry-run                   Preview the proposed changes but make no changes.
    --apply                     Apply the proposed changes.
    --code=<code1,code2,...>    Apply fixes for one (or more) diagnostic codes.

Run "dart help" to see global options.
PS C:\Users\Rencis\dev\achieve_potential\achieve_potential> dart fix --dry-run
Computing fixes in achieve_potential (dry run)...
Error from the analysis server: Exception while getting bulk fixes: Exception generating fix for prefer_const_constructors in c:\users\rencis\dev\achieve_potential\achieve_potential\lib\flutter_flow\flutter_flow_util.dart
Bad state: Can't create both a generic file edit and a dart file edit for the same file
#0      ChangeBuilderImpl.addDartFileEdit (package:analyzer_plugin/src/utilities/change_builder/change_builder_core.dart:134:7)
#1      AddConst.compute.insertAtOffset (package:analysis_server/src/services/correction/dart/add_const.dart:114:21)
#2      AddConst.compute (package:analysis_server/src/services/correction/dart/add_const.dart:142:15)
#3      BulkFixProcessor._applyProducer (package:analysis_server/src/services/correction/bulk_fix_processor.dart:309:22)
#4      BulkFixProcessor._generateFix (package:analysis_server/src/services/correction/bulk_fix_processor.dart:824:11)
#5      BulkFixProcessor._bulkApply (package:analysis_server/src/services/correction/bulk_fix_processor.dart:325:15)
#6      BulkFixProcessor._fixSingleError (package:analysis_server/src/services/correction/bulk_fix_processor.dart:708:15)
#7      BulkFixProcessor._fixErrorsInLibraryUnit (package:analysis_server/src/services/correction/bulk_fix_processor.dart:612:13)
<asynchronous suspension>
#8      BulkFixProcessor._fixErrorsInLibrary (package:analysis_server/src/services/correction/bulk_fix_processor.dart:567:7)
<asynchronous suspension>
#9      BulkFixProcessor._computeFixes (package:analysis_server/src/services/correction/bulk_fix_processor.dart:456:11)
<asynchronous suspension>
#10     EditBulkFixes.handle (package:analysis_server/src/handler/legacy/edit_bulk_fixes.dart:50:22)
<asynchronous suspension>
#11     LegacyAnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/legacy_analysis_server.dart:552:11)
<asynchronous suspension>
#12     OperationPerformanceImpl.runAsync (package:analyzer/src/util/performance/operation_performance.dart:172:14)
<asynchronous suspension>
#13     LegacyAnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/legacy_analysis_server.dart:533:7)
<asynchronous suspension>


#0      BulkFixProcessor._fixSingleError (package:analysis_server/src/services/correction/bulk_fix_processor.dart:743:7)
<asynchronous suspension>
#1      BulkFixProcessor._fixErrorsInLibraryUnit (package:analysis_server/src/services/correction/bulk_fix_processor.dart:612:7)
<asynchronous suspension>
#2      BulkFixProcessor._fixErrorsInLibrary (package:analysis_server/src/services/correction/bulk_fix_processor.dart:567:7)
<asynchronous suspension>
#3      BulkFixProcessor._computeFixes (package:analysis_server/src/services/correction/bulk_fix_processor.dart:456:11)
<asynchronous suspension>
#4      EditBulkFixes.handle (package:analysis_server/src/handler/legacy/edit_bulk_fixes.dart:50:22)
<asynchronous suspension>
#5      LegacyAnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/legacy_analysis_server.dart:552:11)
<asynchronous suspension>
#6      OperationPerformanceImpl.runAsync (package:analyzer/src/util/performance/operation_performance.dart:172:14)
<asynchronous suspension>
#7      LegacyAnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/legacy_analysis_server.dart:533:7)
<asynchronous suspension>


#0      BulkFixProcessor._fixSingleError (package:analysis_server/src/services/correction/bulk_fix_processor.dart:743:7)
<asynchronous suspension>
#1      BulkFixProcessor._fixErrorsInLibraryUnit (package:analysis_server/src/services/correction/bulk_fix_processor.dart:612:7)
<asynchronous suspension>
#2      BulkFixProcessor._fixErrorsInLibrary (package:analysis_server/src/services/correction/bulk_fix_processor.dart:567:7)
<asynchronous suspension>
#3      BulkFixProcessor._computeFixes (package:analysis_server/src/services/correction/bulk_fix_processor.dart:456:11)
<asynchronous suspension>
#4      EditBulkFixes.handle (package:analysis_server/src/handler/legacy/edit_bulk_fixes.dart:50:22)
<asynchronous suspension>
#5      LegacyAnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/legacy_analysis_server.dart:552:11)
<asynchronous suspension>
#6      OperationPerformanceImpl.runAsync (package:analyzer/src/util/performance/operation_performance.dart:172:14)
<asynchronous suspension>
#7      LegacyAnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/legacy_analysis_server.dart:533:7)
<asynchronous suspension>

It hasn't finished responding to the task til now, I can't type in the terminal, been waiting a long time.

I ran flutter run and I expected it to run as shown in the video, but it threw out these errors:

PS C:\Users\Rencis\dev\achieve_potential\achieve_potential> flutter run
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Upgrading build.gradle
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

Unhandled exception:
type 'Null' is not a subtype of type 'Constant' in type cast
#0      MapBase.entries.<anonymous closure> (dart:collection/maps.dart:76)
#1      MappedIterator.moveNext (dart:_internal/iterable.dart:403)
#2      _Hash.combineMapHashUnordered (package:kernel/ast.dart:15118)
#3      InstanceConstant.hashCode (package:kernel/ast.dart:14121)
#4      InstanceConstant.hashCode (package:kernel/ast.dart)
#5      _OperatorEqualsAndHashCode._hashCode (dart:collection-patch/compact_hash.dart:254)
#6      _LinkedHashMapMixin._getValueOrData (dart:collection-patch/compact_hash.dart:587)
#7      _LinkedHashMapMixin.[] (dart:collection-patch/compact_hash.dart:610)
#8      ConstantIndexer.put (package:kernel/binary/ast_to_binary.dart:3377)
#9      BinaryPrinter.writeConstantReference (package:kernel/binary/ast_to_binary.dart:192)
#10     BinaryPrinter.visitConstantExpression (package:kernel/binary/ast_to_binary.dart:2272)
#11     ConstantExpression.accept (package:kernel/ast.dart:8654)
#12     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:444)
#13     BinaryPrinter.writeAnnotation (package:kernel/binary/ast_to_binary.dart:1255)
#14     BinaryPrinter.writeAnnotationList (package:kernel/binary/ast_to_binary.dart:1263)
#15     BinaryPrinter.writeVariableDeclaration (package:kernel/binary/ast_to_binary.dart:2435)
#16     BinaryPrinter.visitFunctionDeclaration (package:kernel/binary/ast_to_binary.dart:2462)
#17     FunctionDeclaration.accept (package:kernel/ast.dart:10816)
#18     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:444)
#19     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:353)
#20     BinaryPrinter.visitBlockExpression (package:kernel/binary/ast_to_binary.dart:2173)
#21     BlockExpression.accept (package:kernel/ast.dart:8777)
#22     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:444)
#23     BinaryPrinter.visitFunctionInvocation (package:kernel/binary/ast_to_binary.dart:1799)
#24     FunctionInvocation.accept (package:kernel/ast.dart:6063)
#25     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:444)
#26     BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:536)
#27     BinaryPrinter.writeVariableDeclaration (package:kernel/binary/ast_to_binary.dart:2439)
#28     BinaryPrinter.visitVariableDeclaration (package:kernel/binary/ast_to_binary.dart:2425)
#29     VariableDeclaration.accept (package:kernel/ast.dart:10744)
#30     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:444)
#31     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:353)
#32     BinaryPrinter.visitBlock (package:kernel/binary/ast_to_binary.dart:2222)
#33     Block.accept (package:kernel/ast.dart:9195)
#34     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:444)
#35     BinaryPrinter.visitTryFinally (package:kernel/binary/ast_to_binary.dart:2410)
#36     TryFinally.accept (package:kernel/ast.dart:10375)
#37     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:444)
#38     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:353)
#39     BinaryPrinter.visitBlock (package:kernel/binary/ast_to_binary.dart:2222)
#40     Block.accept (package:kernel/ast.dart:9195)
#41     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:444)
#42     BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:536)
#43     BinaryPrinter.visitFunctionNode (package:kernel/binary/ast_to_binary.dart:1568)
#44     FunctionNode.accept (package:kernel/ast.dart:3886)
#45     BinaryPrinter.writeFunctionNode (package:kernel/binary/ast_to_binary.dart:451)
#46     BinaryPrinter.visitProcedure (package:kernel/binary/ast_to_binary.dart:1395)
#47     Procedure.accept (package:kernel/ast.dart:3243)
#48     BinaryPrinter.writeProcedureNode (package:kernel/binary/ast_to_binary.dart:472)
#49     BinaryPrinter.writeProcedureNodeList (package:kernel/binary/ast_to_binary.dart:362)
#50     BinaryPrinter.visitClass (package:kernel/binary/ast_to_binary.dart:1298)
#51     Class.accept (package:kernel/ast.dart:1461)
#52     BinaryPrinter.writeClassNode (package:kernel/binary/ast_to_binary.dart:486)
#53     BinaryPrinter.writeClassNodeList (package:kernel/binary/ast_to_binary.dart:380)
#54     BinaryPrinter.visitLibrary (package:kernel/binary/ast_to_binary.dart:1134)
#55     Library.accept (package:kernel/ast.dart:585)
#56     BinaryPrinter.writeLibraryNode (package:kernel/binary/ast_to_binary.dart:465)
#57     BinaryPrinter.writeLibraries (package:kernel/binary/ast_to_binary.dart:804)
#58     BinaryPrinter.writeComponentFile.<anonymous closure> (package:kernel/binary/ast_to_binary.dart:610)
#59     Timeline.timeSync (dart:developer/timeline.dart:173)
#60     BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:591)
#61     IncrementalSerializer.serialize (package:front_end/src/fasta/incremental_serializer.dart:308)
#62     IncrementalSerializer.writePackagesToSinkAndTrimComponent (package:front_end/src/fasta/incremental_serializer.dart:158)
#63     FrontendCompiler.writeDillFile (package:frontend_server/frontend_server.dart:843)
#64     FrontendCompiler.compile (package:frontend_server/frontend_server.dart:658)
<asynchronous suspension>
#65     starter (package:frontend_server/starter.dart:101)
<asynchronous suspension>
#66     main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13)
<asynchronous suspension>

Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\Rencis\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1419

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\Rencis\dev\flutter\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 36s
Running Gradle task 'assembleDebug'...                             37.2s
Error: Gradle task assembleDebug failed with exit code 1

I also tried using my own phone for running the application (before I used emulators) but that too didn't work.

I have no idea what is causing the issue. I assume that I currently do not need to migrate, because there will be problems only in future releases.

Please someone help me fix this issues and get the application going. I am really desperate. If there is needed more information to understand the issue, I will be glad to give it.

Thank you for reading this post.

Edit: Alright, Apologies for my late response. This should give more information about what is the problem. I imported a new flutterflow project, with some minor changes in it and ran some commands as suggested.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\Rencis\dev\achieve_potential_sql2\achieve_potential> dart fix --dry-run
Computing fixes in achieve_potential (dry run)...
Nothing to fix!
PS C:\Users\Rencis\dev\achieve_potential_sql2\achieve_potential> flutter pub get
Resolving dependencies... (4.3s)
+ async 2.11.0
+ auto_size_text 3.0.0
+ boolean_selector 2.1.1
+ cached_network_image 3.3.1
+ cached_network_image_platform_interface 4.0.0
+ cached_network_image_web 1.1.1
+ characters 1.3.0
+ clock 1.1.1
+ collection 1.18.0
+ crypto 3.0.3
+ cupertino_icons 1.0.6
+ fake_async 1.3.1
+ ffi 2.1.2
+ file 7.0.0
+ fixnum 1.1.0
+ flutter 0.0.0 from sdk flutter
+ flutter_animate 4.1.1+1 (4.5.0 available)
+ flutter_cache_manager 3.3.1
+ flutter_lints 3.0.0 (3.0.1 available)
+ flutter_localizations 0.0.0 from sdk flutter
+ flutter_test 0.0.0 from sdk flutter
+ flutter_web_plugins 0.0.0 from sdk flutter
+ font_awesome_flutter 10.6.0 (10.7.0 available)
+ from_css_color 2.0.0
+ go_router 7.1.1 (13.2.1 available)
+ google_fonts 6.1.0 (6.2.1 available)
! http 1.2.0 (overridden) (1.2.1 available)
+ http_parser 4.0.2
+ intl 0.18.1 (0.19.0 available)
+ iregexp 0.1.1 (0.1.2 available)
+ json_path 0.6.2 (0.7.1 available)
+ leak_tracker 10.0.4
+ leak_tracker_flutter_testing 2.0.1 (3.0.3 available)
+ leak_tracker_testing 2.0.3 (3.0.1 available)
+ lints 3.0.0
+ logging 1.2.0
+ matcher 0.12.16+1
+ material_color_utilities 0.8.0 (0.11.1 available)
+ maybe_just_nothing 0.5.3
+ meta 1.12.0
+ nested 1.0.0
+ octo_image 2.0.0
+ page_transition 2.1.0
+ path 1.9.0
+ path_provider 2.0.14 (2.1.2 available)
+ path_provider_android 2.0.25 (2.2.2 available)
+ path_provider_foundation 2.2.2 (2.3.2 available)
+ path_provider_linux 2.1.11 (2.2.1 available)
+ path_provider_platform_interface 2.0.6 (2.1.2 available)
+ path_provider_windows 2.1.7 (2.2.1 available)
+ petitparser 5.4.0 (6.0.2 available)
+ platform 3.1.4
+ plugin_platform_interface 2.1.8
+ provider 6.0.5 (6.1.2 available)
+ rfc_6901 0.1.1 (0.2.0 available)
+ rxdart 0.27.7
+ shared_preferences 2.2.2
+ shared_preferences_android 2.2.1
+ shared_preferences_foundation 2.3.4 (2.3.5 available)
+ shared_preferences_linux 2.3.2
+ shared_preferences_platform_interface 2.3.1 (2.3.2 available)
+ shared_preferences_web 2.2.1 (2.3.0 available)
+ shared_preferences_windows 2.3.2
+ sky_engine 0.0.99 from sdk flutter
+ source_span 1.10.0
+ sprintf 7.0.0
+ sqflite 2.2.6 (2.3.2 available)
+ sqflite_common 2.5.4
+ stack_trace 1.11.1
+ stream_channel 2.1.2
+ string_scanner 1.2.0
+ synchronized 3.1.0+1
+ term_glyph 1.2.1
+ test_api 0.6.1 (0.7.0 available)
+ timeago 3.2.2 (3.6.1 available)
+ typed_data 1.3.2
+ url_launcher 6.2.5
+ url_launcher_android 6.3.0
+ url_launcher_ios 6.2.5
+ url_launcher_linux 3.1.1
+ url_launcher_macos 3.1.0
+ url_launcher_platform_interface 2.3.2
+ url_launcher_web 2.2.3 (2.3.0 available)
+ url_launcher_windows 3.1.1
! uuid 4.3.3 (overridden)
+ vector_math 2.1.4
+ vm_service 13.0.0 (14.1.0 available)
+ web 0.4.2 (0.5.1 available)
+ win32 5.3.0
+ xdg_directories 1.0.4
Changed 88 dependencies!
30 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
PS C:\Users\Rencis\dev\achieve_potential_sql2\achieve_potential> flutter pub outdated
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name                           Current   Upgradable  Resolvable  Latest  

direct dependencies:
flutter_animate                        *4.1.1+1  *4.1.1+1    4.5.0       4.5.0
font_awesome_flutter                   *10.6.0   *10.6.0     10.7.0      10.7.0
go_router                              *7.1.1    *7.1.1      13.2.1      13.2.1
google_fonts                           *6.1.0    *6.1.0      *6.2.0      6.2.1
intl                                   *0.18.1   *0.18.1     *0.18.1     0.19.0
json_path                              *0.6.2    *0.6.2      0.7.1       0.7.1
path_provider                          *2.0.14   *2.0.14     2.1.2       2.1.2
path_provider_android                  *2.0.25   *2.0.25     2.2.2       2.2.2
path_provider_foundation               *2.2.2    *2.2.2      2.3.2       2.3.2
path_provider_platform_interface       *2.0.6    *2.0.6      2.1.2       2.1.2
provider                               *6.0.5    *6.0.5      6.1.2       6.1.2
shared_preferences_foundation          *2.3.4    *2.3.4      2.3.5       2.3.5
shared_preferences_platform_interface  *2.3.1    *2.3.1      2.3.2       2.3.2
shared_preferences_web                 *2.2.1    *2.2.1      *2.2.2      2.3.0
sqflite                                *2.2.6    *2.2.6      2.3.2       2.3.2
timeago                                *3.2.2    *3.2.2      3.6.1       3.6.1

dev_dependencies:
flutter_lints                          *3.0.0    *3.0.0      3.0.1       3.0.1

16  dependencies are constrained to versions that are older than a resolvable version.
To update these dependencies, edit pubspec.yaml, or run `flutter pub upgrade --major-versions`.
PS C:\Users\Rencis\dev\achieve_potential_sql2\achieve_potential> flutter pub upgrade --major-versions
Resolving dependencies... (2.7s)
> flutter_animate 4.5.0 (was 4.1.1+1)
> flutter_lints 3.0.1 (was 3.0.0)
+ flutter_shaders 0.1.2
> font_awesome_flutter 10.7.0 (was 10.6.0)
> go_router 13.2.1 (was 7.1.1)
> google_fonts 6.2.0 (was 6.1.0) (6.2.1 available)
! http 1.2.0 (overridden) (1.2.1 available)
  intl 0.18.1 (0.19.0 available)
> iregexp 0.1.2 (was 0.1.1)
> json_path 0.7.1 (was 0.6.2)
  leak_tracker_flutter_testing 2.0.1 (3.0.3 available)
  leak_tracker_testing 2.0.3 (3.0.1 available)
  material_color_utilities 0.8.0 (0.11.1 available)
> path_provider 2.1.2 (was 2.0.14)
> path_provider_android 2.2.2 (was 2.0.25)
> path_provider_foundation 2.3.2 (was 2.2.2)
> path_provider_linux 2.2.1 (was 2.1.11)
> path_provider_platform_interface 2.1.2 (was 2.0.6)
> path_provider_windows 2.2.1 (was 2.1.7)
> petitparser 6.0.2 (was 5.4.0)
> provider 6.1.2 (was 6.0.5)
> rfc_6901 0.2.0 (was 0.1.1)
> shared_preferences_foundation 2.3.5 (was 2.3.4)
> shared_preferences_platform_interface 2.3.2 (was 2.3.1)
> shared_preferences_web 2.2.2 (was 2.2.1) (2.3.0 available)
> sqflite 2.3.2 (was 2.2.6)
  test_api 0.6.1 (0.7.0 available)
> timeago 3.6.1 (was 3.2.2)
  url_launcher_web 2.2.3 (2.3.0 available)
! uuid 4.3.3 (overridden)
  vm_service 13.0.0 (14.1.0 available)
  web 0.4.2 (0.5.1 available)
Changed 22 dependencies!
11 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

Changed 16 constraints in pubspec.yaml:
  flutter_animate: 4.1.1+1 -> ^4.5.0
  font_awesome_flutter: 10.6.0 -> ^10.7.0
  go_router: 7.1.1 -> ^13.2.1
  google_fonts: 6.1.0 -> ^6.2.0
  json_path: 0.6.2 -> ^0.7.1
  path_provider: 2.0.14 -> ^2.1.2
  path_provider_android: 2.0.25 -> ^2.2.2
  path_provider_foundation: 2.2.2 -> ^2.3.2
  path_provider_platform_interface: 2.0.6 -> ^2.1.2
  provider: 6.0.5 -> ^6.1.2
  shared_preferences_foundation: 2.3.4 -> ^2.3.5
  shared_preferences_platform_interface: 2.3.1 -> ^2.3.2
  shared_preferences_web: 2.2.1 -> ^2.2.2
  sqflite: 2.2.6 -> ^2.3.2
  timeago: 3.2.2 -> ^3.6.1
  flutter_lints: 3.0.0 -> ^3.0.1
PS C:\Users\Rencis\dev\achieve_potential_sql2\achieve_potential> dart fix --dry-run
Computing fixes in achieve_potential (dry run)...

2 proposed fixes in 2 files.

pubspec.yaml
  MISSING_DEPENDENCY • 1 fix

test\widget_test.dart
  prefer_const_constructors • 1 fix

To fix an individual diagnostic, run one of:
  dart fix --apply --code=MISSING_DEPENDENCY
  dart fix --apply --code=prefer_const_constructors

To fix all diagnostics, run:
  dart fix --apply
PS C:\Users\Rencis\dev\achieve_potential_sql2\achieve_potential> 

after the dart fix --dry-run command, it shows me 2 errors that I have no idea how to fix in 2 scripts - pubspec.yaml and test\widget_test.dart.

The first scripts error in the logs shows up like this:

error: Undefined name 'queryParameters'. (undefined_identifier at [achieve_potential] lib\flutter_flow\nav\nav.dart:72)

Here is how the first scripts error looks like in the script itself:

extension _GoRouterStateExtensions on GoRouterState {
  Map<String, dynamic> get extraMap =>
      extra != null ? extra as Map<String, dynamic> : {};
  Map<String, dynamic> get allParams => <String, dynamic>{}
    ..addAll(pathParameters)
    ..addAll(queryParameters)
    ..addAll(extraMap);
  TransitionInfo get transitionInfo => extraMap.containsKey(kTransitionInfoKey)
      ? extraMap[kTransitionInfoKey] as TransitionInfo
      : TransitionInfo.appDefault();
}

The line with the error - ..addAll(queryParameters) the error word - queryParameters.

The second error in logs shows this text:

error: The getter 'location' isn't defined for the type 'GoRouter'. (undefined_getter at [achieve_potential] lib\flutter_flow\nav\nav.dart:217)

In the script itself ther error looks like this:

class RootPageContext {
  const RootPageContext(this.isRootPage, [this.errorRoute]);
  final bool isRootPage;
  final String? errorRoute;

  static bool isInactiveRootPage(BuildContext context) {
    final rootPageContext = context.read<RootPageContext?>();
    final isRootPage = rootPageContext?.isRootPage ?? false;
    final location = GoRouter.of(context).location;
    return isRootPage &&
        location != '/' &&
        location != rootPageContext?.errorRoute;
  }

the error is this line - final location = GoRouter.of(context).location; specifically the word location.

I fixed the first script's error by deleting the whole line with the error, while the second script's error I fixed by deleting the word that was causing the error. I have no idea if that was a correct way to solve it, but the application launched. Once again, I would extremely appriciate any feedback, thanks for your time! Hope this clarifys my issue.

0

There are 0 best solutions below