Skip to content

Commit

Permalink
fixed a couple more dynamic sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
Saisriram2003 committed Mar 24, 2024
1 parent 4e51262 commit e8c15aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions bu_passport/lib/components/event_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ class EventWidget extends StatefulWidget {
class _EventWidgetState extends State<EventWidget> {
@override
Widget build(BuildContext context) {
double screenWidth = MediaQuery.of(context).size.width;
double screenHeight = MediaQuery.of(context).size.height;

double sizedBoxHeight = (MediaQuery.of(context).size.height * 0.02);
double edgeInsets = (MediaQuery.of(context).size.width * 0.02);
return GestureDetector(
onTap: () {
// Navigate to the event page
Expand All @@ -24,7 +29,7 @@ class _EventWidgetState extends State<EventWidget> {
);
},
child: Container(
padding: EdgeInsets.all(16.0),
padding: EdgeInsets.all(edgeInsets),
child: Stack(
children: [
// Background image
Expand All @@ -49,7 +54,7 @@ class _EventWidgetState extends State<EventWidget> {
color: Colors.white, // Text color on top of the image
),
),
SizedBox(height: 8.0),
SizedBox(height: sizedBoxHeight),
Text(
'${widget.event.eventLocation}',
style: TextStyle(fontSize: 16.0, color: Colors.white),
Expand Down
4 changes: 2 additions & 2 deletions bu_passport/lib/pages/signup_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ class _SignUpPageState extends State<SignUpPage> {
labelText: 'Last Name',
),
),
SizedBox(height: 20),
SizedBox(height: sizedBoxHeight),
TextField(
controller: _emailController,
decoration: const InputDecoration(
labelText: 'Email',
),
),
SizedBox(height: 20),
SizedBox(height: sizedBoxHeight),
TextField(
controller: _buIDController,
decoration: const InputDecoration(
Expand Down

0 comments on commit e8c15aa

Please sign in to comment.