Skip to content

Commit

Permalink
Adjust appbar on wishlist page for desktop devices
Browse files Browse the repository at this point in the history
  • Loading branch information
shockbytes committed Nov 28, 2023
1 parent 5b21662 commit 63b3b73
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions lib/src/ui/wishlist/wishlist_page.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
import 'package:dantex/src/data/book/entity/book_state.dart';
import 'package:dantex/src/ui/core/themed_app_bar.dart';
import 'package:dantex/src/ui/main/book_state_page.dart';
import 'package:dantex/src/util/layout_utils.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';

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

@override
Widget build(BuildContext context) {
return const Scaffold(
// TODO Show app bar only on mobile devices
appBar: ThemedAppBar(
title: Text('Wishlist'),
),
body: Center(
child: BookStatePage(BookState.wishlist),
),
return LayoutBuilder(
builder: (context, constraints) {
return Scaffold(
appBar: ThemedAppBar(
title: isDesktop(constraints)
? null
: Text('navigation.wishlist'.tr())
),
body: const Center(
child: BookStatePage(BookState.wishlist),
),
);
},
);
}
}

0 comments on commit 63b3b73

Please sign in to comment.