71 lines
2.1 KiB
Dart
71 lines
2.1 KiB
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class MatchedScreen extends StatelessWidget {
|
||
|
final String user1Name;
|
||
|
final String user2Name;
|
||
|
final String user1ImageUrl;
|
||
|
final String user2ImageUrl;
|
||
|
final VoidCallback onMessageButtonPressed;
|
||
|
final VoidCallback onContinueButtonPressed;
|
||
|
|
||
|
const MatchedScreen({super.key,
|
||
|
required this.user1Name,
|
||
|
required this.user2Name,
|
||
|
required this.user1ImageUrl,
|
||
|
required this.user2ImageUrl,
|
||
|
required this.onMessageButtonPressed,
|
||
|
required this.onContinueButtonPressed,
|
||
|
});
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Scaffold(
|
||
|
appBar: AppBar(title: const Text('It\'s a Match!')),
|
||
|
body: Padding(
|
||
|
padding: const EdgeInsets.all(16.0),
|
||
|
child: Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
Text(
|
||
|
'You and $user2Name have liked each other!',
|
||
|
style: const TextStyle(fontSize: 24),
|
||
|
textAlign: TextAlign.center,
|
||
|
),
|
||
|
const SizedBox(height: 24),
|
||
|
Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
CircleAvatar(
|
||
|
backgroundImage: NetworkImage(user1ImageUrl),
|
||
|
radius: 50,
|
||
|
),
|
||
|
const SizedBox(width: 24),
|
||
|
CircleAvatar(
|
||
|
backgroundImage: NetworkImage(user2ImageUrl),
|
||
|
radius: 50,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
const SizedBox(height: 24),
|
||
|
Text(
|
||
|
'$user1Name and $user2Name',
|
||
|
style: const TextStyle(fontSize: 20),
|
||
|
textAlign: TextAlign.center,
|
||
|
),
|
||
|
const SizedBox(height: 24),
|
||
|
ElevatedButton(
|
||
|
onPressed: onMessageButtonPressed,
|
||
|
child: const Text('Send a Message'),
|
||
|
),
|
||
|
const SizedBox(height: 16),
|
||
|
ElevatedButton(
|
||
|
onPressed: onContinueButtonPressed,
|
||
|
child: const Text('Continue Swiping'),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|