Flutter Scaffold Code suddenly starts to give me error
6,122
Yiu probably accidentally modified Flutter source code.
You can check by running in your Flutter install dir
git status
It should report no modifications
To fix run in your Flutter install dir
git clean -xfd
git stash save --keep-index
git stash drop
git pull
flutter doctor
Author by
Gbadegesin Taiwo
Updated on November 19, 2022Comments
-
Gbadegesin Taiwo over 1 year
My code keeps giving me error due to return Scaffold. here is my scaffold code:
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 ),
Here is the error code I got during debug
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