Open kcwu229 opened 1 month ago
Stack( children: [ // Background image Container( width: double.infinity, height: double.infinity, child: Image.asset('background.jpg', fit: BoxFit.cover), ),
// Centered text Positioned( top: 50.0, left: 50.0, child: Text( 'Hello, World!', style: TextStyle( color: Colors.white, fontSize: 24.0, fontWeight: FontWeight.bold, ), ), ), // Floating action button Positioned( bottom: 20.0, right: 20.0, child: FloatingActionButton( onPressed: () { // Do something }, child: Icon(Icons.add), ), ),
], );
Stack( children: [ // Background image Container( width: double.infinity, height: double.infinity, child: Image.asset('background.jpg', fit: BoxFit.cover), ),
], );