无法将元素类型“{0}”分配给列表类型“{1}”颤振

The element type '{0}' can't be assigned to the list type '{1}' flutter

我一直在尝试学习 udemy 上的 flutter 课程,但在代码中它给了我这个错误:

The element type 'Question' can't be assigned to the list type 'Widget'.

这是 main.dart 中的代码:

    class _MyAppState extends State<MyApp> {
  int _qIndex = 0;

  void _ansQ() {
    setState(() {
      _qIndex++;
    });
    print('Answer Chosen');
  

   print(_qIndex);   }
 
   @override   Widget build(BuildContext context) {
     var questions = [
       'What\'s your favorite food?',
       'What\'s your favorite color?'
     ];
     return MaterialApp(
       home: Scaffold(
           appBar: AppBar(
             title: Text('My First Flutter App'),
           ),
           body: Column(
             children: [
               Question(questions[_qIndex]), //This is the line that gives me the error
               RaisedButton(child: Text('Answer 1'), onPressed: _ansQ),
               RaisedButton(
                 child: Text('Answer 2'),
                 onPressed: () => print('Answer 2 chosen')),
               RaisedButton(child: Text('Answer 3'), onPressed: _ansQ)
             ]
           )
        ),
     );   } }

这里是 question.dart 中的代码:

import 'package:/flutter/material.dart';

class Question extends StatelessWidget {
  final String questionText;
  const Question(this.questionText);

  @override
  Widget build(BuildContext context) {
    return Text(questionText);
  }
}

如果可以,你能帮帮我吗?

像这样导入后尝试添加 as qus

import 'package:'PATH'/Question.dart' as qus;

然后使用

Column(
             children: [
              qus.Question(questions[_qIndex]), //This is the line that gives me the error
               RaisedButton(child: Text('Answer 1'), onPressed: _ansQ),
               RaisedButton(
                 child: Text('Answer 2'),
                 onPressed: () => print('Answer 2 chosen')),
               RaisedButton(child: Text('Answer 3'), onPressed: _ansQ)
             ]