Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Aug 29, 2024
1 parent 7fcbf93 commit 1c4b1e0
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ class CounterPage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
return Scaffold(
appBar: AppBar(
title: const Text('Counter Page'),
),
body: const Center(
child: Text('Counter Page'),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,19 @@ class DetailOverviewPage extends StatelessWidget {
appBar: AppBar(
title: const Text('Detail Overview Page'),
),
body: ListView(
children: <Widget>[
ListTile(
title: const Text('Detail Page 1'),
onTap: () => <void>{
context.goNamed(DetailPage.name,
queryParameters: <String, String>{'itemName': '1'}),
body: ListView.builder(
itemCount: 10,
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text('Item $index'),
onTap: () {
context.goNamed(
DetailPage.name,
queryParameters: <String, String>{'itemName': '$index'},
);
},
),
ListTile(
title: const Text('Detail Page 2'),
onTap: () => <void>{
context.goNamed(DetailPage.name,
queryParameters: <String, String>{'itemName': '2'}),
},
),
],
);
},
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ class ForgotPasswordPage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
return Scaffold(
appBar: AppBar(
title: const Text('Forgot Password'),
),
body: const Center(
child: Text('ForgotPassword Page'),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ class LanguagePage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
return Scaffold(
appBar: AppBar(
title: const Text('Language'),
),
body: const Center(
child: Text('Language Page'),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ class MorePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('More Page'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text('More Page'),
ElevatedButton(
onPressed: () => context.goNamed(ProfilePage.name),
child: const Text('Profile'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';

import '../app_router.dart';

class ProfilePage extends StatelessWidget {
const ProfilePage({super.key});

Expand All @@ -11,9 +13,22 @@ class ProfilePage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Scaffold(
return Scaffold(
appBar: AppBar(
title: const Text('Profile Page'),
),
body: Center(
child: Text('Profile Page'),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ElevatedButton(
onPressed: () => <void>{
AppRouter.authenticatedNotifier.value = false,
},
child: const Text('Sign Out'),
),
],
),
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ class SettingsPage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
return Scaffold(
appBar: AppBar(
title: const Text('Settings Page'),
),
body: const Center(
child: Text('Settings Page'),
),
);
Expand Down

0 comments on commit 1c4b1e0

Please sign in to comment.