Skip to content

Commit

Permalink
Adapt to YaruMasterDetailPage builders
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnurmi committed Oct 7, 2022
1 parent 9bf584b commit 87fa767
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class _UbuntuSettingsAppState extends State<UbuntuSettingsApp> {

@override
Widget build(BuildContext context) {
final pages = _filteredItems.isNotEmpty ? _filteredItems : pageItems;
return YaruTheme(
builder: (context, yaru, child) {
return MaterialApp(
Expand All @@ -54,8 +55,12 @@ class _UbuntuSettingsAppState extends State<UbuntuSettingsApp> {
Navigator.defaultRouteName: (context) {
return YaruMasterDetailPage(
leftPaneWidth: 280,
pageItems:
_filteredItems.isNotEmpty ? _filteredItems : pageItems,
length: pages.length,
iconBuilder: (context, index, selected) =>
pages[index].iconBuilder(context, selected),
titleBuilder: (context, index, selected) =>
pages[index].titleBuilder(context),
pageBuilder: (context, index) => pages[index].builder(context),
previousIconData: YaruIcons.go_previous,
appBar: SearchAppBar(
searchHint: context.l10n.searchHint,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ packages:
description:
path: "."
ref: HEAD
resolved-ref: c2861bfca1ff75a5f186b6d4d5495c90ecf2389c
resolved-ref: "4da24dc0ee2f02668c2c06d938bee2e3078ef7c5"
url: "https://github.com/ubuntu/yaru_widgets.dart.git"
source: git
version: "1.1.5"
Expand Down

0 comments on commit 87fa767

Please sign in to comment.