I have a container widget that I can't get to show a background color. This widget is the first in a Column so the width is the full screen. I should be able to see the background to the right of the button.
class HomeNavBar extends StatelessWidget {
const HomeNavBar({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: 100,
color: Colors.green, // <---------------- NOT WORKING
child: ElevatedButton(
onPressed: () => null,
child: Text('Home'),
),
);
}
}
Here's a link to a dartpad example: https://dartpad.dev/fc5fdd6c227747abe039d73a07d00a54