Skip to content

Commit

Permalink
awesome ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MattsAttack committed Oct 21, 2024
1 parent bdeed8d commit 51549c3
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 @@ -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,

Check warning on line 183 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-L183

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

Check warning on line 186 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-L186

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

Check warning on line 189 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#L188-L189

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

Check warning on line 192 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#L192

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

Check warning on line 194 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#L194

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

Check warning on line 200 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-L200

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

title.value = value;

Check warning on line 203 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#L203

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

Check warning on line 209 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#L207-L209

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

description.value = value;

Check warning on line 212 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#L212

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

Check warning on line 217 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#L217

Added line #L217 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 51549c3

Please sign in to comment.