Skip to content

Commit

Permalink
Make dashboard the back page, related to #42
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jan 8, 2024
1 parent b00a93f commit ed74f86
Show file tree
Hide file tree
Showing 8 changed files with 318 additions and 324 deletions.
147 changes: 75 additions & 72 deletions app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,91 +129,94 @@ class FlowApp extends StatelessWidget {
builder: (context, state, child) => FlowRootNavigation(child: child),
routes: [
GoRoute(
path: '/',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const DashboardPage()),
),
GoRoute(
path: '/calendar',
pageBuilder: _fadeTransitionBuilder(
(context, state) => CalendarPage(
filter: state.extra is CalendarFilter
? state.extra as CalendarFilter
: const CalendarFilter(),
),
),
),
GoRoute(
path: '/events',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const EventsPage(),
),
),
GoRoute(
path: '/groups',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const GroupsPage(),
),
),
GoRoute(
path: '/notes',
path: '/',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const NotesPage(),
),
(context, state) => const DashboardPage()),
routes: [
GoRoute(
path: ':source/:id',
name: 'subnote',
path: '/calendar',
pageBuilder: _fadeTransitionBuilder(
(context, state) => NotesPage(
parent: SourcedModel(
state.pathParameters['source']!,
Multihash.fromBase64Url(state.pathParameters['id']!),
),
(context, state) => CalendarPage(
filter: state.extra is CalendarFilter
? state.extra as CalendarFilter
: const CalendarFilter(),
),
),
),
GoRoute(
path: ':id',
name: 'subnote-local',
path: '/events',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const EventsPage(),
),
),
GoRoute(
path: '/groups',
pageBuilder: _fadeTransitionBuilder(
(context, state) => NotesPage(
parent: SourcedModel(
'',
Multihash.fromBase64Url(state.pathParameters['id']!),
(context, state) => const GroupsPage(),
),
),
GoRoute(
path: '/notes',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const NotesPage(),
),
routes: [
GoRoute(
path: ':source/:id',
name: 'subnote',
pageBuilder: _fadeTransitionBuilder(
(context, state) => NotesPage(
parent: SourcedModel(
state.pathParameters['source']!,
Multihash.fromBase64Url(
state.pathParameters['id']!),
),
),
),
),
GoRoute(
path: ':id',
name: 'subnote-local',
pageBuilder: _fadeTransitionBuilder(
(context, state) => NotesPage(
parent: SourcedModel(
'',
Multihash.fromBase64Url(
state.pathParameters['id']!),
),
),
),
)
]),
GoRoute(
path: '/places',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const PlacesPage(),
),
),
GoRoute(
path: '/users',
pageBuilder: _fadeTransitionBuilder(
(context, state) => UsersPage(
filter: state.extra is UserFilter
? state.extra as UserFilter
: const UserFilter(),
),
),
)
),
GoRoute(
path: '/sources',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const SourcesPage(),
),
),
GoRoute(
path: '/settings',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const SettingsPage(),
),
),
]),
GoRoute(
path: '/places',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const PlacesPage(),
),
),
GoRoute(
path: '/users',
pageBuilder: _fadeTransitionBuilder(
(context, state) => UsersPage(
filter: state.extra is UserFilter
? state.extra as UserFilter
: const UserFilter(),
),
),
),
GoRoute(
path: '/sources',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const SourcesPage(),
),
),
GoRoute(
path: '/settings',
pageBuilder: _fadeTransitionBuilder(
(context, state) => const SettingsPage(),
),
),
]),
],
);
Expand Down
24 changes: 12 additions & 12 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ packages:
dependency: "direct main"
description:
name: animations
sha256: "708e4b68c23228c264b038fe7003a2f5d01ce85fc64d8cae090e86b27fcea6c5"
sha256: d3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb
url: "https://pub.dev"
source: hosted
version: "2.0.10"
version: "2.0.11"
args:
dependency: "direct main"
description:
Expand Down Expand Up @@ -359,10 +359,10 @@ packages:
dependency: "direct main"
description:
name: flutter_markdown
sha256: "35108526a233cc0755664d445f8a6b4b61e6f8fe993b3658b80b4a26827fc196"
sha256: "30088ce826b5b9cfbf9e8bece34c716c8a59fa54461dcae1e4ac01a94639e762"
url: "https://pub.dev"
source: hosted
version: "0.6.18+2"
version: "0.6.18+3"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
Expand Down Expand Up @@ -473,10 +473,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: ca7e4a2249f96773152f1853fa25933ac752495cdd7fdf5dafb9691bd05830fd
sha256: "3b40e751eaaa855179b416974d59d29669e750d2e50fcdb2b37f1cb0ca8c803a"
url: "https://pub.dev"
source: hosted
version: "13.0.0"
version: "13.0.1"
graphs:
dependency: transitive
description:
Expand Down Expand Up @@ -952,26 +952,26 @@ packages:
dependency: "direct main"
description:
name: sqflite_common
sha256: bb4738f15b23352822f4c42a531677e5c6f522e079461fd240ead29d8d8a54a6
sha256: "76db4d324c8cbb16ca5b60ad2f3d25cec953107c93ae65aafa480d3e6fb69f14"
url: "https://pub.dev"
source: hosted
version: "2.5.0+2"
version: "2.5.2-1"
sqflite_common_ffi:
dependency: "direct main"
description:
name: sqflite_common_ffi
sha256: "873677ee78738a723d1ded4ccb23980581998d873d30ee9c331f6a81748663ff"
sha256: d0e3f0d04fdf668e57db8db1df758f56c4193cb429092c708e7bfcc6ab04b27e
url: "https://pub.dev"
source: hosted
version: "2.3.1"
version: "2.3.2"
sqflite_common_ffi_web:
dependency: "direct main"
description:
name: sqflite_common_ffi_web
sha256: "3d4b550a09fda9eb0a9ce3bd98c8080f57b2cc1f4b19e844290e82843e73b63d"
sha256: "0c2921454d2e4a227675fb952be9fef916cf65fb9e9b606b54cfdf080d3e9450"
url: "https://pub.dev"
source: hosted
version: "0.4.2+2"
version: "0.4.2+3"
sqlite3:
dependency: "direct main"
description:
Expand Down
10 changes: 5 additions & 5 deletions app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
intl: ^0.18.1
animations: ^2.0.10
animations: ^2.0.11
http: ^1.1.2
url_launcher: ^6.2.2
path_provider: ^2.1.1
Expand All @@ -44,7 +44,7 @@ dependencies:
url: https://github.com/CodeDoctorDE/phosphor-flutter
ref: f370dd2c25d3ea51ffb8f1c7c183bc9f33889c82
path: ^1.8.3
go_router: ^13.0.0
go_router: ^13.0.1
flex_color_scheme: ^7.3.1
flutter_bloc: ^8.1.3
freezed_annotation: ^2.4.1
Expand All @@ -58,8 +58,8 @@ dependencies:
# Database
sqflite_common: ^2.5.0+2
sqflite: ^2.3.0
sqflite_common_ffi: ^2.3.1
sqflite_common_ffi_web: ^0.4.2+2
sqflite_common_ffi: ^2.3.2
sqflite_common_ffi_web: ^0.4.2+3
sqlite3_flutter_libs: ^0.5.18
sqlite3: ^2.3.0
dynamic_color: ^1.6.9
Expand All @@ -69,7 +69,7 @@ dependencies:
connectivity_plus: ^5.0.2
rxdart: ^0.27.7
flutter_secure_storage: ^9.0.0
flutter_markdown: ^0.6.18+2
flutter_markdown: ^0.6.18+3
markdown: ^7.1.1
args: ^2.4.2
lib5: ^0.1.0
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"last 1 safari version"
]
},
"packageManager": "pnpm@8.13.1",
"packageManager": "pnpm@8.14.0",
"devDependencies": {
"markdownlint-cli2": "^0.11.0",
"typescript": "^5.3.3"
Expand Down
Loading

0 comments on commit ed74f86

Please sign in to comment.