I cannot make padding between Container
TextFormFiel
and Text
. It become overlapping like this image..
And this my problem code
@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Profile'), ), body: Stack( children: [ Container( width: double.infinity, height: double.infinity, color: Colors.blue, // Second layer background color ), Positioned( top: 0, left: 10, right: 10, bottom: 0, child: Container( child: ProfileForm(), margin: EdgeInsets.only(top: 48), height: 500, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(16.0), ), ), ), Positioned( top: 16, left: 0, right: 0, child: Align( alignment: Alignment.topCenter, child: Padding( padding: const EdgeInsets.symmetric(horizontal: 20), child: Column( children: [ CircleAvatar( radius: 40.0, backgroundColor: Colors.white, child: CircleAvatar( child: Align( alignment: Alignment.bottomRight, child: CircleAvatar( backgroundColor: Colors.white, radius: 12.0, child: Icon( Icons.camera_alt, size: 15.0, color: Color(0xFF404040), ), ), ), radius: 38.0, backgroundImage: AssetImage('assets/images/user-image-default.png', ), ), ), SizedBox(height: 8), Text('John Doe', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 18, ), ), Text('john.doe@example.com', style: TextStyle( fontSize: 16, ), ), ], ), ), ), ), ], ), ); }}