1 | initial version |
To make a floating widget background in Flutter/Dart, you can follow these steps:
Scaffold(
body: Stack(
children: [
// Your widgets here
],
),
);
Scaffold(
body: Stack(
children: [
Container(
color: Colors.blue.withOpacity(0.5),
),
// Your widgets here
],
),
);
Scaffold(
body: Stack(
children: [
Container(
height: MediaQuery.of(context).size.height,
color: Colors.blue.withOpacity(0.5),
),
// Your widgets here
],
),
);
Scaffold(
body: Stack(
children: [
Container(
height: MediaQuery.of(context).size.height,
color: Colors.blue.withOpacity(0.5),
),
Positioned(
top: 100,
left: 50,
child: Text("Hello World"),
),
],
),
);
Scaffold(
body: Stack(
children: [
Container(
height: MediaQuery.of(context).size.height,
color: Colors.blue.withOpacity(0.5),
),
Positioned(
top: 100,
left: 50,
child: Container(
color: Colors.transparent,
child: Text("Hello World"),
),
),
],
),
);
By following these steps, you can create a floating widget background in Flutter/Dart.