gpt4 book ai didi

Flutter Scaffold Code 突然开始报错

转载 作者:行者123 更新时间:2023-12-02 10:45:04 26 4
gpt4 key购买 nike

由于返回脚手架,我的代码一直给我错误。这是我的脚手架代码:

 class _DashboardState extends State<Dashboard> {   @override   Widget
build(BuildContext context) {

return Scaffold(

drawer: Drawer(
child: Column
(children: <Widget>[
AppBar(automaticallyImplyLeading: false,
title: Text('Special Options'),
backgroundColor: Colors.redAccent.shade400
),

这是我在调试时得到的错误代码

Context: Found this candidate, but the arguments don't match.
lib/ui/usertype.dart:29:24: Error: Too few positional arguments: 1 required, 0 given.

file:///C:/flutter/flutter/packages/flutter/lib/src/material/scaffold.dart:1: Context: Found this candidate, but the arguments don't match.
Compiler failed

最佳答案

Yiu 可能不小心修改了 Flutter 源代码。

您可以通过在您的 Flutter 安装目录中运行来检查

git status

它应该报告没有修改

在你的 Flutter 安装目录中修复运行

git clean -xfd
git stash save --keep-index
git stash drop
git pull
flutter doctor

关于Flutter Scaffold Code 突然开始报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54205317/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com