Skip to content

Commit

Permalink
refactor: use constants
Browse files Browse the repository at this point in the history
  • Loading branch information
AladdineDev committed Dec 7, 2023
1 parent 1e40e67 commit ef1b929
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/src/features/main/presentation/widgets/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MyAppBar extends ConsumerWidget {
child: GestureDetector(
onTap: () => _scrollToTop(context, ref),
child: SizedBox(
height: 56,
height: kToolbarHeight,
child: SelectionContainer.disabled(
child: AnimatedFadeSlide(
offset: const Offset(-64, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AppBarButton extends ConsumerWidget {
shape: const Border(),
onPressed: onPressed,
child: SizedBox(
height: 56,
height: kToolbarHeight,
child: Center(
child: Text(
title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class _BottomBannerState extends ConsumerState<BottomBanner> {
final scrollController = ref.watch(scrollControllerProvider);
final scrollPosition = scrollController.position;
if (scrollPosition.pixels >= scrollPosition.maxScrollExtent - 64) {
setState(() => _height = 56);
setState(() => _height = kBottomNavigationBarHeight);
} else {
setState(() => _height = 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class _AppBarDelegate extends SliverPersistentHeaderDelegate {
}

@override
double get minExtent => 56;
double get minExtent => kToolbarHeight;

@override
double get maxExtent => 56;
double get maxExtent => kToolbarHeight;

@override
bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate) {
Expand Down

0 comments on commit ef1b929

Please sign in to comment.