Skip to content

Commit

Permalink
awesome ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MattsAttack authored and lishaduck committed Oct 21, 2024
1 parent 4b21269 commit dd6681d
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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", ]
}
]
}
2 changes: 2 additions & 0 deletions packages/app/lib/src/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class _AppState extends ConsumerState<App> 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
Expand Down
77 changes: 42 additions & 35 deletions packages/app/lib/src/app/wrapper_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,41 +171,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,

Check warning on line 176 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L174-L176

Added lines #L174 - L176 were not covered by tests
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
child: Padding(

Check warning on line 179 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L178-L179

Added lines #L178 - L179 were not covered by tests
padding: const EdgeInsets.all(40),
child: Scaffold(
appBar: AppBar(

Check warning on line 182 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L181-L182

Added lines #L181 - L182 were not covered by tests
title: const Text('Create a New Post'),
),
body: Form(

Check warning on line 185 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L185

Added line #L185 was not covered by tests
key: formKey,
child: Padding(

Check warning on line 187 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L187

Added line #L187 was not covered by tests
padding: const EdgeInsets.all(16),
child: Column(
children: [
TextFormField(
initialValue: title.value,
onSaved: (value) {

Check warning on line 193 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L189-L193

Added lines #L189 - L193 were not covered by tests
if (value == null) return;

title.value = value;

Check warning on line 196 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L196

Added line #L196 was not covered by tests
},
decoration: const InputDecoration(label: Text('Title')),
),
TextFormField(
initialValue: description.value,
onSaved: (value) {

Check warning on line 202 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L200-L202

Added lines #L200 - L202 were not covered by tests
if (value == null) return;

description.value = value;

Check warning on line 205 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L205

Added line #L205 was not covered by tests
},
decoration:
const InputDecoration(label: Text('Description')),
),
ElevatedButton(

Check warning on line 210 in packages/app/lib/src/app/wrapper_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/app/wrapper_page.dart#L210

Added line #L210 was not covered by tests
onPressed: handleSubmit,
child: const Text('Create Post'),
),
],
),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ part 'avatar_service.g.dart';

/// Get the user's avatar.
@riverpod
FutureOr<Uint8List> avatarService(AvatarServiceRef ref, [String? name]) {
FutureOr<Uint8List> avatarService(AvatarServiceRef ref, [String? username]) {
final avatarRepo = ref.watch(avatarProvider);

return avatarRepo.getAvatar(name: name);
return avatarRepo.getAvatar(name: username);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dd6681d

Please sign in to comment.