Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 43 additions & 47 deletions lib/screens/bingo_board.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ class _BingoBoardState extends State<BingoBoard> {
});
}

void _showTimeUp() {
if (mounted) {
ScaffoldMessenger.of(context)
..clearSnackBars()
..showSnackBar(const SnackBar(content: Text("Time's up!")));
}
}

Future<void> _fetchBoard() async {
try {
Expand Down Expand Up @@ -204,53 +197,56 @@ class _BingoBoardState extends State<BingoBoard> {
},
child: Scaffold(
backgroundColor: colorScheme.surface,
appBar: AppBar(
backgroundColor: colorScheme.surface,
centerTitle: true,
title: Row(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset('assets/images/amMingo.png', height: 40),
const SizedBox(width: 8),
Text(
"Amingo",
style: textTheme.titleLarge?.copyWith(
color: colorScheme.onSurface,
fontWeight: FontWeight.bold,
appBar: AppBar(
backgroundColor: colorScheme.surface,
centerTitle: true,
title: Row(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset('assets/images/amMingo.png', height: 40),
const SizedBox(width: 8),
Text(
"Amingo",
style: textTheme.titleLarge?.copyWith(
color: colorScheme.onSurface,
fontWeight: FontWeight.bold,
),
),
],
),
actions: [
_buildScoreBadge(colorScheme),
IconButton(
icon: const Icon(Icons.person),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ProfileScreen(),
),
);
},
),
const SizedBox(width: 8),
],
),
actions: [
_buildScoreBadge(colorScheme),
IconButton(
icon: const Icon(Icons.person),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ProfileScreen()),
);
},
),
const SizedBox(width: 8),
],
),
body: SafeArea(
child: SingleChildScrollView(
padding: const EdgeInsets.symmetric(vertical: 20),
child: Column(
children: [
_buildHeader(textTheme, colorScheme),
const SizedBox(height: 24),
_buildBingoBoard(colorScheme, textTheme, size),
const SizedBox(height: 24),
_buildStats(colorScheme, textTheme, size),
],
body: SafeArea(
child: SingleChildScrollView(
padding: const EdgeInsets.symmetric(vertical: 20),
child: Column(
children: [
_buildHeader(textTheme, colorScheme),
const SizedBox(height: 24),
_buildBingoBoard(colorScheme, textTheme, size),
const SizedBox(height: 24),
_buildStats(colorScheme, textTheme, size),
],
),
),
),
bottomNavigationBar: _buildBottomNav(colorScheme, textTheme),
),
bottomNavigationBar: _buildBottomNav(colorScheme, textTheme),
));
);
}

Widget _buildScoreBadge(ColorScheme cs) {
Expand Down
8 changes: 6 additions & 2 deletions lib/screens/create_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,15 @@ class _CreateEventScreenState extends State<CreateEventScreen> {
);
return;
}
final duration = int.tryParse(_timeLimitController.text.trim());
final duration = int.tryParse(
_timeLimitController.text.trim(),
);
if (duration == null || duration <= 0) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text("Please enter a valid positive duration in minutes"),
content: Text(
"Please enter a valid positive duration in minutes",
),
),
);
return;
Expand Down
218 changes: 109 additions & 109 deletions lib/screens/enter_username.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,135 +61,135 @@ class _CreateUsernameState extends State<CreateUsername> {
return PopScope(
canPop: false,
child: Scaffold(
backgroundColor: colorScheme.surface,
resizeToAvoidBottomInset: true,
body: SafeArea(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Switch(
value: Theme.of(context).brightness == Brightness.dark,
onChanged: (value) {
themeProvider.toggleTheme(value);
},
),
],
),
backgroundColor: colorScheme.surface,
resizeToAvoidBottomInset: true,
body: SafeArea(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Switch(
value: Theme.of(context).brightness == Brightness.dark,
onChanged: (value) {
themeProvider.toggleTheme(value);
},
),
],
),

Center(
child: Image.asset(
'assets/images/amMingo.png',
height: height * 0.15,
Center(
child: Image.asset(
'assets/images/amMingo.png',
height: height * 0.15,
),
),
),
SizedBox(height: height * 0.01),
Center(
child: Column(
children: [
Text(
"AMINGO",
style: TextStyle(
color: colorScheme.onSurface,
fontSize: width * 0.2,
fontWeight: FontWeight.bold,
letterSpacing: 1.5,
SizedBox(height: height * 0.01),
Center(
child: Column(
children: [
Text(
"AMINGO",
style: TextStyle(
color: colorScheme.onSurface,
fontSize: width * 0.2,
fontWeight: FontWeight.bold,
letterSpacing: 1.5,
),
),
),
SizedBox(height: height * 0.01),
Text(
"Create your identity",
style: TextStyle(
color: colorScheme.onSurfaceVariant,
fontSize: width * 0.04,
SizedBox(height: height * 0.01),
Text(
"Create your identity",
style: TextStyle(
color: colorScheme.onSurfaceVariant,
fontSize: width * 0.04,
),
),
),
],
],
),
),
),

SizedBox(height: height * 0.05),
SizedBox(height: height * 0.05),

Text(
"Display Name",
style: TextStyle(
color: colorScheme.onSurface,
fontWeight: FontWeight.w600,
fontSize: width * 0.04,
Text(
"Display Name",
style: TextStyle(
color: colorScheme.onSurface,
fontWeight: FontWeight.w600,
fontSize: width * 0.04,
),
),
),

SizedBox(height: height * 0.02),
SizedBox(height: height * 0.02),

TextField(
controller: nameController,
keyboardType: TextInputType.name,
cursorColor: colorScheme.primary,
style: TextStyle(color: colorScheme.onSurface),
decoration: InputDecoration(
hintText: "Enter your name",
hintStyle: TextStyle(color: colorScheme.onSurfaceVariant),
filled: true,
fillColor: colorScheme.surface,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(
color: colorScheme.outline,
width: 1.2,
TextField(
controller: nameController,
keyboardType: TextInputType.name,
cursorColor: colorScheme.primary,
style: TextStyle(color: colorScheme.onSurface),
decoration: InputDecoration(
hintText: "Enter your name",
hintStyle: TextStyle(color: colorScheme.onSurfaceVariant),
filled: true,
fillColor: colorScheme.surface,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(
color: colorScheme.outline,
width: 1.2,
),
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(
color: colorScheme.primary,
width: 1.5,
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(
color: colorScheme.primary,
width: 1.5,
),
),
),
),
),
SizedBox(height: height * 0.15),
SizedBox(
width: double.infinity,
height: 55,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: colorScheme.primary,
foregroundColor: colorScheme.onPrimary,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(14),
SizedBox(height: height * 0.15),
SizedBox(
width: double.infinity,
height: 55,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: colorScheme.primary,
foregroundColor: colorScheme.onPrimary,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(14),
),
),
),
onPressed: isLoading ? null : _saveProfile,
child: isLoading
? const SizedBox(
height: 20,
width: 20,
child: CircularProgressIndicator(
color: Colors.white,
strokeWidth: 2,
),
)
: Text(
"Save Profile",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: width * 0.05,
onPressed: isLoading ? null : _saveProfile,
child: isLoading
? const SizedBox(
height: 20,
width: 20,
child: CircularProgressIndicator(
color: Colors.white,
strokeWidth: 2,
),
)
: Text(
"Save Profile",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: width * 0.05,
),
),
),
),
),
),
const SizedBox(height: 20),
],
const SizedBox(height: 20),
],
),
),
),
),
),
),
);
);
}
}
2 changes: 1 addition & 1 deletion lib/screens/event_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class _EventDetailsState extends State<EventDetails> {
backgroundImage: _currentHostPfp.isNotEmpty
? NetworkImage(_currentHostPfp)
: const AssetImage('assets/images/default2.png')
as ImageProvider,
as ImageProvider,
backgroundColor: cs.surfaceContainer,
onBackgroundImageError: (exception, stackTrace) {},
child: _currentHostPfp.isEmpty
Expand Down
4 changes: 3 additions & 1 deletion lib/screens/friend_verification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ class _FriendVerificationState extends State<FriendVerification> {
decoration: BoxDecoration(
color: colorScheme.primary.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(8),
border: Border.all(color: colorScheme.primary.withValues(alpha: 0.2)),
border: Border.all(
color: colorScheme.primary.withValues(alpha: 0.2),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
Expand Down
Loading
Loading