diff --git a/.vscode/launch.json b/.vscode/launch.json index 26329aad..53a71b29 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "type": "dart", "program": "packages/app/lib/main.dart", "flutterMode": "debug", - "toolArgs": ["--dart-define=FLUTTER_WEB_DEBUG_SHOW_SEMANTICS=true"] + "toolArgs": ["--dart-define=FLUTTER_WEB_DEBUG_SHOW_SEMANTICS=true", ] } ] } diff --git a/packages/app/lib/src/app/app.dart b/packages/app/lib/src/app/app.dart index 271c43eb..c1fb58f8 100644 --- a/packages/app/lib/src/app/app.dart +++ b/packages/app/lib/src/app/app.dart @@ -39,6 +39,8 @@ class _AppState extends ConsumerState with RestorationMixin { Widget build(BuildContext context) { return _EagerInitialization( child: MaterialApp.router( + debugShowCheckedModeBanner: false, + // Providing a `restorationScopeId` allows the Navigator built by the // `MaterialApp` to restore the navigation stack when a user leaves and // returns to the app after it has been killed while running in the diff --git a/packages/app/lib/src/app/wrapper_page.dart b/packages/app/lib/src/app/wrapper_page.dart index 3eed9094..d9546afd 100644 --- a/packages/app/lib/src/app/wrapper_page.dart +++ b/packages/app/lib/src/app/wrapper_page.dart @@ -178,41 +178,48 @@ class _Dialog extends HookConsumerWidget { ); return Dialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 64, vertical: 32), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), - child: Scaffold( - appBar: AppBar( - title: const Text('Create a New Post'), - ), - body: Form( - key: formKey, - child: Padding( - padding: const EdgeInsets.all(16), - child: Column( - children: [ - TextFormField( - initialValue: title.value, - onSaved: (value) { - if (value == null) return; - - title.value = value; - }, - decoration: const InputDecoration(label: Text('Title')), - ), - TextFormField( - initialValue: description.value, - onSaved: (value) { - if (value == null) return; - - description.value = value; - }, - decoration: const InputDecoration(label: Text('Description')), - ), - ElevatedButton( - onPressed: handleSubmit, - child: const Text('Create Post'), - ), - ], + insetPadding: EdgeInsets.symmetric( + horizontal: MediaQuery.sizeOf(context).width / 8, + vertical: MediaQuery.sizeOf(context).height / 8, + ), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), + child: Padding( + padding: const EdgeInsets.all(40), + child: Scaffold( + appBar: AppBar( + title: const Text('Create a New Post'), + ), + body: Form( + key: formKey, + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + children: [ + TextFormField( + initialValue: title.value, + onSaved: (value) { + if (value == null) return; + + title.value = value; + }, + decoration: const InputDecoration(label: Text('Title')), + ), + TextFormField( + initialValue: description.value, + onSaved: (value) { + if (value == null) return; + + description.value = value; + }, + decoration: + const InputDecoration(label: Text('Description')), + ), + ElevatedButton( + onPressed: handleSubmit, + child: const Text('Create Post'), + ), + ], + ), ), ), ), diff --git a/packages/app/lib/src/features/auth/presentation/auth/signup_page.dart b/packages/app/lib/src/features/auth/presentation/auth/signup_page.dart index 77c1ccca..14f816cb 100644 --- a/packages/app/lib/src/features/auth/presentation/auth/signup_page.dart +++ b/packages/app/lib/src/features/auth/presentation/auth/signup_page.dart @@ -109,7 +109,7 @@ class SignupPage extends HookConsumerWidget { keyboardType: TextInputType.name, decoration: const InputDecoration( border: OutlineInputBorder(), - labelText: 'Name', + labelText: 'First and Last Name', ), ), const SizedBox(height: 16), diff --git a/packages/app/lib/src/features/home/application/avatar_service.dart b/packages/app/lib/src/features/home/application/avatar_service.dart index ba8c05b5..688c9c6e 100644 --- a/packages/app/lib/src/features/home/application/avatar_service.dart +++ b/packages/app/lib/src/features/home/application/avatar_service.dart @@ -8,8 +8,8 @@ part 'avatar_service.g.dart'; /// Get the user's avatar. @riverpod -FutureOr avatarService(AvatarServiceRef ref, [String? name]) { +FutureOr avatarService(AvatarServiceRef ref, [String? username]) { final avatarRepo = ref.watch(avatarProvider); - return avatarRepo.getAvatar(name: name); + return avatarRepo.getAvatar(name: username); } diff --git a/packages/app/lib/src/features/home/presentation/home/post.dart b/packages/app/lib/src/features/home/presentation/home/post.dart index 244eca13..90a01296 100644 --- a/packages/app/lib/src/features/home/presentation/home/post.dart +++ b/packages/app/lib/src/features/home/presentation/home/post.dart @@ -22,7 +22,7 @@ class Post extends StatelessWidget { return Card( margin: const EdgeInsets.all(4), child: Container( - constraints: const BoxConstraints(minHeight: 225), + constraints: const BoxConstraints(minHeight: 220, maxHeight: 300), padding: const EdgeInsets.all(16), child: Column( crossAxisAlignment: CrossAxisAlignment.start,