Updating major versions in Flutter

In the best case scenario, running flutter pub upgrade --major-versions does the trick. What happens though is that some packages restrict the major version we can upgrade to.

% flutter pub upgrade --major-versions        
Resolving dependencies... (2.2s)
No changes to pubspec.yaml!
Resolving dependencies... 
Downloading packages... 
  _discoveryapis_commons 1.0.6 (1.0.7 available)
  _fe_analyzer_shared 61.0.0 (76.0.0 available)
  _flutterfire_internals 1.3.7 (1.3.44 available)
  analyzer 5.13.0 (6.11.0 available)
  analyzer_plugin 0.11.2 (0.11.3 available)
  cloud_firestore 4.9.3 (5.4.4 available)
  cloud_firestore_platform_interface 5.16.2 (6.4.3 available)
  cloud_firestore_web 3.7.2 (4.3.2 available)
  collection 1.18.0 (1.19.0 available)
  dart_code_metrics 5.7.6 (discontinued)
  dart_code_metrics_presets 1.8.0 (2.17.0 available)
  dart_style 2.3.2 (2.3.7 available)
  desktop_webview_auth 0.0.12 (0.0.15 available)
  email_validator 2.1.17 (3.0.0 available)
  fake_cloud_firestore 2.4.1+1 (3.0.3 available)
  file 6.1.4 (7.0.1 available)
  firebase_analytics 10.5.1 (11.3.3 available)
  firebase_analytics_platform_interface 3.7.1 (4.2.5 available)
  firebase_analytics_web 0.5.5+1 (0.5.10+2 available)
  firebase_auth 4.10.1 (5.3.1 available)
  firebase_auth_mocks 0.12.0 (0.14.1 available)
  firebase_auth_platform_interface 6.19.1 (7.4.7 available)
  firebase_auth_web 5.8.2 (5.13.2 available)
  firebase_core 2.17.0 (3.6.0 available)
  firebase_core_platform_interface 4.8.0 (5.3.0 available)
  firebase_core_web 2.8.0 (2.18.1 available)
  firebase_dynamic_links 5.3.7 (6.0.8 available)
  firebase_dynamic_links_platform_interface 0.2.6+7 (0.2.6+44 available)
  firebase_ui_auth 1.4.0 (1.16.0 available)
  firebase_ui_firestore 1.5.12 (1.7.0 available)
  firebase_ui_oauth 1.4.0 (1.6.0 available)
  firebase_ui_oauth_apple 1.2.0 (1.3.0 available)
  firebase_ui_oauth_google 1.2.0 (1.4.0 available)
  flutter_svg 1.1.6 (2.0.10+1 available)
  google_fonts 4.0.4 (6.2.1 available)
  googleapis 13.1.0 (13.2.0 available)
  googleapis_auth 1.4.1 (1.6.0 available)
  http 0.13.6 (1.2.2 available)
  http_parser 4.0.2 (4.1.0 available)
  js 0.6.7 (0.7.1 available)
  leak_tracker 10.0.5 (10.0.7 available)
  leak_tracker_flutter_testing 3.0.5 (3.0.8 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
  more 3.10.2 (4.3.0 available)
  process 4.2.4 (5.0.2 available)
  pub_updater 0.3.0 (0.5.0 available)
  rx 0.1.3 (0.4.0 available)
  rxdart 0.27.7 (0.28.0 available)
  shelf 1.4.1 (1.4.2 available)
  stack_trace 1.11.1 (1.12.0 available)
  string_scanner 1.2.0 (1.3.0 available)
  svg_drawing_animation 0.10.3+2 (0.11.0 available)
  test_api 0.7.2 (0.7.3 available)
  uuid 3.0.7 (4.5.1 available)
  vm_service 14.2.5 (14.3.0 available)
No dependencies changed.
1 package is discontinued.
55 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

Let's see if flutter pub outdated tells me what package prevents upgrading:

% flutter pub outdated                
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name                               Current    Upgradable  Resolvable  Latest    

direct dependencies:                      
cloud_firestore                            *4.9.3     *4.9.3      *4.9.3      5.4.4     
collection                                 *1.18.0    *1.18.0     *1.18.0     1.19.0    
firebase_analytics                         *10.5.1    *10.5.1     *10.5.1     11.3.3    
firebase_auth                              *4.10.1    *4.10.1     *4.10.1     5.3.1     
firebase_ui_auth                           *1.4.0     *1.4.0      *1.4.0      1.16.0    
firebase_ui_firestore                      *1.5.12    *1.5.12     *1.5.12     1.7.0     
firebase_ui_oauth_apple                    *1.2.0     *1.2.0      *1.2.0      1.3.0     
firebase_ui_oauth_google                   *1.2.0     *1.2.0      *1.2.0      1.4.0     
google_fonts                               *4.0.4     *4.0.4      *4.0.4      6.2.1     
googleapis                                 *13.1.0    *13.1.0     *13.1.0     13.2.0    
googleapis_auth                            *1.4.1     *1.4.1      *1.4.1      1.6.0     
http                                       *0.13.6    *0.13.6     *0.13.6     1.2.2     
svg_drawing_animation                      *0.10.3+2  *0.10.3+2   *0.10.3+2   0.11.0    

dev_dependencies:                         
fake_cloud_firestore                       *2.4.1+1   *2.4.1+1    *2.4.1+1    3.0.3     
firebase_auth_mocks                        *0.12.0    *0.12.0     *0.12.0     0.14.1    

transitive dependencies:                  
_discoveryapis_commons                     *1.0.6     *1.0.6      *1.0.6      1.0.7     
_flutterfire_internals                     *1.3.7     *1.3.7      *1.3.7      1.3.44    
cloud_firestore_platform_interface         *5.16.2    *5.16.2     *5.16.2     6.4.3     
cloud_firestore_web                        *3.7.2     *3.7.2      *3.7.2      4.3.2     
desktop_webview_auth                       *0.0.12    *0.0.12     *0.0.12     0.0.15    
email_validator                            *2.1.17    *2.1.17     *2.1.17     3.0.0     
file                                       *6.1.4     *6.1.4      *6.1.4      7.0.1     
firebase_analytics_platform_interface      *3.7.1     *3.7.1      *3.7.1      4.2.5     
firebase_analytics_web                     *0.5.5+1   *0.5.5+1    *0.5.5+1    0.5.10+2  
firebase_auth_platform_interface           *6.19.1    *6.19.1     *6.19.1     7.4.7     
firebase_auth_web                          *5.8.2     *5.8.2      *5.8.2      5.13.2    
firebase_core                              *2.17.0    *2.17.0     *2.17.0     3.6.0     
firebase_core_platform_interface           *4.8.0     *4.8.0      *4.8.0      5.3.0     
firebase_core_web                          *2.8.0     *2.8.0      *2.8.0      2.18.1    
firebase_dynamic_links                     *5.3.7     *5.3.7      *5.3.7      6.0.8     (discontinued)  
firebase_dynamic_links_platform_interface  *0.2.6+7   *0.2.6+7    *0.2.6+7    0.2.6+44  
firebase_ui_oauth                          *1.4.0     *1.4.0      *1.4.0      1.6.0     
flutter_svg                                *1.1.6     *1.1.6      *1.1.6      2.0.10+1  
http_parser                                *4.0.2     *4.0.2      *4.0.2      4.1.0     
js                                         *0.6.7     *0.6.7      *0.6.7      0.7.1     
leak_tracker                               *10.0.5    *10.0.5     *10.0.5     10.0.7    
leak_tracker_flutter_testing               *3.0.5     *3.0.5      *3.0.5      3.0.8     
material_color_utilities                   *0.11.1    *0.11.1     *0.11.1     0.12.0    
meta                                       *1.15.0    *1.15.0     *1.15.0     1.16.0    
stack_trace                                *1.11.1    *1.11.1     *1.11.1     1.12.0    
string_scanner                             *1.2.0     *1.2.0      *1.2.0      1.3.0     
test_api                                   *0.7.2     *0.7.2      *0.7.2      0.7.3     
uuid                                       *3.0.7     *3.0.7      *3.0.7      4.5.1     
vm_service                                 *14.2.5    *14.2.5     *14.2.5     14.3.0    

transitive dev_dependencies:              
_fe_analyzer_shared                        *61.0.0    *61.0.0     *61.0.0     76.0.0    
analyzer                                   *5.13.0    *5.13.0     *5.13.0     6.11.0    
analyzer_plugin                            *0.11.2    *0.11.2     *0.11.2     0.11.3    
dart_code_metrics_presets                  *1.8.0     *1.8.0      *1.8.0      2.17.0    
dart_style                                 *2.3.2     *2.3.2      *2.3.2      2.3.7     
more                                       *3.10.2    *3.10.2     *3.10.2     4.3.0     
process                                    *4.2.4     *4.2.4      *4.2.4      5.0.2     
pub_updater                                *0.3.0     *0.3.0      *0.3.0      0.5.0     
rx                                         *0.1.3     *0.1.3      *0.1.3      0.4.0     
rxdart                                     *0.27.7    *0.27.7     *0.27.7     0.28.0    
shelf                                      *1.4.1     *1.4.1      *1.4.1      1.4.2     
You are already using the newest resolvable versions listed in the 'Resolvable' column.
Newer versions, listed in 'Latest', may not be mutually compatible.

firebase_dynamic_links
    Package firebase_dynamic_links has been discontinued. See https://dart.dev/go/package-discontinue

Not really!

Let's manually upgrade and see what happens:

cloud_firestore: ^5.4.4
Resolving dependencies...
Because cloud_firestore >=5.4.3 depends on firebase_core ^3.6.0 and firebase_auth_mocks 0.12.0 depends on firebase_core ^2.3.0, cloud_firestore >=5.4.3 is incompatible with firebase_auth_mocks 0.12.0.
And because no versions of firebase_auth_mocks match >0.12.0 <0.13.0, cloud_firestore >=5.4.3 is incompatible with firebase_auth_mocks ^0.12.0.
So, because flashcards depends on both cloud_firestore ^5.4.4 and firebase_auth_mocks ^0.12.0, version solving failed.

Now come the errors.

It turns out we can't use collection 1.19.0. We have to use 1.18.0:

flutter pub get --no-example
Resolving dependencies...
Note: collection is pinned to version 1.18.0 by flutter_test from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because every version of flutter_test from sdk depends on collection 1.18.0 and flashcards depends on collection ^1.19.0, flutter_test from sdk is forbidden.
So, because flashcards depends on flutter_test from sdk, version solving failed.

Then there were some incompatible transitive dependencies. Here two dependencies use different major versions of flutter_svg:

Because every version of kanji_drawing_animation depends on svg_drawing_animation ^0.10.3 which depends on flutter_svg ^1.1.6, every version of kanji_drawing_animation requires flutter_svg ^1.1.6.
And because firebase_ui_oauth_google >=1.4.0 depends on firebase_ui_oauth ^1.6.0 which depends on flutter_svg ^2.0.9, kanji_drawing_animation is incompatible with firebase_ui_oauth_google >=1.4.0.
So, because flashcards depends on both firebase_ui_oauth_google ^1.4.0 and kanji_drawing_animation ^0.5.0, version solving failed.

I solved this by adding overrides:

dependency_overrides:
  # Remove when kanji_drawing_animation depends on svg_drawing_animation upgrade the dependency to http.
  http: ^1.2.2
  # Remove when kanji_drawing_animation upgrades flutter_svg.
  # Because firebase_ui_oauth_google >=1.4.0 depends on
  # firebase_ui_oauth ^1.6.0 which depends on flutter_svg ^2.0.9,
  # firebase_ui_oauth_google >=1.4.0 requires flutter_svg ^2.0.9.
  # And because every version of kanji_drawing_animation depends on
  # svg_drawing_animation ^0.10.3 which depends on flutter_svg ^1.1.6,
  # firebase_ui_oauth_google >=1.4.0 # is incompatible with kanji_drawing_animation.
  flutter_svg: ^2.0.9

Some sdk version error:


The current Dart SDK version is 3.5.3.

Because dart_code_metrics >=3.0.0-nullsafety.0 <3.0.0-nullsafety.2 depends on analyzer ^1.3.0 and dart_code_metrics >=4.2.0-dev.2 <4.2.0-dev.3 depends on analyzer ^2.0.0, dart_code_metrics >=3.0.0-nullsafety.0 <3.0.0-nullsafety.2 or >=4.2.0-dev.2 <4.2.0-dev.3 requires analyzer ^1.3.0 or ^2.0.0.
And because dart_code_metrics >=4.2.0-dev.3 <4.2.0-dev.4 depends on analyzer ^2.1.0, dart_code_metrics >=3.0.0-nullsafety.0 <3.0.0-nullsafety.2 or >=4.2.0-dev.2 <4.2.0-dev.4 requires analyzer ^1.3.0 or >=2.0.0 <3.0.0.
And because dart_code_metrics >=4.2.0-dev.4 <4.2.0 depends on analyzer ^1.7.0 and dart_code_metrics >=4.5.0-dev.1 <4.5.0-dev.2 depends on analyzer >=2.4.0 <2.6.0, dart_code_metrics >=3.0.0-nullsafety.0 <3.0.0-nullsafety.2 or >=4.2.0-dev.2 <4.2.0 or >=4.5.0-dev.1 <4.5.0-dev.2 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.0.0.
And because dart_code_metrics >=4.5.0-dev.2 <4.5.0 depends on analyzer >=2.4.0 <2.7.0 and dart_code_metrics >=4.10.0-dev.1 <4.10.0 depends on analyzer >=2.4.0 <3.2.0, dart_code_metrics >=3.0.0-nullsafety.0 <3.0.0-nullsafety.2 or >=4.2.0-dev.2 <4.2.0 or >=4.5.0-dev.1 <4.5.0 or >=4.10.0-dev.1 <4.10.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.2.0.
And because dart_code_metrics >=4.17.0-dev.1 <4.17.0 depends on analyzer >=4.1.0 <4.3.0 and dart_code_metrics >=4.18.0-dev.1 <4.18.0-dev.2 depends on analyzer >=4.1.0 <4.5.0, dart_code_metrics >=3.0.0-nullsafety.0 <3.0.0-nullsafety.2 or >=4.2.0-dev.2 <4.2.0 or >=4.5.0-dev.1 <4.5.0 or >=4.10.0-dev.1 <4.10.0 or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0-dev.2 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.2.0 or >=4.1.0 <4.5.0.
And because dart_code_metrics >=4.18.0-dev.2 <4.18.0 depends on analyzer >=4.1.0 <4.7.0 and dart_code_metrics <3.0.0-nullsafety.0 doesn't support null safety, dart_code_metrics <3.0.0-nullsafety.2 or >=4.2.0-dev.2 <4.2.0 or >=4.5.0-dev.1 <4.5.0 or >=4.10.0-dev.1 <4.10.0 or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.2.0 or >=4.1.0 <4.7.0.
And because dart_code_metrics >=3.0.0-nullsafety.2 <3.3.1 depends on analyzer ^1.4.0 and dart_code_metrics >=3.3.1 <4.0.0-dev.1 depends on analyzer >=1.4.0 <1.6.0, dart_code_metrics <4.0.0-dev.1 or >=4.2.0-dev.2 <4.2.0 or >=4.5.0-dev.1 <4.5.0 or >=4.10.0-dev.1 <4.10.0 or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.2.0 or >=4.1.0 <4.7.0.
And because dart_code_metrics >=4.0.0-dev.1 <4.2.0-dev.2 depends on analyzer ^1.7.0 and dart_code_metrics >=4.2.0 <=4.3.0-dev.1 depends on analyzer >=2.1.0 <2.2.0, dart_code_metrics <4.3.0-∞ or >=4.5.0-dev.1 <4.5.0 or >=4.10.0-dev.1 <4.10.0 or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.2.0 or >=4.1.0 <4.7.0.
And because dart_code_metrics >=4.3.0 <4.3.2 depends on analyzer >=2.1.0 <2.3.0 and dart_code_metrics >=4.3.2 <4.5.0-dev.1 depends on analyzer >=2.1.0 <2.4.0, dart_code_metrics <4.5.0-∞ or >=4.10.0-dev.1 <4.10.0 or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.2.0 or >=4.1.0 <4.7.0.
And because dart_code_metrics >=4.5.0 <4.8.0 depends on analyzer >=2.4.0 <2.8.0 and dart_code_metrics >=4.8.0 <4.9.0 depends on analyzer >=2.4.0 <2.9.0, dart_code_metrics <4.9.0-∞ or >=4.10.0-dev.1 <4.10.0 or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.2.0 or >=4.1.0 <4.7.0.
And because dart_code_metrics >=4.9.0 <4.10.0-dev.1 depends on analyzer >=2.4.0 <3.1.0 and dart_code_metrics >=4.10.0 <4.12.0 depends on analyzer >=2.4.0 <3.3.0, dart_code_metrics <4.12.0-∞ or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.3.0 or >=4.1.0 <4.7.0.
And because dart_code_metrics >=4.12.0 <4.13.0 depends on analyzer >=2.4.0 <3.4.0 and dart_code_metrics >=4.13.0 <4.14.0 depends on xml ^5.3.0, dart_code_metrics <4.14.0-∞ or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <3.4.0 or >=4.1.0 <4.7.0 or xml ^5.3.0.
And because dart_code_metrics >=4.14.0 <4.15.1 depends on analyzer >=2.4.0 <3.4.0 and dart_code_metrics >=4.15.1 <4.16.0 depends on analyzer >=2.4.0 <4.1.0, dart_code_metrics <4.16.0-∞ or >=4.17.0-dev.1 <4.17.0 or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <4.1.0 or >=4.1.0 <4.7.0 or xml ^5.3.0.
And because dart_code_metrics >=4.16.0 <4.17.0-dev.1 depends on analyzer >=2.4.0 <4.2.0 and dart_code_metrics >=4.17.0 <4.17.1 depends on analyzer >=4.0.0 <4.4.0, dart_code_metrics <4.17.1-∞ or >=4.18.0-dev.1 <4.18.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <4.7.0 or xml ^5.3.0.
And because dart_code_metrics >=4.17.1 <4.18.0-dev.1 depends on analyzer >=4.0.0 <4.7.0 and dart_code_metrics >=4.18.0 <4.20.0 depends on analyzer >=4.1.0 <4.8.0, dart_code_metrics <4.20.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <4.8.0 or xml ^5.3.0.
And because dart_code_metrics ^4.20.0 depends on analyzer >=5.1.0 <5.2.0 and dart_code_metrics >=5.0.0 <5.2.0 depends on analyzer >=5.1.0 <5.3.0, dart_code_metrics <5.2.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <4.8.0 or >=5.1.0 <5.3.0 or xml ^5.3.0.
And because dart_code_metrics >=5.2.0 <5.5.0 depends on analyzer >=5.1.0 <5.4.0 and dart_code_metrics >=5.5.0 <5.7.0 depends on analyzer >=5.1.0 <5.5.0, dart_code_metrics <5.7.0 requires analyzer >=1.3.0 <2.0.0 or >=2.0.0 <4.8.0 or >=5.1.0 <5.5.0 or xml ^5.3.0.
Because firebase_auth_mocks >=0.13.0 depends on uuid ^4.1.0 and dart_code_metrics >=5.7.0 depends on uuid ^3.0.7, firebase_auth_mocks >=0.13.0 is incompatible with dart_code_metrics >=5.7.0.
Thus, if firebase_auth_mocks >=0.13.0 and dart_code_metrics any then analyzer >=1.3.0 <2.0.0 or >=2.0.0 <4.8.0 or >=5.1.0 <5.5.0 or xml ^5.3.0.
And because mockito >=5.4.3 depends on analyzer >=5.12.0 <7.0.0 and mockito >=5.0.0 <5.0.1 depends on test_api ^0.2.19, if firebase_auth_mocks >=0.13.0 and dart_code_metrics any and mockito >=5.0.0 <5.0.1-∞ or >=5.4.3 then xml ^5.3.0 or test_api ^0.2.19.
And because mockito >=5.4.1 <5.4.4 depends on test_api >=0.2.1 <0.7.0 and mockito >=5.4.0 <5.4.1 depends on test_api >=0.2.1 <0.6.0, if firebase_auth_mocks >=0.13.0 and dart_code_metrics any and mockito >=5.0.0 <5.0.1-∞ or >=5.4.0 then xml ^5.3.0 or test_api >=0.2.1 <0.7.0.
And because mockito >=5.0.6 <5.4.0 depends on test_api >=0.2.1 <0.5.0 and mockito >=5.0.1 <5.0.6 depends on test_api >=0.2.1 <0.4.0, if firebase_auth_mocks >=0.13.0 and dart_code_metrics any and mockito >=5.0.0 then xml ^5.3.0 or test_api >=0.2.1 <0.7.0.
And because every version of flutter_test from sdk depends on test_api 0.7.2 and flashcards depends on xml ^6.1.0, one of firebase_auth_mocks >=0.13.0 or dart_code_metrics any or mockito >=5.0.0 or flutter_test from sdk must be false.
And because flashcards depends on both flutter_test from sdk and dart_code_metrics any, firebase_auth_mocks >=0.13.0 is incompatible with mockito >=5.0.0.
So, because flashcards depends on both mockito ^5.0.0 and firebase_auth_mocks ^0.14.1, version solving failed.

The lower bound of "sdk: '>=2.3.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety

That's a mouthful! Let's isolate errors one by one:

Because firebase_auth_mocks >=0.13.0 depends on uuid ^4.1.0 and dart_code_metrics >=5.7.0 depends on uuid ^3.0.7, firebase_auth_mocks >=0.13.0 is incompatible with dart_code_metrics >=5.7.0.

And it seems to have been the last error!

flutter pub get --no-example
Resolving dependencies...
Downloading packages...
  _discoveryapis_commons 1.0.6 (1.0.7 available)
  _fe_analyzer_shared 61.0.0 (76.0.0 available)
> _flutterfire_internals 1.3.44 (was 1.3.7)
  analyzer 5.13.0 (6.11.0 available)
  analyzer_plugin 0.11.2 (0.11.3 available)
> cloud_firestore 5.4.4 (was 4.9.3)
> cloud_firestore_platform_interface 6.4.3 (was 5.16.2)
> cloud_firestore_web 4.3.2 (was 3.7.2)
  collection 1.18.0 (1.19.0 available)
  dart_code_metrics 5.7.6 (discontinued)
  dart_code_metrics_presets 1.8.0 (2.17.0 available)
  dart_style 2.3.2 (2.3.7 available)
> desktop_webview_auth 0.0.15 (was 0.0.12)
  email_validator 2.1.17 (3.0.0 available)
> fake_cloud_firestore 3.0.3 (was 2.4.1+1)
  file 6.1.4 (7.0.1 available)
> firebase_analytics 11.3.3 (was 10.5.1)
> firebase_analytics_platform_interface 4.2.5 (was 3.7.1)
> firebase_analytics_web 0.5.10+2 (was 0.5.5+1)
> firebase_auth 5.3.1 (was 4.10.1)
> firebase_auth_mocks 0.14.1 (was 0.12.0)
> firebase_auth_platform_interface 7.4.7 (was 6.19.1)
> firebase_auth_web 5.13.2 (was 5.8.2)
> firebase_core 3.6.0 (was 2.17.0)
> firebase_core_platform_interface 5.3.0 (was 4.8.0)
> firebase_core_web 2.18.1 (was 2.8.0)
> firebase_dynamic_links 6.0.8 (was 5.3.7)
> firebase_dynamic_links_platform_interface 0.2.6+44 (was 0.2.6+7)
> firebase_ui_auth 1.16.0 (was 1.4.0)
> firebase_ui_firestore 1.7.0 (was 1.5.12)
> firebase_ui_oauth 1.6.0 (was 1.4.0)
> firebase_ui_oauth_apple 1.3.0 (was 1.2.0)
> firebase_ui_oauth_google 1.4.0 (was 1.2.0)
! flutter_svg 2.0.10+1 (overridden)
> google_fonts 6.2.1 (was 4.0.4)
> googleapis 13.2.0 (was 13.1.0)
> googleapis_auth 1.6.0 (was 1.4.1)
! http 1.2.2 (overridden)
  http_parser 4.0.2 (4.1.0 available)
  js 0.6.7 (0.7.1 available)
  leak_tracker 10.0.5 (10.0.7 available)
  leak_tracker_flutter_testing 3.0.5 (3.0.8 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
> more 4.2.0 (was 3.10.2) (4.3.0 available)
  process 4.2.4 (5.0.2 available)
  pub_updater 0.3.0 (0.5.0 available)
> rx 0.4.0 (was 0.1.3)
> rxdart 0.28.0 (was 0.27.7)
  shelf 1.4.1 (1.4.2 available)
+ sprintf 7.0.0
  stack_trace 1.11.1 (1.12.0 available)
  string_scanner 1.2.0 (1.3.0 available)
  svg_drawing_animation 0.10.3+2 (from direct dependency to transitive dependency) (0.11.0 available)
  test_api 0.7.2 (0.7.3 available)
! uuid 4.5.1 (overridden)
+ vector_graphics 1.1.11+1
+ vector_graphics_codec 1.1.11+1
+ vector_graphics_compiler 1.1.11+1
  vm_service 14.2.5 (14.3.0 available)
These packages are no longer being depended on:
- path_drawing 1.0.1
Changed 35 dependencies!
1 package is discontinued.
24 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
exit code 0

Let's also tighten the minimum versions:

% flutter pub upgrade --major-versions --tighten
Resolving dependencies... (1.7s)
Changed 19 constraints in pubspec.yaml:
  chinese_english_dictionary: ^0.6.0 -> ^0.6.1
  google_sign_in: ^6.1.4 -> ^6.2.1
  html2md: ^1.2.3 -> ^1.3.2
  jiffy: ^6.2.2 -> ^6.3.1
  recase: ^4.0.0 -> ^4.1.0
  stream_transform: ^2.0.0 -> ^2.1.0
  url_launcher: ^6.0.3 -> ^6.3.1
  xml: ^6.1.0 -> ^6.5.0
  permission_handler: ^11.1.0 -> ^11.3.1
  shared_preferences: ^2.0.5 -> ^2.3.2
  language_picker: ^0.4.4+1 -> ^0.4.5
  file_saver: ^0.2.5 -> ^0.2.14
  stats: ^2.0.0 -> ^2.1.0
  fluttertoast: ^8.1.1 -> ^8.2.8
  kanji_drawing_animation: ^0.5.0 -> ^0.5.0+1
  provider: ^6.0.5 -> ^6.1.2
  dart_code_metrics: any -> ^5.7.6
  mockito: ^5.0.0 -> ^5.4.4
  build_runner: ^2.3.2 -> ^2.4.13
Resolving dependencies... 
Downloading packages... 
> _discoveryapis_commons 1.0.7 (was 1.0.6)
  _fe_analyzer_shared 61.0.0 (76.0.0 available)
  analyzer 5.13.0 (6.11.0 available)
  analyzer_plugin 0.11.2 (0.11.3 available)
  collection 1.18.0 (1.19.0 available)
  dart_code_metrics 5.7.6 (discontinued)
  dart_code_metrics_presets 1.8.0 (2.17.0 available)
  dart_style 2.3.2 (2.3.7 available)
  email_validator 2.1.17 (3.0.0 available)
  file 6.1.4 (7.0.1 available)
! flutter_svg 2.0.10+1 (overridden)
! http 1.2.2 (overridden)
  http_parser 4.0.2 (4.1.0 available)
> js 0.7.1 (was 0.6.7)
  leak_tracker 10.0.5 (10.0.7 available)
  leak_tracker_flutter_testing 3.0.5 (3.0.8 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
  more 4.2.0 (4.3.0 available)
  process 4.2.4 (5.0.2 available)
> pub_updater 0.3.1 (was 0.3.0) (0.5.0 available)
  shelf 1.4.1 (1.4.2 available)
  stack_trace 1.11.1 (1.12.0 available)
  string_scanner 1.2.0 (1.3.0 available)
  svg_drawing_animation 0.10.3+2 (0.11.0 available)
  test_api 0.7.2 (0.7.3 available)
! uuid 4.5.1 (overridden)
  vm_service 14.2.5 (14.3.0 available)
Changed 3 dependencies!
1 package is discontinued.
22 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Warning: dependency_overrides prevents upgrades for: http

Let's update the pods:

% cd ios
anhtuan@MacMini ios % pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '11.2.0' defined in 'firebase_core'
firebase_analytics: Using Firebase SDK version '11.2.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '11.2.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '11.2.0' defined in 'firebase_core'
firebase_dynamic_links: Using Firebase SDK version '11.2.0' defined in 'firebase_core'
Downloading dependencies
Installing AppAuth (1.7.5)
Installing BoringSSL-GRPC (0.0.36)
Installing Firebase (11.2.0)
Installing FirebaseAnalytics (11.2.0)
Installing FirebaseAppCheckInterop (11.3.0)
Installing FirebaseAuth (11.2.0)
Installing FirebaseAuthInterop (11.3.0)
Installing FirebaseCore (11.2.0)
Installing FirebaseCoreExtension (11.3.0)
Installing FirebaseCoreInternal (11.3.0)
Installing FirebaseDynamicLinks (11.2.0)
Installing FirebaseFirestore (11.2.0)
Installing FirebaseFirestoreInternal (11.2.0)
Installing FirebaseInstallations (11.3.0)
Installing FirebaseSharedSwift (11.3.0)
Installing Flutter (1.0.0)
Installing GTMAppAuth (4.1.1)
Installing GTMSessionFetcher (3.5.0)
Installing GoogleAppMeasurement (11.2.0)
Installing GoogleSignIn (7.1.0)
Installing GoogleUtilities (8.0.2)
Installing PromisesObjC (2.4.0)
Installing RecaptchaInterop (100.0.0)
Installing Toast (4.1.1)
Installing abseil (1.20240116.2)
Installing cloud_firestore (5.4.4)
Installing desktop_webview_auth (0.0.1)
Installing file_saver (0.0.1)
Installing firebase_analytics (11.3.3)
Installing firebase_auth (5.3.1)
Installing firebase_core (3.6.0)
Installing firebase_dynamic_links (6.0.8)
Installing flutter_tts (0.0.1)
Installing fluttertoast (0.0.2)
Installing gRPC-C++ (1.65.5)
Installing gRPC-Core (1.65.5)
Installing google_sign_in_ios (0.0.1)
Installing leveldb-library (1.22.5)
Installing nanopb (3.30910.0)
Installing path_provider_foundation (0.0.1)
Installing permission_handler_apple (9.3.0)
Installing shared_preferences_foundation (0.0.1)
Installing sign_in_with_apple (0.0.1)
Installing url_launcher_ios (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 16 dependencies from the Podfile and 44 total pods installed.
anhtuan@MacMini ios % 

Everything is going smoothly! ...is what I thought. Turns out some of the APIs have broken the packages.

Target dart2js failed: ProcessException: Process exited abnormally with exit code 1:
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:6:8:
Error: Error when reading '../../.pub-cache/hosted/pub.dev/flutter_svg-2.0.10+1/lib/parser.dart': Error reading
'../../.pub-cache/hosted/pub.dev/flutter_svg-2.0.10+1/lib/parser.dart'  (No such file or directory)
import 'package:flutter_svg/parser.dart';
       ^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_drawing_animation.dart:60:34:
Error: Type 'Drawable' not found.
  static double getPathLengthSum(Drawable drawable) {
                                 ^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:18:16:
Error: Type 'DrawableRoot' not found.
  final Future<DrawableRoot> svg;
               ^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:20:10:
Error: Type 'DrawableRoot' not found.
  Future<DrawableRoot> resolve() => svg;
         ^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:26:37:
Error: Type 'DrawableRoot' not found.
  factory SvgProvider.future(Future<DrawableRoot> svg) {
                                    ^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/clipped_path_painter.dart:11:9:
Error: Type 'DrawableRoot' not found.
  final DrawableRoot drawableRoot;
        ^^^^^^^^^^^^
lib/admin_dashboard.dart:48:22:
Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't.
                    .count
                     ^
lib/admin_dashboard.dart:53:22:
Error: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't.
                    .count
                     ^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_drawing_animation.dart:60:34:
Error: 'Drawable' isn't a type.
  static double getPathLengthSum(Drawable drawable) {
                                 ^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_drawing_animation.dart:126:40:
Error: The getter 'viewport' isn't defined for the class 'Object'.
 - 'Object' is from 'dart:core'.
                        size: drawable.viewport.viewBox,
                                       ^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:18:16:
Error: 'DrawableRoot' isn't a type.
  final Future<DrawableRoot> svg;
               ^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:26:37:
Error: 'DrawableRoot' isn't a type.
  factory SvgProvider.future(Future<DrawableRoot> svg) {
                                    ^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:32:26:
Error: Method not found: 'SvgParser'.
    return SvgProvider._(SvgParser().parse(svgString));
                         ^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:47:22:
Error: Method not found: 'SvgParser'.
              return SvgParser().parse(response.body);
                     ^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:57:14:
Error: Method not found: 'SvgParser'.
      return SvgParser().parse(str);
             ^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/svg_provider.dart:64:21:
Error: Method not found: 'SvgParser'.
        () async => SvgParser().parse(await rootBundle.loadString(name))));
                    ^^^^^^^^^
../../.pub-cache/hosted/pub.dev/svg_drawing_animation-0.10.3+2/lib/src/clipped_path_painter.dart:11:9:
Error: 'DrawableRoot' isn't a type.
  final DrawableRoot drawableRoot;
        ^^^^^^^^^^^^
Error: Compilation failed.

Simply overriding dependencies won't work... I gotta put this on hold for now.