Skip to content

Commit

Permalink
fix: update jaspr_router dependency now bugfix is jaspr/pull/110 merged
Browse files Browse the repository at this point in the history
  • Loading branch information
slightfoot committed Oct 7, 2023
1 parent b8e36fd commit 7b66fe3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 294 deletions.
14 changes: 2 additions & 12 deletions lib/layout/page_frame.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,7 @@ class _PageFrameState extends State<PageFrame> {
}

void _updateTitle() {
// NOTE: this should work, bug in Jaspr see https://github.com/schultek/jaspr/pull/110
// _title = Router.of(context).matchList.title;
// Instead we are fixing it inline here as a workaround
final matches = Router.of(context).matchList.matches;
_title = matches.reversed.fold(
null,
(prev, match) =>
prev ?? (match.route is Route ? (match.route as Route).title : null),
);
_title = Router.of(context).matchList.title;
if (_title case String title) {
document.title = '$title :: Flutteristas';
}
Expand Down Expand Up @@ -78,9 +70,7 @@ class _PageFrameState extends State<PageFrame> {
]),
footer([
followUsSection(),
p([
text('Copyright © 2023 Flutteristas.org. All rights reserved. ')
]),
p([text('Copyright © 2023 Flutteristas.org. All rights reserved. ')]),
]),
],
);
Expand Down
Loading

0 comments on commit 7b66fe3

Please sign in to comment.