The following Flutter layout (two rows inside a column, each row containing a text widget and a field widget) compiles and runs - but the text and text field widgets are not displaying. What you are supposed to see is the word "username" followed by a text field in one row, and the word "password" followed by a text field in the next row. What am I doing wrong, please?
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Welcome to Flutter',
home: new Scaffold(
appBar: new AppBar(
title: new Text('Welcome to Flutter'),
),
body: new Container(
padding: new EdgeInsets.all(20.0),
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
new Text('User Name'),
new TextField(
autofocus: true,
decoration: new InputDecoration(
border: InputBorder.none,
hintText: 'Please enter your user name'),
),
],
),
new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
new Text('User Name'),
new TextField(
decoration: new InputDecoration(
border: InputBorder.none,
hintText: 'Please enter your pasword'),
),
],
),
],
),
)),
);
}
}