'Cannot run flutter application on newly set up environment

I've got a flutter app that has last been working on about two years ago and I wanted to pick it up from there and do some further changes. I installed flutter etc. and flutter doctor is happy.

First, I ran flutter create . to set up my devices, however when I run flutter run, I get this:

Multiple devices found:
macOS (desktop) • macos  • darwin-arm64   • macOS 12.3.1 21E258 darwin-arm
Chrome (web)    • chrome • web-javascript • Google Chrome 101.0.4951.64
[1]: macOS (macos)
[2]: Chrome (chrome)
Please choose one (To quit, press "q/Q"): 1
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
Launching lib/main.dart on macOS in debug mode...
objc[70027]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1ef231eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1053cc4f8). One of the two will be used. Which one is undefined.
objc[70027]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1ef231f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1053cc548). One of the two will be used. Which one is undefined.
objc[70027]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1ef231f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1053cc598). One of the two will be used. Which one is undefined.
objc[70027]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1ef231fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1053cc5e8). One of the two will be used. Which one is undefined.
objc[70027]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1ef231ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1053cc638). One of the two will be used. Which one is undefined.
objc[70027]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1ef232040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1053cc688). One of the two will be used. Which one is undefined.
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-001A51241AE2801E }
{ platform:macOS, arch:x86_64, id:00006000-001A51241AE2801E }
../../.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.3.4/lib/src/datetime_picker_theme.dart:15:9: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
  const DatePickerTheme({
        ^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/table_calendar-2.2.2/lib/src/calendar.dart:609:11: Error: No named parameter with the name 'overflow'.
          overflow: widget.calendarStyle.canEventMarkersOverflow ? Overflow.visible : Overflow.clip,
          ^^^^^^^^
../flutter/packages/flutter/lib/src/widgets/basic.dart:3708:3: Context: Found this candidate, but the arguments don't match.
  Stack({
  ^^^^^
../../.pub-cache/hosted/pub.dartlang.org/flutter_picker-1.1.0/lib/Picker.dart:385:42: Error: The getter 'title' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'title'.
                  color: theme.textTheme.title.color),
                                         ^^^^^
../../.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.3.4/lib/flutter_datetime_picker.dart:191:48: Error: No named parameter with the name 'shadowThemeOnly'.
    ThemeData inheritTheme = Theme.of(context, shadowThemeOnly: true);
                                               ^^^^^^^^^^^^^^^
../flutter/packages/flutter/lib/src/material/theme.dart:108:20: Context: Found this candidate, but the arguments don't match.
  static ThemeData of(BuildContext context) {
                   ^^
../../.pub-cache/hosted/pub.dartlang.org/ndialog-2.0.2+1/lib/src/ndialog_base.dart:62:41: Error: The getter 'title' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'title'.
                        theme.textTheme.title,
                                        ^^^^^
../../.pub-cache/hosted/pub.dartlang.org/ndialog-2.0.2+1/lib/src/ndialog_base.dart:76:43: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subhead'.
                          theme.textTheme.subhead,
                                          ^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/ndialog-2.0.2+1/lib/src/ndialog_base.dart:221:13: Error: No named parameter with the name 'overflow'.
            overflow: Overflow.clip,
            ^^^^^^^^
../flutter/packages/flutter/lib/src/widgets/basic.dart:3708:3: Context: Found this candidate, but the arguments don't match.
  Stack({
  ^^^^^
../../.pub-cache/hosted/pub.dartlang.org/ndialog-2.0.2+1/lib/src/ndialog_base.dart:518:39: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subhead'.
                      theme.textTheme.subhead,
                                      ^^^^^^^

Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **

Building macOS application...
Exception: Build process failed

Like I said, the code should work since it hasn't been touched and was successfully built and published last time. Since the error messages don't seem to be project-related and I'm fairly new to flutter, I don't know how to debug this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source