diff --git a/untitled_app/lib/controllers/edit_profile_controller.dart b/untitled_app/lib/controllers/edit_profile_controller.dart index 194e692..1694c81 100644 --- a/untitled_app/lib/controllers/edit_profile_controller.dart +++ b/untitled_app/lib/controllers/edit_profile_controller.dart @@ -74,6 +74,9 @@ class EditProfileController extends ChangeNotifier { void _pop() { context.pop("poped"); } + void _popDialog() { + Navigator.of(context, rootNavigator: true).pop(); + } void _popTwice() { _pop(); diff --git a/untitled_app/lib/controllers/settings_controller.dart b/untitled_app/lib/controllers/settings_controller.dart index 7037079..ddaa3aa 100644 --- a/untitled_app/lib/controllers/settings_controller.dart +++ b/untitled_app/lib/controllers/settings_controller.dart @@ -34,16 +34,11 @@ class SettingsController extends ChangeNotifier { } void _pop() { - context.pop(); + Navigator.of(context, rootNavigator: true).pop(); } - void _popDialog() { - Navigator.of(context, rootNavigator: true).pop(); -} - - void _delete() async { - _popDialog(); + _pop(); try { await locator().deleteAccount(); locator().enable(); @@ -89,7 +84,7 @@ class SettingsController extends ChangeNotifier { AppLocalizations.of(context)!.goBack, AppLocalizations.of(context)!.delete ], - [_popDialog, _delete], + [_pop, _delete], context); } } diff --git a/untitled_app/lib/custom_widgets/comment_card.dart b/untitled_app/lib/custom_widgets/comment_card.dart index 4f3f072..3c7f282 100644 --- a/untitled_app/lib/custom_widgets/comment_card.dart +++ b/untitled_app/lib/custom_widgets/comment_card.dart @@ -165,12 +165,17 @@ class _Card extends StatelessWidget { minimumSize: const Size(0, 0), tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), - child: Text( - "@${post.author.username}", - style: TextStyle( - fontSize: 16, - color: - Theme.of(context).colorScheme.onBackground, + child: SizedBox( + width: width * 0.69, + child: Text( + "@${post.author.username}", + style: TextStyle( + fontSize: 16, + color: Theme.of(context) + .colorScheme + .onBackground, + ), + overflow: TextOverflow.ellipsis, ), ), ), diff --git a/untitled_app/lib/custom_widgets/post_card.dart b/untitled_app/lib/custom_widgets/post_card.dart index d94b289..e01385e 100644 --- a/untitled_app/lib/custom_widgets/post_card.dart +++ b/untitled_app/lib/custom_widgets/post_card.dart @@ -234,13 +234,20 @@ class PostCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "@${post.author.username}", //post.author.name, - style: TextStyle( - fontSize: 17, - color: Theme.of(context) - .colorScheme - .onBackground, + SizedBox( + width: isPreview + ? width * 0.5 + : width * 0.7, + child: Text( + "@${post.author.username}", //post.author.name, + style: TextStyle( + fontSize: 17, + color: Theme.of(context) + .colorScheme + .onBackground, + ), + overflow: + TextOverflow.ellipsis, ), ), @@ -321,22 +328,22 @@ class PostCard extends StatelessWidget { const SizedBox(height: 6.0), if (post.gifURL != null) InkWell( - onDoubleTap: () { - if (!isPreview) { - if (!Provider.of< - PostCardController>( - context, - listen: false) - .liked) { - Provider.of( + onDoubleTap: () { + if (!isPreview) { + if (!Provider.of< + PostCardController>( context, listen: false) - .likePressed(); + .liked) { + Provider.of( + context, + listen: false) + .likePressed(); + } } - } - }, - child: GifWidget(url: post.gifURL!) - ), + }, + child: + GifWidget(url: post.gifURL!)), if (post.gifURL != null) const SizedBox(height: 6.0), if (post.body?.isNotEmpty ?? diff --git a/untitled_app/lib/custom_widgets/profile_page_header.dart b/untitled_app/lib/custom_widgets/profile_page_header.dart index 987eacd..259ce94 100644 --- a/untitled_app/lib/custom_widgets/profile_page_header.dart +++ b/untitled_app/lib/custom_widgets/profile_page_header.dart @@ -24,7 +24,7 @@ class ProfileHeader extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(left: 15), + padding: const EdgeInsets.only(left: 15, right: 15), child: Align( alignment: Alignment.topLeft, child: Column( diff --git a/untitled_app/lib/custom_widgets/searched_user_card.dart b/untitled_app/lib/custom_widgets/searched_user_card.dart index f0cd346..e1b6349 100644 --- a/untitled_app/lib/custom_widgets/searched_user_card.dart +++ b/untitled_app/lib/custom_widgets/searched_user_card.dart @@ -64,18 +64,26 @@ class UserCard extends StatelessWidget { ProfileAvatar( url: user.profilePicture, size: width * 0.115), Padding( - padding: EdgeInsets.all(width * 0.02), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (user.name != "") - Text(user.name, - style: const TextStyle( - fontWeight: FontWeight.bold)), - Text("@${user.username}") - ], - ), - ), + padding: EdgeInsets.all(width * 0.02), + child: SizedBox( + width: width * 0.45, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (user.name != "") + Text( + user.name, + style: const TextStyle( + fontWeight: FontWeight.bold), + overflow: TextOverflow.ellipsis, + ), + Text( + "@${user.username}", + overflow: TextOverflow.ellipsis, + ), + ], + ), + )), ], ), if (user.uid == locator().getUID()) diff --git a/untitled_app/lib/custom_widgets/tab_bar.dart b/untitled_app/lib/custom_widgets/tab_bar.dart index 31129f5..7009999 100644 --- a/untitled_app/lib/custom_widgets/tab_bar.dart +++ b/untitled_app/lib/custom_widgets/tab_bar.dart @@ -52,12 +52,18 @@ class _Button extends StatelessWidget { child: Container( width: width * 0.24, alignment: Alignment.center, - padding: const EdgeInsets.symmetric(vertical: 8), + padding: const EdgeInsets.symmetric(vertical: 4), decoration: BoxDecoration( - color: isActive - ? Theme.of(context).colorScheme.secondary - : Colors.transparent, - borderRadius: BorderRadius.circular(10), + // color: isActive + // ? Theme.of(context).colorScheme.secondary + // : Colors.transparent, + // borderRadius: BorderRadius.circular(10), + border: isActive + ? Border( + bottom: BorderSide( + width: 2.0, + color: Theme.of(context).colorScheme.secondary)) + : Border(), ), child: Text( text, @@ -65,7 +71,7 @@ class _Button extends StatelessWidget { overflow: TextOverflow.ellipsis, style: TextStyle( color: isActive - ? Theme.of(context).colorScheme.onSecondary + ? Theme.of(context).colorScheme.onBackground : Theme.of(context).colorScheme.onBackground, fontWeight: isActive ? FontWeight.bold : FontWeight.w600, ), diff --git a/untitled_app/lib/utilities/constants.dart b/untitled_app/lib/utilities/constants.dart index 8065287..315822e 100644 --- a/untitled_app/lib/utilities/constants.dart +++ b/untitled_app/lib/utilities/constants.dart @@ -113,9 +113,9 @@ const int maxPostLines = 12; const int maxPostChars = 300; const int maxCommentChars = 160; const int maxTitleChars = 100; -const int maxBioChars = 20; +const int maxBioChars = 100; const int maxBioLines = 3; -const int maxNameChars = 20; +const int maxNameChars = 24; const int maxUsernameChars = 24; const int searchPageDebounce = 1500; const int postsOnRefresh = 10; diff --git a/untitled_app/lib/views/edit_profile.dart b/untitled_app/lib/views/edit_profile.dart index fbe4178..f0d74e1 100644 --- a/untitled_app/lib/views/edit_profile.dart +++ b/untitled_app/lib/views/edit_profile.dart @@ -64,7 +64,6 @@ class EditProfile extends StatelessWidget { style: TextStyle( fontSize: 22, fontWeight: FontWeight.normal, - color: Theme.of(context).colorScheme.onBackground, ), ), @@ -78,7 +77,6 @@ class EditProfile extends StatelessWidget { style: TextStyle( fontSize: 22, fontWeight: FontWeight.normal, - color: Theme.of(context).colorScheme.onBackground, ), @@ -154,6 +152,7 @@ class EditProfile extends StatelessWidget { label: AppLocalizations.of(context)!.name, maxLength: c.maxNameChars, ), + SizedBox(height: height * 0.01), ProfileInputFeild( controller: Provider.of(context, listen: false) @@ -164,7 +163,9 @@ class EditProfile extends StatelessWidget { .checkChanges(), label: AppLocalizations.of(context)!.bioTitle, maxLength: c.maxBioChars, + inputType: TextInputType.multiline, ), + SizedBox(height: height * 0.01), ProfileInputFeild( onChanged: (s) => Provider.of( context, diff --git a/untitled_app/lib/views/feed_page.dart b/untitled_app/lib/views/feed_page.dart index 23f386a..ce66844 100644 --- a/untitled_app/lib/views/feed_page.dart +++ b/untitled_app/lib/views/feed_page.dart @@ -38,7 +38,7 @@ class FeedPage extends StatelessWidget { child: Column( children: [ const Padding( - padding: EdgeInsets.only(bottom: 6), child: CustomTabBar()), + padding: EdgeInsets.only(bottom: 15), child: CustomTabBar()), Divider( color: Theme.of(context).colorScheme.outline, height: c.dividerWidth, diff --git a/untitled_app/lib/views/login.dart b/untitled_app/lib/views/login.dart index bb37fe3..ceb0ae3 100644 --- a/untitled_app/lib/views/login.dart +++ b/untitled_app/lib/views/login.dart @@ -49,11 +49,17 @@ class LoginPage extends StatelessWidget { .previousPressed(), ), SizedBox( - height: height * .25, + height: height * .055, + ), + SizedBox( + height: height * .25, width: width * 0.7, - child: Image.asset((Theme.of(context).brightness == Brightness.light)?'images/eko_logo_light.png':'images/eko_logo.png'), + child: Image.asset( + (Theme.of(context).brightness == Brightness.light) + ? 'images/eko_logo_light.png' + : 'images/eko_logo.png'), ), - SizedBox(height: height * .1), + SizedBox(height: height * .05), CustomInputFeild( focus: Provider.of(context, listen: false) .emailFocus, @@ -63,7 +69,6 @@ class LoginPage extends StatelessWidget { .emailController, inputType: TextInputType.emailAddress, ), - SizedBox(height: height * 0.006), CustomInputFeild( textInputAction: TextInputAction.go, onEditingComplete: () => @@ -78,7 +83,7 @@ class LoginPage extends StatelessWidget { inputType: TextInputType.visiblePassword, password: true, ), - SizedBox(height: height * 0.05), + SizedBox(height: height * 0.015), SizedBox( width: width * 0.9, height: width * 0.15, diff --git a/untitled_app/lib/views/other_profile.dart b/untitled_app/lib/views/other_profile.dart index bc08885..50207b5 100644 --- a/untitled_app/lib/views/other_profile.dart +++ b/untitled_app/lib/views/other_profile.dart @@ -79,13 +79,13 @@ class OtherProfile extends StatelessWidget { Theme.of(context).colorScheme.onBackground, ), ) : null, - actions: [ - IconButton( - onPressed: () {}, - icon: const Icon(Icons - .more_horiz_outlined), //this could open a floating menu where you could block, or do something to adjust settings with this profile - ) - ], + // actions: [ + // IconButton( + // onPressed: () {}, + // icon: const Icon(Icons + // .more_horiz_outlined), //this could open a floating menu where you could block, or do something to adjust settings with this profile + // ) + // ], bottom: PreferredSize( preferredSize: const Size.fromHeight(3), child: Divider( diff --git a/untitled_app/lib/views/profile_page.dart b/untitled_app/lib/views/profile_page.dart index b7ee4f8..b3f4b8d 100644 --- a/untitled_app/lib/views/profile_page.dart +++ b/untitled_app/lib/views/profile_page.dart @@ -60,12 +60,16 @@ class _Header extends StatelessWidget { padding: const EdgeInsets.only(left: 10), child: Row( children: [ - Text( - "@${profileController.user.username}", - style: TextStyle( - color: Theme.of(context).colorScheme.onBackground, - fontWeight: FontWeight.bold, - fontSize: 22), + SizedBox( + width: width * 0.75, + child: Text( + "@${profileController.user.username}", + style: TextStyle( + color: Theme.of(context).colorScheme.onBackground, + fontWeight: FontWeight.bold, + fontSize: 22), + overflow: TextOverflow.ellipsis, + ), ), const Spacer(), InkWell( diff --git a/untitled_app/lib/views/sign_up.dart b/untitled_app/lib/views/sign_up.dart index 52d6baf..e8558b6 100644 --- a/untitled_app/lib/views/sign_up.dart +++ b/untitled_app/lib/views/sign_up.dart @@ -104,7 +104,7 @@ class GetInfo extends StatelessWidget { color: Theme.of(context).colorScheme.onBackground, ), SizedBox( - height: height * 0.06, + height: height * 0.05, ), CustomInputFeild( focus: Provider.of(context, listen: false) @@ -113,8 +113,9 @@ class GetInfo extends StatelessWidget { controller: Provider.of(context, listen: false) .nameController, inputType: TextInputType.text, + maxLen: c.maxNameChars, ), - SizedBox(height: height * c.loginPadding), + // SizedBox(height: height * c.loginPadding), CustomInputFeild( onChanged: (s) => Provider.of(context, listen: false) @@ -125,6 +126,7 @@ class GetInfo extends StatelessWidget { controller: Provider.of(context, listen: false) .usernameController, inputType: TextInputType.text, + maxLen: c.maxUsernameChars, ), if (Provider.of(context, listen: true) .usernameController @@ -206,7 +208,7 @@ class GetInfo extends StatelessWidget { inputType: TextInputType.emailAddress, ), SizedBox( - height: height * 0.1, + height: height * 0.05, ), // CustomInputFeild( // focus: Provider.of(context, listen: false) @@ -220,9 +222,9 @@ class GetInfo extends StatelessWidget { // textInputAction: TextInputAction.send, // inputType: TextInputType.datetime, // ), - SizedBox( - height: height * 0.1, - ), + // SizedBox( + // height: height * 0.1, + // ), SizedBox( width: width * 0.9, height: width * 0.15, @@ -280,11 +282,7 @@ class GetPassword extends StatelessWidget { endIndent: width * 0.07, color: Theme.of(context).colorScheme.onBackground, ), - SizedBox( - height: height * 0.05, - ), - - SizedBox(height: height * c.loginPadding), + SizedBox(height: height * 0.04), CustomInputFeild( onChanged: (s) => Provider.of(context, listen: false) @@ -318,6 +316,7 @@ class GetPassword extends StatelessWidget { inputType: TextInputType.visiblePassword, password: true, ), + SizedBox(height: height * 0.02), Padding( padding: EdgeInsets.symmetric( vertical: height * c.loginPadding, @@ -345,7 +344,7 @@ class GetPassword extends StatelessWidget { ), //const Spacer(), SizedBox( - height: height * 0.12, + height: height * 0.06, ), SizedBox( width: width * 0.9, diff --git a/untitled_app/lib/views/welcome.dart b/untitled_app/lib/views/welcome.dart index 3d057f7..da6c19d 100644 --- a/untitled_app/lib/views/welcome.dart +++ b/untitled_app/lib/views/welcome.dart @@ -19,10 +19,9 @@ class WelcomePage extends StatelessWidget { return Scaffold( floatingActionButton: getAppFabBuilder(), resizeToAvoidBottomInset: false, - backgroundColor: Colors.transparent, - body: Align( - alignment: Alignment.center, - child: Container( + backgroundColor: const Color.fromRGBO(0, 0, 0, 0), + body: Container( + height: height, width: width, decoration: const BoxDecoration( image: DecorationImage( image: AssetImage('images/fog1.gif'), fit: BoxFit.cover)), @@ -33,23 +32,23 @@ class WelcomePage extends StatelessWidget { SizedBox( height: height * .2, ), - SizedBox( - height: height * .1, - child: Align( - child: Text(AppLocalizations.of(context)!.welcomeTo, - style: TextStyle( - fontSize: 45, - color: Theme.of(context) - .colorScheme - .onBackground)), - )), + // SizedBox( + // height: height * .1, + // child: Align( + // child: Text(AppLocalizations.of(context)!.welcomeTo, + // style: TextStyle( + // fontSize: 45, + // color: Theme.of(context) + // .colorScheme + // .onBackground)), + // )), SizedBox( //height: height * .35, width: width *0.7, child: Image.asset('images/eko_logo.png'), ), SizedBox( - height: height * .25, + height: height * .28, ), OutlinedButton( onPressed: () { @@ -89,7 +88,6 @@ class WelcomePage extends StatelessWidget { ], ), ), - ), ); }, );