Re-center elements after commit 00e3ae0ac2

master
Rafael 2024-07-12 23:28:14 +02:00
parent 00e3ae0ac2
commit 6b54da1069
1 changed files with 53 additions and 51 deletions

View File

@ -24,57 +24,59 @@ class MatchedScreen extends StatelessWidget {
appBar: AppBar(title: const Text('It\'s a Match!')), appBar: AppBar(title: const Text('It\'s a Match!')),
body: Padding( body: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView( child: Center(
child: Column( child: SingleChildScrollView(
mainAxisAlignment: MainAxisAlignment.center, child: Column(
children: [ mainAxisAlignment: MainAxisAlignment.center,
Text( children: [
'You and $otherUserName have liked each other!', Text(
style: const TextStyle(fontSize: 24), 'You and $otherUserName have liked each other!',
textAlign: TextAlign.center, style: const TextStyle(fontSize: 24),
), textAlign: TextAlign.center,
const SizedBox(height: 24), ),
Row( const SizedBox(height: 24),
mainAxisAlignment: MainAxisAlignment.center, Row(
children: [ mainAxisAlignment: MainAxisAlignment.center,
CircleAvatar( children: [
backgroundImage: (currentUserImageUrl.isEmpty) CircleAvatar(
? null backgroundImage: (currentUserImageUrl.isEmpty)
: NetworkImage(currentUserImageUrl), ? null
radius: 50, : NetworkImage(currentUserImageUrl),
child: (currentUserImageUrl.isEmpty) radius: 50,
? const Icon(Icons.person, size: 50) child: (currentUserImageUrl.isEmpty)
: null, ? const Icon(Icons.person, size: 50)
), : null,
const SizedBox(width: 24), ),
CircleAvatar( const SizedBox(width: 24),
backgroundImage: (otherUserImageUrl.isEmpty) CircleAvatar(
? null backgroundImage: (otherUserImageUrl.isEmpty)
: NetworkImage(otherUserImageUrl), ? null
radius: 50, : NetworkImage(otherUserImageUrl),
child: (otherUserImageUrl.isEmpty) radius: 50,
? const Icon(Icons.person, size: 50) child: (otherUserImageUrl.isEmpty)
: null, ? const Icon(Icons.person, size: 50)
), : null,
], ),
), ],
const SizedBox(height: 24), ),
Text( const SizedBox(height: 24),
'$currentUserName and $otherUserName', Text(
style: const TextStyle(fontSize: 20), '$currentUserName and $otherUserName',
textAlign: TextAlign.center, style: const TextStyle(fontSize: 20),
), textAlign: TextAlign.center,
const SizedBox(height: 24), ),
ElevatedButton( const SizedBox(height: 24),
onPressed: onMessageButtonPressed, ElevatedButton(
child: const Text('Send a Message'), onPressed: onMessageButtonPressed,
), child: const Text('Send a Message'),
const SizedBox(height: 16), ),
ElevatedButton( const SizedBox(height: 16),
onPressed: onContinueButtonPressed, ElevatedButton(
child: const Text('Continue Swiping'), onPressed: onContinueButtonPressed,
), child: const Text('Continue Swiping'),
], ),
],
),
), ),
), ),
), ),