Flutter我无法运行该项目

时间:2018-12-12 09:10:31

标签: flutter

//这是我的main.dart 导入'package:flutter / material.dart';

void main() => runApp(MaterialApp(
  home:SplashScreen(),
  ));  
  class SplashScreen extends StatefulWidget {
    @override
    _SplashScreenState createState() => _SplashScreenState();
  }

  class _SplashScreenState extends State<SplashScreen> {
     @override
  void initState (){
    super.initState();
    // TODO initial state stuff
    new Future.delayed(const Duration(seconds: 4));
  }
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body:new Center(
          child:new Image.asset('images/backgroungimage.png'),
        ),
      );
    }
  }

//这是错误

  Compiler message:
    file:///D:/flutter/packages/flutter/lib/src/material/scaffold.dart:740:25: Error: Type 'PhoneNumberLoginPagee' not found.
        this.primary = true,PhoneNumberLoginPagee home,
                            ^^^^^^^^^^^^^^^^^^^^^
    file:///D:/flutter/packages/flutter/lib/src/material/scaffold.dart:740:25: Error: 'PhoneNumberLoginPagee' isn't a type.
        this.primary = true,PhoneNumberLoginPagee home,
                            ^^^^^^^^^^^^^^^^^^^^^
    Compiler failed on D:\flutterProjects\sampleapp\lib/main.dart
     9.4s
    Gradle task assembleDebug failed with exit code 1

我写了一个代码来创建名为phoneNumberLoginPage的页面,之后我删除了代码。当我尝试在终端中运行该项目时显示此消息

0 个答案:

没有答案