Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

教程有错 #10

#1

编写你的第一个 Flutter App [1/2]

将 build() 方法添加到 RandomWordState 中,如下所示:

@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Startup Name Generator',
home: new RandomWords(),
);
}

不是 RandomWordState 类,应该是 MyApp 类:

class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        title: 'Startup Name Generator',         
        home: new RandomWords(),                 
      );
    }
  }
  • replies 2
  • views 3.6K
  • likes 1
#2

收到,白天我排查一下,谢谢指出!

#3

已经修复,非常感谢提出!