@override
Widget build(BuildContext context) {
var backgroundColor = Colors.orange; // this color could be anything
return Scaffold(
body: Center(
child: Container(
padding: const EdgeInsets.all(12),
color: backgroundColor,
child: Text("Hello World"), // if backgroundColor: Colors.orange this is visible but if backgroundColor: Colors.black, it isn't visible
),
),
);
}
Output (backgroundColor: Colors.orange, Text is visible):
Output (backgroundColor: Colors.black, Text isn't visible):

