Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b808883
fixed play button overflow
MonikaTheiss Sep 9, 2024
9334dba
overflow for play button, mood page and connection updates should be …
MonikaTheiss Sep 9, 2024
c88f815
changed event invite button text and fixed button overflow issue
MonikaTheiss Sep 10, 2024
6f56e82
Merge pull request #545 from COS301-SE-2024/Develop
MonikaTheiss Sep 11, 2024
2061c81
game timer now fixed
MonikaTheiss Sep 11, 2024
496c448
fixed currently online connections and worked on overflows
MonikaTheiss Sep 11, 2024
37e2766
still working on this
MonikaTheiss Sep 12, 2024
bc38a62
Merge pull request #558 from COS301-SE-2024/Develop
MonikaTheiss Sep 20, 2024
e764247
te event responsive
MonikaTheiss Sep 20, 2024
2f5042f
create event worked onthe chips
MonikaTheiss Sep 20, 2024
ca331df
fixed login page sizing
MonikaTheiss Sep 23, 2024
609cc6b
fixed sign up page sizing
MonikaTheiss Sep 23, 2024
58bb404
Merge branch 'fix/overflows' into fix/overflows2
MonikaTheiss Sep 23, 2024
173b29b
Merge pull request #588 from COS301-SE-2024/fix/overflows2
MonikaTheiss Sep 23, 2024
de568a1
edit event scales to screen width
MonikaTheiss Sep 23, 2024
deda016
fixed light mode card colors for activity
MonikaTheiss Sep 23, 2024
9e59c61
fixed more overflows on specific game page and home page
MonikaTheiss Sep 23, 2024
70f2813
fixed overflows on view events page + game library page
MonikaTheiss Sep 23, 2024
ab54421
fixed analyze issues
MonikaTheiss Sep 23, 2024
1a44d3a
fixed test issues
MonikaTheiss Sep 23, 2024
25b44e7
fixed stats page
MonikaTheiss Sep 24, 2024
efad9e7
Merge branch 'Develop' into fix/overflows
MonikaTheiss Sep 24, 2024
c15d38c
Merge branch 'Develop' into fix/overflows
MonikaTheiss Sep 25, 2024
b0c4842
Merge branch 'fix/overflows' into duplicate/overflows2
MonikaTheiss Sep 25, 2024
787cf37
Merge pull request #608 from COS301-SE-2024/duplicate/overflows2
MonikaTheiss Sep 25, 2024
edf33a6
overflows should be fixed.
MonikaTheiss Sep 25, 2024
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
11 changes: 11 additions & 0 deletions lib/services/events_S/dynamic_scaling.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:flutter/cupertino.dart';

extension Dimensionon on num{
double ws (BuildContext context){
final deviceWidth = MediaQuery.of(context).size.width;
return deviceWidth * (this/100);
}
double pixelScale(BuildContext context){
return (this /4).ws(context);
}
}
18 changes: 10 additions & 8 deletions lib/view/components/events/create_event_chips.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gameonconnect/services/events_S/dynamic_scaling.dart';
import '../../../model/events_M/chip_model.dart';

class ChipSelector extends StatefulWidget {
Expand Down Expand Up @@ -35,7 +36,7 @@
color: selectedOption == 'Gaming Session'
? Colors.black
: Theme.of(context).colorScheme.secondary,
size: 18,
size: 18.pixelScale(context),

Check warning on line 39 in lib/view/components/events/create_event_chips.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/create_event_chips.dart#L39

Added line #L39 was not covered by tests
)),
ChipData(
'Tournament',
Expand All @@ -44,30 +45,30 @@
color: selectedOption == "Tournament"
? Colors.black
: Theme.of(context).colorScheme.secondary,
size: 18,
size: 18.pixelScale(context),

Check warning on line 48 in lib/view/components/events/create_event_chips.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/create_event_chips.dart#L48

Added line #L48 was not covered by tests
)),
];
return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: options.map((option) {
return ChoiceChip(
showCheckmark: false,
label: Center(
child: Container(
height: 25,
height: 25.pixelScale(context),

Check warning on line 58 in lib/view/components/events/create_event_chips.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/create_event_chips.dart#L58

Added line #L58 was not covered by tests
alignment: Alignment.center,
child: Row(children: [
option.icon,
const SizedBox(
width: 5,
SizedBox(
width: 5.pixelScale(context),

Check warning on line 63 in lib/view/components/events/create_event_chips.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/create_event_chips.dart#L62-L63

Added lines #L62 - L63 were not covered by tests
),
Align(
alignment: Alignment.center,
child: Text(
option.label,
style: TextStyle(
fontFamily: 'Inter',
fontSize: 16,
fontSize: 16.pixelScale(context),

Check warning on line 71 in lib/view/components/events/create_event_chips.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/create_event_chips.dart#L71

Added line #L71 was not covered by tests
fontWeight: FontWeight.bold,
color: selectedOption == option.label
? Colors.black
Expand Down Expand Up @@ -100,6 +101,7 @@
elevation: 0,
);
}).toList(),
);
)
;
}
}
13 changes: 7 additions & 6 deletions lib/view/components/events/event_card.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gameonconnect/services/events_S/dynamic_scaling.dart';
import 'package:intl/intl.dart';
import 'package:loading_animation_widget/loading_animation_widget.dart';
import '../../../model/events_M/events_model.dart';
Expand Down Expand Up @@ -53,7 +54,7 @@
},
child: Container(
width: double.infinity,
height: 80,
height: 80.pixelScale(context),

Check warning on line 57 in lib/view/components/events/event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/event_card.dart#L57

Added line #L57 was not covered by tests
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
),
Expand All @@ -63,8 +64,8 @@
mainAxisSize: MainAxisSize.max,
children: [
SizedBox(
width: 80,
height: 60,
width: 80.pixelScale(context),
height: 60.pixelScale(context),

Check warning on line 68 in lib/view/components/events/event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/event_card.dart#L67-L68

Added lines #L67 - L68 were not covered by tests
child: CachedNetworkImage(
width: double.infinity,
imageUrl: imageUrl,
Expand Down Expand Up @@ -103,7 +104,7 @@
Brightness.light
? Colors.black
: Colors.white,
fontSize: 12,
fontSize: 12.pixelScale(context),

Check warning on line 107 in lib/view/components/events/event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/event_card.dart#L107

Added line #L107 was not covered by tests
letterSpacing: 0,
fontWeight: FontWeight.w500,
),
Expand All @@ -118,7 +119,7 @@
Brightness.light
? Colors.black
: Colors.white,
fontSize: 12,
fontSize: 12.pixelScale(context),

Check warning on line 122 in lib/view/components/events/event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/event_card.dart#L122

Added line #L122 was not covered by tests
letterSpacing: 0,
fontWeight: FontWeight.w500,
),
Expand All @@ -131,7 +132,7 @@
Brightness.light
? Theme.of(context).colorScheme.secondary
: Theme.of(context).colorScheme.primary,
size: 24,
size: 24.pixelScale(context),

Check warning on line 135 in lib/view/components/events/event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/event_card.dart#L135

Added line #L135 was not covered by tests
),
],
),
Expand Down
29 changes: 15 additions & 14 deletions lib/view/components/events/joined_event_card.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gameonconnect/services/events_S/dynamic_scaling.dart';
import 'package:gameonconnect/view/pages/events/specific_event_details.dart';
import 'package:intl/intl.dart';
import 'package:loading_animation_widget/loading_animation_widget.dart';
Expand Down Expand Up @@ -48,7 +49,7 @@
return Center(
child: LoadingAnimationWidget.halfTriangleDot(
color: Theme.of(context).colorScheme.primary,
size: 36,
size: 36.pixelScale(context),

Check warning on line 52 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L52

Added line #L52 was not covered by tests
),
);
} else if (snapshot.hasError) {
Expand All @@ -63,14 +64,14 @@
builder: (context) => ViewEventDetailsWidget(e: e)));
},
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0, 0, 12, 0),
padding: EdgeInsetsDirectional.fromSTEB(0, 0, 12.pixelScale(context), 0),

Check warning on line 67 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L67

Added line #L67 was not covered by tests
child: Container(
width: 147,
height: 200,
width: 147.pixelScale(context),
height: 200.pixelScale(context),

Check warning on line 70 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L69-L70

Added lines #L69 - L70 were not covered by tests
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primaryContainer,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(12.pixelScale(context)),

Check warning on line 74 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L74

Added line #L74 was not covered by tests
boxShadow: [
BoxShadow(
blurRadius: 2,
Expand All @@ -82,8 +83,8 @@
)
]),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
11.61, 11.61, 11.61, 11.61),
padding: EdgeInsetsDirectional.fromSTEB(
11.61.pixelScale(context), 11.61.pixelScale(context), 11.61.pixelScale(context), 11.61.pixelScale(context)),

Check warning on line 87 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L86-L87

Added lines #L86 - L87 were not covered by tests
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Expand All @@ -94,16 +95,16 @@
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.fromLTRB(2, 0, 2, 6),
padding: EdgeInsets.fromLTRB(2.pixelScale(context), 0, 2.pixelScale(context), 6.pixelScale(context)),

Check warning on line 98 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L98

Added line #L98 was not covered by tests
child: CachedNetworkImage(
height: 83.65,
height: 83.65.pixelScale(context),

Check warning on line 100 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L100

Added line #L100 was not covered by tests
width: double.infinity,
imageUrl: imageUrl,
imageBuilder: (context, imageProvider) =>
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(12.pixelScale(context)),

Check warning on line 107 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L107

Added line #L107 was not covered by tests
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover),
Expand All @@ -113,7 +114,7 @@
child: LoadingAnimationWidget.halfTriangleDot(
color:
Theme.of(context).colorScheme.primary,
size: 36,
size: 36.pixelScale(context),

Check warning on line 117 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L117

Added line #L117 was not covered by tests
),
), // Loading indicator for banner
errorWidget: (context, url, error) =>
Expand All @@ -129,7 +130,7 @@
Brightness.light
? Colors.black
: Colors.white,
fontSize: 16,
fontSize: 16.pixelScale(context),

Check warning on line 133 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L133

Added line #L133 was not covered by tests
letterSpacing: 0,
fontWeight: FontWeight.w500,
),
Expand All @@ -138,10 +139,10 @@
),
Expanded(
child: Text(DateFormat('d EEEE MMM yyyy kk:mm').format(e.startDate),
style: const TextStyle(
style: TextStyle(

Check warning on line 142 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L142

Added line #L142 was not covered by tests
fontFamily: 'Inter',
color: Colors.grey,
fontSize: 14,
fontSize: 14.pixelScale(context),

Check warning on line 145 in lib/view/components/events/joined_event_card.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/events/joined_event_card.dart#L145

Added line #L145 was not covered by tests
letterSpacing: 0,
fontWeight: FontWeight.w500,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/view/components/home/connection_update.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
crossAxisAlignment: CrossAxisAlignment.center,
children: [
widget.connectionStatus == "connect"
? Text("${widget.user} wants to connect", style: const TextStyle(fontWeight: FontWeight.bold))
: Text("${widget.user} disconnected", style: const TextStyle(fontWeight: FontWeight.bold)),
? Expanded( child:Text("${widget.user} wants to connect", style: const TextStyle(fontWeight: FontWeight.bold)))
: Expanded(child:Text("${widget.user} disconnected", style: const TextStyle(fontWeight: FontWeight.bold))),

Check warning on line 28 in lib/view/components/home/connection_update.dart

View check run for this annotation

Codecov / codecov/patch

lib/view/components/home/connection_update.dart#L27-L28

Added lines #L27 - L28 were not covered by tests
const Icon(Icons.close_sharp)
],
));
Expand Down
2 changes: 1 addition & 1 deletion lib/view/components/home/connection_updates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class _ConnectionUpdatesState extends State<ConnectionUpdates> {
} else {
final connectionRequests = snapshot.data!;
return ConstrainedBox(
constraints: const BoxConstraints(maxHeight: 300),
constraints: const BoxConstraints(maxHeight: 300),
child: ListView.builder(
shrinkWrap: true,
itemCount: connectionRequests.length,
Expand Down
Loading
Loading