diff --git a/project/lib/calendar/calendar_selection.dart b/project/lib/calendar/calendar_selection.dart index ce69af50..199225c5 100644 --- a/project/lib/calendar/calendar_selection.dart +++ b/project/lib/calendar/calendar_selection.dart @@ -169,7 +169,7 @@ class CalendarSelection extends StatelessWidget { style: const TextStyle(fontSize: 10)), SizedBox( width: screenWidth, - height: 32, + height: MediaQuery.of(context).viewPadding.bottom, ) ], ), diff --git a/project/lib/calendar/link_calendar.dart b/project/lib/calendar/link_calendar.dart index f3cd6299..853dab11 100644 --- a/project/lib/calendar/link_calendar.dart +++ b/project/lib/calendar/link_calendar.dart @@ -105,8 +105,8 @@ class _CalendarState extends State { ), const Text( style: TextStyle(fontSize: 15), - "Link third-party calendars to be used "), - const Text("with Round (optional)"), + "Link your Google Calendar Here"), + const Text("(optional)"), Padding( padding: const EdgeInsets.fromLTRB(50, 50, 50, 150), child: PlatformElevatedButton( diff --git a/project/lib/group/group_creation.dart b/project/lib/group/group_creation.dart index 0f078603..01307ac7 100644 --- a/project/lib/group/group_creation.dart +++ b/project/lib/group/group_creation.dart @@ -271,7 +271,7 @@ class _GroupCreationState extends State { style: const TextStyle(fontSize: 10)), SizedBox( width: screenWidth, - height: 32, + height: MediaQuery.of(context).viewPadding.bottom, ) ], ), diff --git a/project/lib/group/group_home_new.dart b/project/lib/group/group_home_new.dart deleted file mode 100644 index d8e01c86..00000000 --- a/project/lib/group/group_home_new.dart +++ /dev/null @@ -1,72 +0,0 @@ -// import 'package:firebase_database/firebase_database.dart'; -// import 'package:flutter/material.dart'; -// import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; -// import 'package:groupmeet/home.dart'; -// -// @visibleForTesting -// class GroupHomeNewState extends State { -// late DatabaseReference ref; -// RoundGroup? group; -// -// @override -// void initState() { -// super.initState(); -// //ref = FirebaseDatabase.instance.ref("users/$temp"); -// ref = FirebaseDatabase.instance.ref("groups/${widget.groupID}/"); -// ref.get().then((g) { -// Map vals = g.value as Map; -// -// int color = vals['color'] as int; -// String emoji = vals['emoji'] as String; -// String name = vals['name'] as String; -// -// // Group(widget.groupID, Color(color), emoji, name); -// setState(() { -// group = RoundGroup(widget.groupID, Color(color), emoji, name, ); -// }); -// }); -// } -// -// @override -// Widget build(BuildContext context) { -// return PlatformScaffold( -// appBar: PlatformAppBar( -// title: PlatformText(group?.name ?? "No Name"), -// ), -// body: Column( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [ -// Row( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [PlatformText("Group ID: ${group?.id ?? "No Id"}")], -// ), -// Row( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [PlatformText("Group name: ${group?.name ?? "No Name"}")], -// ), -// Row( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [ -// PlatformText("Group emoji: ${group?.emoji ?? "No Emoji"}"), -// ], -// ), -// Row( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [ -// PlatformText("Group color: ${group?.color ?? "No color"}"), -// ], -// ), -// ], -// ), -// ); -// } -// } -// -// class GroupHomeNew extends StatefulWidget { -// GroupHomeNew({Key? key, required this.groupID}) : super(key: key); -// -// final String groupID; -// -// @override -// State createState() => GroupHomeNewState(); -// } diff --git a/project/lib/home.dart b/project/lib/home.dart index 010d6c83..30a976eb 100644 --- a/project/lib/home.dart +++ b/project/lib/home.dart @@ -341,9 +341,7 @@ class _HomeScreen extends State { ), ), Positioned( - width: screenWidth - 32, height: 0.20 * screenHeight - 16, - left: 16, bottom: 0, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, diff --git a/project/lib/new_group_view.dart b/project/lib/new_group_view.dart index 8f27c9a5..91248964 100644 --- a/project/lib/new_group_view.dart +++ b/project/lib/new_group_view.dart @@ -213,7 +213,8 @@ class _NewGroupView extends State { } void popMain() { - Navigator.of(context).pop(); + Navigator.pop(context); + Navigator.pop(context); } Future leaveGroup() async { @@ -385,13 +386,17 @@ class _NewGroupView extends State { children: [ Row( children: [ - GestureDetector(child: Padding(padding: EdgeInsets.fromLTRB(32, 0, 16, 0), child: SizedBox(child: Image.asset("images/$name" + "App.png"), width: 48, height: 48,),), onTap: () => socialTap(name)), + GestureDetector(child: Padding(padding: EdgeInsets.fromLTRB(32, 0, 16, 0), child: SizedBox(width: 48, height: 48,child: Image.asset("images/$name" + "App.png"),),), onTap: () => socialTap(name)), Container(padding: EdgeInsets.fromLTRB(0, 0, 0, 0), width: barWidth, height: 32, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.elliptical(48, 48)), border: Border.all(color: Colors.white), ), child: Align( + // FIXME / WONTFIX: Known issue - Inside Bar UI will clip beyond bounds for small fractions + // Ex: 1/24. Not fixing bc it is unlikely to happen in practice (groups aren't that large) + // Push to later sprint if possible + alignment: Alignment.centerLeft, // FIXME / WONTFIX: Known issue - Inside Bar UI will clip beyond bounds for small fractions // Ex: 1/24. Not fixing bc it is unlikely to happen in practice (groups aren't that large) // Push to later sprint if possible @@ -401,7 +406,6 @@ class _NewGroupView extends State { borderRadius: BorderRadius.all(Radius.elliptical(200000, 200000)), border: Border.all(color: roundPurple), )), - alignment: Alignment.centerLeft, ), ), Padding(padding: EdgeInsets.fromLTRB(8, 0, 8, 0), child: PlatformText(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 18),),) @@ -488,7 +492,7 @@ class _NewGroupView extends State { mainWidgets.add( Container(width: screenWidth - 32, - height: (screenWidth - 32) * (2.6/5), + height: screenWidth - 140, decoration: BoxDecoration( color: roundPurple, borderRadius: BorderRadius.all(Radius.elliptical(48, 48)), @@ -497,32 +501,33 @@ class _NewGroupView extends State { child: Row( children: [ Container( - child: Column( - children: [ - PlatformText(new DateFormat.MMMM().format(appointment!).toString(), style: TextStyle(fontSize: 36, fontWeight: FontWeight.w500, color: roundPurple, height: 1.3),), - PlatformText(new DateFormat.d().format(appointment!).toString(), style: TextStyle(fontSize: 96, fontWeight: FontWeight.w900, color: roundPurple, height: 1.0)), - PlatformText(new DateFormat.jm().format(appointment!).toString(), style: TextStyle(fontSize: 36, fontWeight: FontWeight.w900, color: roundPurple, height: 0.8)), - ], - ), width: (screenWidth - 64) * 0.6, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.elliptical(48, 48)), border: Border.all(color: Colors.white) ), + child: Column( + children: [ + PlatformText(new DateFormat.MMMM().format(appointment!).toString(), style: TextStyle(fontSize: 36, fontWeight: FontWeight.w500, color: roundPurple, height: 1.3),), + PlatformText(new DateFormat.d().format(appointment!).toString(), style: TextStyle(fontSize: 50, fontWeight: FontWeight.w900, color: roundPurple, height: 1.0)), + PlatformText(new DateFormat.jm().format(appointment!).toString(), style: TextStyle(fontSize: 36, fontWeight: FontWeight.w900, color: roundPurple, height: 0.8)), + ], + ), ), Container( + width: (screenWidth - 64) * 0.475, child: GestureDetector( + onTap: showRSVPList, child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - PlatformText(rsvped.length.toString() + " Confirmed", style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold)), + // align this text below to the center + PlatformText("${rsvped.length} Confirmed", style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold,)), PlatformText(infoString, style: TextStyle(fontSize: 16,), textAlign: TextAlign.center), ], ), - onTap: showRSVPList, ), - width: (screenWidth - 64) * 0.475, ) ], ), @@ -535,12 +540,11 @@ class _NewGroupView extends State { padding: EdgeInsets.fromLTRB(32, 32, 32, 32), child: Container( width: screenWidth - 64, - child: PlatformTextButton(child: + child: PlatformTextButton(color: roundPurple, + onPressed: handleCalendarRequest,child: PlatformText(appointment != null ? "Request Another Time" : "Generate a New Round Up", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold) ), - color: roundPurple, - onPressed: handleCalendarRequest, ), ), ), @@ -572,7 +576,7 @@ class _NewGroupView extends State { PlatformText(parsedMembers[index].name, style: TextStyle(fontSize: 20),), Expanded(flex: 1, child: Align(alignment: Alignment.centerRight, - child: PlatformTextButton(child: PlatformText("View Profile", style: TextStyle(color: Colors.white),), padding: EdgeInsets.fromLTRB(16, 0, 16, 0), color: roundPurple, onPressed: () => profileTap(index),), + child: PlatformTextButton(padding: EdgeInsets.fromLTRB(16, 0, 16, 0), color: roundPurple, onPressed: () => profileTap(index),child: PlatformText("View Profile", style: TextStyle(color: Colors.white, fontSize: 12),),), ) ,) ], @@ -584,20 +588,20 @@ class _NewGroupView extends State { mainWidgets.add(SizedBox(width: screenWidth, height: 16,)); mainWidgets.add( - PlatformTextButton(child: PlatformText(isAdmin ? "Delete Circle" : "Leave Group", style: TextStyle(color: Colors.white), selectionColor: Colors.white), onPressed: triggerDelete, color: roundRed,) + PlatformTextButton(onPressed: triggerDelete, color: roundRed,child: PlatformText(isAdmin ? "Delete Circle" : "Leave Group", style: TextStyle(color: Colors.white), selectionColor: Colors.white),) ); mainWidgets.add(SizedBox(width: screenWidth, height: 16,)); return PlatformScaffold( - appBar: PlatformAppBar(title: PlatformText(group.emoji + " " + group.name, style: TextStyle(color: Colors.black)), backgroundColor: group.color, trailingActions: [ + appBar: PlatformAppBar(title: PlatformText(group.emoji + " " + group.name, style: TextStyle(color: Colors.white)), backgroundColor: group.color, trailingActions: [ - Padding(padding: EdgeInsets.fromLTRB(32, 0, 16, 0), child: GestureDetector(child: Icon(PlatformIcons(context).book, color: Colors.black), onTap: () => calendar(),),), - Padding(padding: EdgeInsets.fromLTRB(0, 0, 0, 4), child: GestureDetector(child: Icon(PlatformIcons(context).share, color: Colors.black), onTap: () => share(),),) + Padding(padding: EdgeInsets.fromLTRB(32, 0, 24, 0), child: GestureDetector(child: Icon(PlatformIcons(context).book, color: Colors.white), onTap: () => calendar(),),), + Padding(padding: EdgeInsets.fromLTRB(0, 0, 10, 4), child: GestureDetector(child: Icon(PlatformIcons(context).share, color: Colors.white), onTap: () => share(),),) // Padding(padding: EdgeInsets.zero, child: SizedBox(width: 80, height: 80, child: PlatformIconButton(icon: Icon(PlatformIcons(context).book), color: Colors.black, onPressed: () => calendar(), cupertino: (context, platform) => CupertinoIconButtonData(color: Colors.transparent),)),), // Padding(padding: EdgeInsets.zero, child: SizedBox(width: 80, height: 80, child: PlatformIconButton(icon: Icon(PlatformIcons(context).share), color: Colors.black, onPressed: () => share(), cupertino: (context, platform) => CupertinoIconButtonData(color: Colors.transparent),)),) - ], material: (context, platform) => MaterialAppBarData(iconTheme: IconThemeData(color: Colors.black))), + ], material: (context, platform) => MaterialAppBarData(iconTheme: IconThemeData(color: Colors.white))), body: SingleChildScrollView( child: Column( children: mainWidgets, @@ -782,10 +786,6 @@ class _NewGroupView extends State { ))); } ); - - - - }), ], cancelAction: CancelAction(title: PlatformText('Cancel', style: TextStyle(color: Colors.white),)),// onPressed parameter is optional by default will dismiss the ActionSheet diff --git a/project/lib/onboarding/explainer.dart b/project/lib/onboarding/explainer.dart index a7e10cad..898ecb13 100644 --- a/project/lib/onboarding/explainer.dart +++ b/project/lib/onboarding/explainer.dart @@ -99,7 +99,7 @@ class Explainer extends StatelessWidget { style: const TextStyle(fontSize: 10)), SizedBox( width: screenWidth, - height: 32, + height: MediaQuery.of(context).viewPadding.bottom, ) ], ), diff --git a/project/lib/onboarding/signin.dart b/project/lib/onboarding/signin.dart index 7bc09084..bea6884f 100644 --- a/project/lib/onboarding/signin.dart +++ b/project/lib/onboarding/signin.dart @@ -108,7 +108,7 @@ class SignIn extends StatelessWidget { isAntiAlias: true, ), SizedBox(width: screenWidth, height: 8), - PlatformText("Round the world", + PlatformText("Sign In", style: const TextStyle(fontSize: 36, fontWeight: FontWeight.w600), textAlign: TextAlign.center), SizedBox(width: screenWidth, height: 32), @@ -159,13 +159,13 @@ class SignIn extends StatelessWidget { padding: EdgeInsets.zero, onPressed: () => buttonPress(context), )), - SizedBox(width: screenWidth, height: 16), + SizedBox(width: screenWidth, height: 20), PlatformText("© 2023 Round Corp\nFrom Philly with Love 🤍", textAlign: TextAlign.center, style: const TextStyle(fontSize: 10)), SizedBox( width: screenWidth, - height: 32, + height: MediaQuery.of(context).viewPadding.bottom, ) ], ), diff --git a/project/lib/onboarding/signup.dart b/project/lib/onboarding/signup.dart index 4a03aad3..f7650dd1 100644 --- a/project/lib/onboarding/signup.dart +++ b/project/lib/onboarding/signup.dart @@ -162,8 +162,8 @@ class SignUp extends StatelessWidget { isAntiAlias: true, ), SizedBox(width: screenWidth, height: 8), - PlatformText("Be Round or\nbe square", - style: const TextStyle(fontSize: 36, fontWeight: FontWeight.w600), + PlatformText("Sign Up", + style: const TextStyle(fontSize: 32, fontWeight: FontWeight.w600), textAlign: TextAlign.center), SizedBox(width: screenWidth, height: 32), @@ -230,13 +230,13 @@ class SignUp extends StatelessWidget { padding: EdgeInsets.zero, onPressed: () => buttonPress(context), )), - SizedBox(width: screenWidth, height: 16), + SizedBox(width: screenWidth, height: 20), PlatformText("© 2023 Round Corp\nFrom Philly with Love 🤍", textAlign: TextAlign.center, style: const TextStyle(fontSize: 10)), SizedBox( width: screenWidth, - height: 32, + height: MediaQuery.of(context).viewPadding.bottom, ) ], ), diff --git a/project/lib/onboarding/social_onboarding.dart b/project/lib/onboarding/social_onboarding.dart index 1be5614e..9bb0e95b 100644 --- a/project/lib/onboarding/social_onboarding.dart +++ b/project/lib/onboarding/social_onboarding.dart @@ -112,17 +112,17 @@ class SocialOnboarding extends StatelessWidget { ), SizedBox(width: screenWidth, height: 8), PlatformText("Get Around", - style: const TextStyle(fontSize: 36, fontWeight: FontWeight.w600)), - SizedBox(width: screenWidth, height: 32), + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.w600)), + SizedBox(width: screenWidth, height: 12), Padding( padding: EdgeInsets.symmetric(horizontal: screenWidth / 8, vertical: 0), child: PlatformText( "Save third-party usernames to be used with Round (optional)", textAlign: TextAlign.center, - style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w400), + style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w400), )), - const SizedBox(height: 32), + const SizedBox(height: 12), SizedBox( width: screenWidth * (3 / 4), child: Row( @@ -243,13 +243,13 @@ class SocialOnboarding extends StatelessWidget { padding: EdgeInsets.zero, onPressed: () => buttonPress(context), )), - SizedBox(width: screenWidth, height: 16), + SizedBox(width: screenWidth, height: 12), PlatformText("© 2023 Round Corp\nFrom Philly with Love 🤍", textAlign: TextAlign.center, style: const TextStyle(fontSize: 10)), SizedBox( width: screenWidth, - height: 32, + height: MediaQuery.of(context).viewPadding.bottom, ) ], ), diff --git a/project/lib/settings/add_event.dart b/project/lib/settings/add_event.dart index a7552465..7a2622f4 100644 --- a/project/lib/settings/add_event.dart +++ b/project/lib/settings/add_event.dart @@ -119,6 +119,7 @@ class _AddEventState extends State { }); print("added"); Navigator.of(context).pop(); + Navigator.of(context).pop(); }, color: roundPurple, child: PlatformText( diff --git a/project/lib/settings/settings.dart b/project/lib/settings/settings.dart index 9c178e49..507e8194 100644 --- a/project/lib/settings/settings.dart +++ b/project/lib/settings/settings.dart @@ -15,7 +15,8 @@ import 'package:googleapis_auth/googleapis_auth.dart' as auth show AuthClient; import 'package:date_utils/date_utils.dart' as utils; class Settings extends StatefulWidget { - const Settings({super.key, required this.firebaseDatabase, required this.firebaseAuth}); + const Settings( + {super.key, required this.firebaseDatabase, required this.firebaseAuth}); final FirebaseDatabase firebaseDatabase; final FirebaseAuth firebaseAuth; @@ -53,13 +54,12 @@ class _Settings extends State { // Navigator.of(context).push(platformPageRoute(context: context, builder: (context) => Settings(title: "Old Settings",))); } - void saveInfo() { Navigator.of(context).pop(); String? userID = widget.firebaseAuth.currentUser?.uid; - if(userID == null) { + if (userID == null) { // TODO: Show error dialog print("Null User ID"); return; @@ -68,7 +68,8 @@ class _Settings extends State { widget.firebaseDatabase.ref("users/$userID/email").set(newEmail); String firstName = newName.split(" ").first; - String lastName = newName.split(" ").getRange(1, newName.split(" ").length).join(" "); + String lastName = + newName.split(" ").getRange(1, newName.split(" ").length).join(" "); widget.firebaseDatabase.ref("users/$userID/firstName").set(firstName); widget.firebaseDatabase.ref("users/$userID/lastName").set(lastName); @@ -105,7 +106,7 @@ class _Settings extends State { DatabaseReference userRef = widget.firebaseDatabase.ref("users/$userID"); userRef.onValue.listen((event) { - if(event.snapshot.value == null) { + if (event.snapshot.value == null) { print("null snapshot"); return; } @@ -113,7 +114,8 @@ class _Settings extends State { print(event.snapshot.value); print(event.snapshot.value.runtimeType); - Map data = event.snapshot.value as Map; + Map data = + event.snapshot.value as Map; print(data["firstName"] as String); print(data["lastName"] as String); @@ -132,7 +134,7 @@ class _Settings extends State { messages = data["messages_name"] as String?; discord = data["discord_name"] as String?; - fb = data["facebook_name"] as String?; + fb = data["facebook_name"] as String?; insta = data["instagram_name"] as String?; snap = data["snapchat_name"] as String?; cal = data['has_calendar'] as bool?; @@ -166,8 +168,7 @@ class _Settings extends State { Future getPrimaryCalendar() async { // Google Calendar API _googleSignIn.onCurrentUserChanged.listen((GoogleSignInAccount? account) { - setState(() { - }); + setState(() {}); }); await _handleSignIn(); @@ -187,7 +188,7 @@ class _Settings extends State { final String? uid = FirebaseAuth.instance.currentUser?.uid; - if(uid == null) { + if (uid == null) { return; } @@ -210,18 +211,16 @@ class _Settings extends State { events.add(temp); } await ref.update({"calendarEvents": events}); - } void saveSocial(String media) { - // Calendar is gonna be a different case Navigator.of(context).pop(); String? userID = widget.firebaseAuth.currentUser?.uid; - if(userID == null) { + if (userID == null) { // TODO: Show error dialog print("Null User ID"); return; @@ -284,26 +283,32 @@ class _Settings extends State { String? newSocial; void selectedSocial(String social) { - - if(social == "calendar") { - - if(cal == null) { + if (social == "calendar") { + if (cal == null) { // If cal is null - bring up calendar sync page - Navigator.of(context).push(platformPageRoute(context: context, builder: (context) => CalendarSelection(fromSettings: true,))); + Navigator.of(context).push(platformPageRoute( + context: context, + builder: (context) => CalendarSelection( + fromSettings: true, + ))); return; } // ask if u want to refresh PlatformAlertDialog confirmation = PlatformAlertDialog( title: PlatformText("Are you sure?"), - content: PlatformText("Syncing your Google calendar will remove any manually added events"), + content: PlatformText( + "Syncing your Google calendar will remove any manually added events"), actions: [ PlatformTextButton( - child: PlatformText("Cancel", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), + child: PlatformText("Cancel", + style: TextStyle( + color: Colors.white, fontWeight: FontWeight.bold)), onPressed: () => Navigator.of(context).pop(), ), PlatformTextButton( - child: PlatformText("Sync", selectionColor: roundRed, style: TextStyle(color: roundRed)), + child: PlatformText("Sync", + selectionColor: roundRed, style: TextStyle(color: roundRed)), onPressed: () { Navigator.pop(context); @@ -324,7 +329,6 @@ class _Settings extends State { return; } - String hintString; switch (social) { @@ -355,7 +359,6 @@ class _Settings extends State { // Switch and set based on that - // TODO: Alert to edit that particular social media PlatformAlertDialog error = PlatformAlertDialog( title: PlatformText("Edit " + hintString), @@ -438,7 +441,7 @@ class _Settings extends State { Navigator.of(context).pop(); }, ), - PlatformTextButton( + PlatformTextButton( child: PlatformText("Save", selectionColor: roundPurple, style: const TextStyle(color: Colors.white)), @@ -456,7 +459,8 @@ class _Settings extends State { } void about(BuildContext context) async { - Uri aboutURL = Uri.parse("https://github.com/Capstone-Projects-2023-Spring/project-groupmeet"); + Uri aboutURL = Uri.parse( + "https://github.com/Capstone-Projects-2023-Spring/project-groupmeet"); await launchUrl(aboutURL, mode: LaunchMode.externalApplication); } @@ -464,7 +468,8 @@ class _Settings extends State { void signOut(BuildContext context) async { try { await widget.firebaseAuth.signOut(); - Navigator.of(context).push(platformPageRoute(context: context, builder: (context) => SignUp())); + Navigator.of(context).push( + platformPageRoute(context: context, builder: (context) => SignUp())); } catch (e) { // TODO: Maybe show error alert? print(e); @@ -482,7 +487,7 @@ class _Settings extends State { @override Widget build(BuildContext context) { double screenWidth = MediaQuery.of(context).size.width; - // double screenHeight = MediaQuery.of(context).size.height; + double screenHeight = MediaQuery.of(context).size.height; double smsOpacity = messages == null ? opaqueValue : 0.0; double snapOpacity = snap == null ? opaqueValue : 0.0; @@ -491,45 +496,42 @@ class _Settings extends State { double instaOpacity = insta == null ? opaqueValue : 0.0; double calOpacity = cal == null ? opaqueValue : 0.0; - observeData(); return PlatformScaffold( - appBar: PlatformAppBar( - title: PlatformText("Settings") - ), - body: ListView( - children: [ - Padding(padding: const EdgeInsets.all(16), child: - // Name / Email - Container( - width: screenWidth - 32, - height: 80, - decoration: BoxDecoration( - border: Border.all( - color: const Color(0xFF1C1C1E) + appBar: PlatformAppBar(title: PlatformText("Settings")), + body: ListView(children: [ + Padding( + padding: const EdgeInsets.all(16), + child: + // Name / Email + Container( + width: screenWidth - 32, + height: screenHeight * (1 / 8) + 1, + decoration: BoxDecoration( + border: Border.all(color: const Color(0xFF1C1C1E)), + color: const Color(0xFF1C1C1E), + borderRadius: const BorderRadius.all(Radius.circular(200)), ), - color: const Color(0xFF1C1C1E), - borderRadius: const BorderRadius.all(Radius.circular(160)), - ), - child: Row( - children: [ - Padding( - padding: const EdgeInsets.all(16), - child: SizedBox( - width: screenWidth * (2/3), - child: Column( - children: [ + child: Row( + children: [ + Padding( + padding: const EdgeInsets.all(16), + child: SizedBox( + width: screenWidth * (2 / 3), + child: Column( + children: [ SizedBox( width: (screenWidth * (2 / 3)) - 32, - child: PlatformText(name, + height: 37, + child: PlatformText(name, textAlign: TextAlign.left, style: const TextStyle( - fontSize: 24, + fontSize: 20, fontWeight: FontWeight.w600))), SizedBox( width: (screenWidth * (2 / 3)) - 32, - child: PlatformText(email, + child: PlatformText(email, textAlign: TextAlign.left, style: const TextStyle( fontSize: 14, @@ -538,7 +540,7 @@ class _Settings extends State { ), ], ))), - Center( + Center( child: PlatformIconButton( key: const Key("editProfileButtonKey"), icon: Icon( @@ -547,91 +549,127 @@ class _Settings extends State { ), onPressed: editProfile), ) - ], + ], + ), ), - ),), - Padding(padding: const EdgeInsets.fromLTRB(32, 16, 0, 0), child: - PlatformText("Linked Socials", style: const TextStyle(fontSize: 24, fontWeight: FontWeight.w600)), + ), + Padding( + padding: const EdgeInsets.fromLTRB(32, 16, 0, 0), + child: PlatformText("Linked Socials", + style: + const TextStyle(fontSize: 20, fontWeight: FontWeight.w600)), ), - Padding( + Padding( padding: const EdgeInsets.all(16), child: Container( width: screenWidth - 32, - height: 2*((screenWidth - 32 - 64)/3), - decoration: BoxDecoration( - border: Border.all( - color: const Color(0xFF1C1C1E) + height: screenHeight * (1 / 4) - 1, + decoration: BoxDecoration( + border: Border.all(color: const Color(0xFF1C1C1E)), + color: const Color(0xFF1C1C1E), + borderRadius: const BorderRadius.all(Radius.elliptical(32, 32)), ), - color: const Color(0xFF1C1C1E), - borderRadius: const BorderRadius.all(Radius.elliptical(32, 32)), - ), - child: - Flex( - direction: Axis.vertical, - children: [ - Expanded( - flex: 1, - child: Padding( - padding: const EdgeInsets.all(16), - child: GridView.count(crossAxisCount: 3, childAspectRatio: 1.5, mainAxisSpacing: 16, children: [ + child: Flex( + direction: Axis.vertical, + children: [ + Expanded( + flex: 1, + child: Padding( + padding: const EdgeInsets.all(16), + child: GridView.count( + crossAxisCount: 3, + childAspectRatio: 1.5, + mainAxisSpacing: 16, + children: [ GestureDetector( key: const Key("smsAppGestureKey"), child: ColorFiltered( - key : const Key("smsAppOpacityKey"), - colorFilter: ColorFilter.mode(Colors.black.withOpacity(smsOpacity), BlendMode.srcATop), - child: SizedBox(child: Image.asset("images/smsApp.png",)), + key: const Key("smsAppOpacityKey"), + colorFilter: ColorFilter.mode( + Colors.black.withOpacity(smsOpacity), + BlendMode.srcATop), + child: SizedBox( + child: Image.asset( + "images/smsApp.png", + )), ), onTap: () => selectedSocial("sms"), ), GestureDetector( key: const Key("snapAppGestureKey"), child: ColorFiltered( - key : const Key("snapAppOpacityKey"), - colorFilter: ColorFilter.mode(Colors.black.withOpacity(snapOpacity), BlendMode.srcATop), - child: SizedBox(child: Image.asset("images/snapchatApp.png",)), + key: const Key("snapAppOpacityKey"), + colorFilter: ColorFilter.mode( + Colors.black.withOpacity(snapOpacity), + BlendMode.srcATop), + child: SizedBox( + child: Image.asset( + "images/snapchatApp.png", + )), ), onTap: () => selectedSocial("snap"), ), GestureDetector( key: const Key("discordAppGestureKey"), child: ColorFiltered( - key : const Key("discordAppOpacityKey"), - colorFilter: ColorFilter.mode(Colors.black.withOpacity(discordOpacity), BlendMode.srcATop), - child: SizedBox(child: Image.asset("images/discordApp.png",)), + key: const Key("discordAppOpacityKey"), + colorFilter: ColorFilter.mode( + Colors.black.withOpacity(discordOpacity), + BlendMode.srcATop), + child: SizedBox( + child: Image.asset( + "images/discordApp.png", + )), ), onTap: () => selectedSocial("discord"), ), GestureDetector( - key: const Key("instagramAppGestureKey"), - child: ColorFiltered( - key : const Key("instagramAppOpacityKey"), - colorFilter: ColorFilter.mode(Colors.black.withOpacity(instaOpacity), BlendMode.srcATop), - child: SizedBox(child: Image.asset("images/instagramApp.png",)), - ), - onTap: () => selectedSocial("insta") - ), + key: const Key("instagramAppGestureKey"), + child: ColorFiltered( + key: const Key("instagramAppOpacityKey"), + colorFilter: ColorFilter.mode( + Colors.black.withOpacity(instaOpacity), + BlendMode.srcATop), + child: SizedBox( + child: Image.asset( + "images/instagramApp.png", + )), + ), + onTap: () => selectedSocial("insta")), GestureDetector( key: const Key("facebookAppGestureKey"), child: ColorFiltered( - key : const Key("facebookAppOpacityKey"), - colorFilter: ColorFilter.mode(Colors.black.withOpacity(fbOpacity), BlendMode.srcATop), - child: SizedBox(child: Image.asset("images/facebookApp.png",)), + key: const Key("facebookAppOpacityKey"), + colorFilter: ColorFilter.mode( + Colors.black.withOpacity(fbOpacity), + BlendMode.srcATop), + child: SizedBox( + child: Image.asset( + "images/facebookApp.png", + )), ), onTap: () => selectedSocial("fb"), ), GestureDetector( child: ColorFiltered( - colorFilter: ColorFilter.mode(Colors.black.withOpacity(calOpacity), BlendMode.srcATop), - child: SizedBox(child: Image.asset("images/calendarApp.png",)), + colorFilter: ColorFilter.mode( + Colors.black.withOpacity(calOpacity), + BlendMode.srcATop), + child: SizedBox( + child: Image.asset( + "images/calendarApp.png", + )), ), onTap: () => selectedSocial("calendar"), ) - ],), - )) - ], - ), - ),), + ], + ), + )) + ], + ), + ), + ), // Padding(padding: EdgeInsets.fromLTRB(32, 16, 0, 0), child: // PlatformText("Linked Calendar", style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600)), @@ -727,7 +765,6 @@ class _Settings extends State { // ) // ),), - // GestureDetector( // child: Padding(padding: EdgeInsets.all(16), child: // Container( @@ -759,36 +796,48 @@ class _Settings extends State { // ), GestureDetector( - child: Padding(padding: const EdgeInsets.all(16), child: - Container( - width: screenWidth - 32, - height: 58, - decoration: BoxDecoration( - border: Border.all( - color: const Color(0xFF1C1C1E) + child: Padding( + padding: const EdgeInsets.all(16), + child: Container( + width: screenWidth - 32, + height: 58, + decoration: BoxDecoration( + border: Border.all(color: const Color(0xFF1C1C1E)), + color: const Color(0xFF1C1C1E), + borderRadius: const BorderRadius.all(Radius.circular(160)), + ), + child: Row( + children: [ + Padding( + padding: const EdgeInsets.all(16), + child: SizedBox( + width: (screenWidth) * (2 / 3), + child: Column( + children: [ + SizedBox( + width: ((screenWidth) * (2 / 3)), + height: 24, + child: PlatformText("About", + textAlign: TextAlign.left, + style: const TextStyle( + fontSize: 18, + fontWeight: FontWeight.w500))), + ], + ))), + Center( + child: PlatformIconButton( + icon: Icon( + PlatformIcons(context).rightChevron, + color: Colors.white, + )), + ) + ], ), - color: const Color(0xFF1C1C1E), - borderRadius: const BorderRadius.all(Radius.circular(160)), - ), - child: Row( - children: [ - Padding( - padding: const EdgeInsets.all(16), - child: SizedBox( - width: (screenWidth) * (2/3), - child: Column( - children: [ - SizedBox(width: ((screenWidth)*(2/3)) - 32, child: PlatformText("About", textAlign: TextAlign.left, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.w500))), - ], - ))), - Center(child: PlatformIconButton(icon: Icon(PlatformIcons(context).rightChevron, color: Colors.white,)),) - ], ), - ),), + ), onTap: () => about(context), ), - // GestureDetector( // child: Padding(padding: EdgeInsets.all(16), child: // Container( @@ -819,42 +868,55 @@ class _Settings extends State { // onTap: () => legacySettings(), // ), - Padding(padding: EdgeInsets.all(16), child: - GestureDetector( - key: const Key("signOutSettingsGestureDetectorKey"), - child: Container( - width: screenWidth - 32, - height: 58, - decoration: BoxDecoration( - border: Border.all( - color: const Color(0xFF1C1C1E) + Padding( + padding: EdgeInsets.all(16), + child: GestureDetector( + key: const Key("signOutSettingsGestureDetectorKey"), + child: Container( + width: screenWidth - 32, + height: 58, + decoration: BoxDecoration( + border: Border.all(color: const Color(0xFF1C1C1E)), + color: const Color(0xFF1C1C1E), + borderRadius: const BorderRadius.all(Radius.circular(160)), + ), + child: Row( + children: [ + Padding( + padding: EdgeInsets.all(16), + child: SizedBox( + width: (screenWidth) * (2 / 3), + child: Column( + children: [ + SizedBox( + width: ((screenWidth) * (2 / 3)) - 3, + height: 24, + child: PlatformText("Sign Out", + textAlign: TextAlign.left, + style: TextStyle( + color: roundRed, + fontSize: 18, + fontWeight: FontWeight.w500))), + ], + ))) + ], ), - color: const Color(0xFF1C1C1E), - borderRadius: const BorderRadius.all(Radius.circular(160)), - ), - child: Row( - children: [ - Padding( - padding: EdgeInsets.all(16), - child: SizedBox( - width: (screenWidth) * (2/3), - child: Column( - children: [ - SizedBox(width: ((screenWidth)*(2/3)) - 32, child: PlatformText("Sign Out", textAlign: TextAlign.left, style: TextStyle(color: roundRed, fontSize: 20, fontWeight: FontWeight.w500))), - ], - ))) - ], ), + onTap: () => signOut(context), ), - onTap: () => signOut(context), - ),), + ), - Padding(padding: EdgeInsets.fromLTRB(0, 0, 0, 32), child: PlatformText("© 2023 Round Corp\nFrom Philly with Love 🤍", - textAlign: TextAlign.center, - style: const TextStyle(fontSize: 10)),) + Padding( + padding: EdgeInsets.fromLTRB(0, 0, 0, 32), + child: PlatformText("© 2023 Round Corp\nFrom Philly with Love 🤍", + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 10)), + ), + SizedBox( + width: screenWidth, + height: MediaQuery.of(context).viewPadding.bottom, + ) // About - ] - ) - ); + ])); } }