debugging 一年未运行代码后出现重大错误

nkkqxpd9  于 2022-11-24  发布在  其他
关注(0)|答案(1)|浏览(124)

嗨,我最近开始工作的一个项目,已经搁置了很长一段时间,+- 1年。我打开它,一些小部件,如flatbutton被弃用,我不得不纠正他们的文本按钮等,但毕竟我尝试运行代码,但我在调试colsole得到更多的错误,其中一些是与零安全,所以我关闭了它,但即使这样,我仍然得到了一堆错误,我找不到修复,而且它们是如此之多,以至于要花上几天的时间才能检查完所有的问题并逐个解决,有没有人知道我能做些什么来解决这个问题?这个项目在它被搁置的时候工作得很完美,没有对它做任何改变,但是它It“现在已经不工作了。下面是调试控制台提供的内容。任何解决方案都将非常感谢。

Launching lib\main.dart on Android SDK built for x86 in debug mode...
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/dropdownfield-1.0.3/lib/dropdownfield.dart:119:25: Error: No named parameter with the name 'autovalidate'.
                        autovalidate: true,
                        ^^^^^^^^^^^^
/C:/flutter/packages/flutter/lib/src/material/text_form_field.dart:97:3: Context: Found this candidate, but the arguments don't match.
  TextFormField({
  ^^^^^^^^^^^^^

/C:/flutter/.pub-cache/hosted/pub.dartlang.org/dropdownfield-1.0.3/lib/dropdownfield.dart:88:11: Error: No named parameter with the name 'autovalidate'.
          autovalidate: false,
          ^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/lib/src/path_provider_windows_real.dart:126:25: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          knownFolderID.addressOf, KF_FLAG_DEFAULT, NULL, pathPtrPtr);
                        ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:1067:7: Error: The getter 'addressOf' isn't defined for the class 'LOGFONT'.
- 'LOGFONT' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(28).cast<Utf16>();
      ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:1112:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
- 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  LOGFONT get elfLogFont => addressOf.cast<LOGFONT>().ref;
                            ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:1114:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.

- 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfFullName => addressOf
                            ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:1120:26: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
- 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfStyle => addressOf
                         ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:1126:27: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
- 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfScript => addressOf
                          ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2688:7: Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
- 'OSVERSIONINFO' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(20).cast<Utf16>().unpackString(128);
      ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2699:11: Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
- 'OSVERSIONINFO' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        ..addressOf.cast<Uint8>().elementAt(20).value = 0;
          ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2744:24: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_DEVICE_INFO'.
- 'BLUETOOTH_DEVICE_INFO' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get szName => addressOf
                       ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2837:7: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
- 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value;
      ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2840:5: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
- 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value =
    ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2845:28: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
- 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      String.fromCharCodes(addressOf.cast<Uint8>().asTypedList(pinLength));
                           ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2853:7: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
- 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(idx).value = pinData[idx];
      ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/com/combase.dart:38:31: Error: The getter 'addressOf' isn't defined for the class 'GUID'.

- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final iid = GUID.allocate().addressOf;
                              ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/com/combase.dart:56:33: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final clsid = GUID.allocate().addressOf;
                                ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:63:33: Error: The getter 'addressOf' isn't defined for the class 'Utf8'.
- 'Utf8' is from 'package:ffi/src/utf8.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String toString() => fromUtf8(addressOf);
                                ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IWbemLocator.dart:82:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
- 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IWbemLocator.dart:84:68: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final hr = CoCreateInstance(GUID.fromString(CLSID_WbemLocator).addressOf,
                                                                   ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IWbemLocator.dart:85:64: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        nullptr, CLSCTX_ALL, GUID.fromString(IID_IWbemLocator).addressOf, ptr);
                                                               ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/INetworkListManager.dart:128:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
- 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/INetworkListManager.dart:131:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.

- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_NetworkListManager).addressOf,
                                                  ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/INetworkListManager.dart:134:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_INetworkListManager).addressOf,
                                                 ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IKnownFolderManager.dart:164:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
- 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IKnownFolderManager.dart:167:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_KnownFolderManager).addressOf,
                                                  ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IKnownFolderManager.dart:170:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IKnownFolderManager).addressOf,
                                                 ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IFileSaveDialog.dart:99:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
- 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.

    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IFileSaveDialog.dart:102:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.

- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.

        GUID.fromString(CLSID_FileSaveDialog).addressOf,
                                              ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IFileSaveDialog.dart:105:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IFileSaveDialog).addressOf,
                                             ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IFileOpenDialog.dart:58:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
- 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IFileOpenDialog.dart:61:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_FileOpenDialog).addressOf,
                                              ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IFileOpenDialog.dart:64:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IFileOpenDialog).addressOf,
                                             ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IDesktopWallpaper.dart:197:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
- 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IDesktopWallpaper.dart:200:49: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_DesktopWallpaper).addressOf,
                                                ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/generated/IDesktopWallpaper.dart:203:48: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.

        GUID.fromString(IID_IDesktopWallpaper).addressOf,
                                               ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/winrt/winrt_helpers.dart:86:40: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final riidCalendar = GUID.allocate().addressOf;
                                       ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/platform-2.2.1/lib/src/interface/local_platform.dart:45:41: Error: Member not found: 'packageRoot'.
  String get packageRoot => io.Platform.packageRoot;
                                        ^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/picker_page.dart:187:63: Error: The getter 'title' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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: AppBarTheme.of(context).textTheme?.title?.color ??
                                                              ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/picker_page.dart:188:61: Error: The getter 'title' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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.of(context).primaryTextTheme?.title?.color),
                                                            ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/picker_page.dart:234:26: Error: The getter 'FlatButton' isn't defined for the class '_FilesystemPickerState'.
- '_FilesystemPickerState' is from 'package:filesystem_picker/src/picker_page.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/picker_page.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'FlatButton'.
                  child: FlatButton.icon(
                         ^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/picker_page.dart:236:60: Error: The getter 'title' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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'.
                        AppBarTheme.of(context).textTheme?.title?.color ??
                                                           ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/picker_page.dart:237:65: Error: The getter 'title' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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.of(context).primaryTextTheme?.title?.color,
                                                                ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/picker_page.dart:240:35: Error: The getter 'title' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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'.
                                ?.title
                                  ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/picker_page.dart:242:65: Error: The getter 'title' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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.of(context).primaryTextTheme?.title?.color)
                                                                ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/breadcrumbs.dart:65:22: Error: The method 'FlatButton' isn't defined for the class 'Breadcrumbs<T>'.
- 'Breadcrumbs' is from 'package:filesystem_picker/src/breadcrumbs.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/filesystem_picker-1.0.3/lib/src/breadcrumbs.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
              child: FlatButton(
                     ^^^^^^^^^^

FAILURE: Build failed with an exception.

* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\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 29s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
y0u0uwnf

y0u0uwnf1#

您的Flutter项目已创建了一段时间,Flutter已发生了很大变化。
你有各种各样的问题:

  • 首先,你的代码不是null安全的。你可以在Dart文档中了解null安全:https://dart.dev/null-safety
  • 您在代码中使用的一些小部件已不存在,FlatButton已替换为新的小部件TextButton,您可以在此处了解有关更改的更多信息:https://docs.flutter.dev/release/breaking-changes/buttons
  • 您似乎使用TextTheme.title将主题应用于某个小部件,但.title属性已被删除,现在可以使用headline1属性来代替
  • 您在依赖项方面遇到了一些问题,某些依赖项可能有新参数,或者随着时间推移已删除了某些参数请根据其文档更新代码

相关问题