Bild als Hintergrund
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: ‚App mit Bildhintergrund‘,
home: Scaffold(
appBar: AppBar(
title: Text(‚Image-Hintergrund‘), ),
body: Container(
constraints: BoxConstraints.expand(),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(„assets/beispiel.jpg“),
//Alternative: image: NetworkImage(‚https:/……./beispiel.jpg‘),
fit: BoxFit.cover)),
child: TextField(decoration: InputDecoration(fillColor: Colors.red,filled: true),)))); } }