报错如下 请问怎么处理
来源:1-6 VS Code开发Flutter实用技巧(持续更新)

慕圣0569988
2023-04-13
2回答
-
CrazyCodeBoy
2023-04-14
运行下flutter clean 然后运行flutter pub get之后在重新运行下项目试试看。00 -
慕圣0569988
提问者
2023-04-13
整个项目报错如下 突然运行不起来
lib/provider/theme_provider.dart:64:9: Error: No named parameter with the name 'accentColor'.
accentColor: isDarkMode ? primary[50] : white,
^^^^^^^^^^^
../../Documents/flutter/flutter/packages/flutter/lib/src/material/theme_data.dart:288:11: Context: Found this candidate, but the arguments don't match.
factory ThemeData({
^
component/hi_video/lib/hi_video_controls.dart:439:50: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'.
- 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../Documents/flutter/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
playedColor: Theme.of(context).accentColor,
^^^^^^^^^^^
component/hi_video/lib/hi_video_controls.dart:440:50: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'.
- 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../Documents/flutter/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
handleColor: Theme.of(context).accentColor,
^^^^^^^^^^^
../../.pub-cache/hosted/pub.flutter-io.cn/chewie-1.2.2/lib/src/chewie_player.dart:158:18: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'.
SystemChrome.setEnabledSystemUIOverlays(
^^^^^^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.flutter-io.cn/chewie-1.2.2/lib/src/chewie_player.dart:171:20: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'.
SystemChrome.setEnabledSystemUIOverlays(
^^^^^^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.flutter-io.cn/chewie-1.2.2/lib/src/chewie_player.dart:175:20: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'.
SystemChrome.setEnabledSystemUIOverlays([]);
^^^^^^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.flutter-io.cn/chewie-1.2.2/lib/src/material/material_desktop_controls.dart:554:46: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'.
- 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../Documents/flutter/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
playedColor: Theme.of(context).accentColor,
^^^^^^^^^^^
../../.pub-cache/hosted/pub.flutter-io.cn/chewie-1.2.2/lib/src/material/material_desktop_controls.dart:555:46: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'.
- 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../Documents/flutter/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
handleColor: Theme.of(context).accentColor,
^^^^^^^^^^^
../../.pub-cache/hosted/pub.flutter-io.cn/chewie-1.2.2/lib/src/material/material_controls.dart:549:46: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'.
- 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../Documents/flutter/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
playedColor: Theme.of(context).accentColor,
^^^^^^^^^^^
../../.pub-cache/hosted/pub.flutter-io.cn/chewie-1.2.2/lib/src/material/material_controls.dart:550:46: Error: The getter 'accentColor' isn't defined for the class 'ThemeData'.
- 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../Documents/flutter/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentColor'.
handleColor: Theme.of(context).accentColor,
^^^^^^^^^^^
../../.pub-cache/hosted/pub.flutter-io.cn/orientation-1.3.0/lib/orientation.dart:23:20: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'.
SystemChrome.setEnabledSystemUIOverlays(overlays);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception
00
相似问题