collapsing toolbar behaviour changed as like barq

pull/174/head
Sikander Saleem 2 months ago
parent 45b013a048
commit 0b9df1f22b

@ -63,13 +63,15 @@ class CollapsingListView extends StatelessWidget {
SliverAppBar( SliverAppBar(
automaticallyImplyLeading: isLeading, automaticallyImplyLeading: isLeading,
pinned: true, pinned: true,
toolbarHeight: isLeading ? 40.h : kToolbarHeight, toolbarHeight: 40,
leadingWidth: isLeading ? null : double.infinity, leadingWidth: isLeading ? null : double.infinity,
systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light), systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
surfaceTintColor: Colors.transparent, surfaceTintColor: Colors.transparent,
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
bottom: isLeading bottom:
? ScrollAnimatedTitle( // isLeading
// ?
ScrollAnimatedTitle(
title: title, title: title,
showBack: true, showBack: true,
controller: _controller, controller: _controller,
@ -82,10 +84,11 @@ class CollapsingListView extends StatelessWidget {
sendEmail: sendEmail, sendEmail: sendEmail,
bottomChild: bottomChild, bottomChild: bottomChild,
trailing: trailing, trailing: trailing,
) ),
: null, // : null,
leading: isLeading leading: Visibility(
? Transform.flip( visible: isLeading,
child: Transform.flip(
flipX: appState.isArabic(), flipX: appState.isArabic(),
child: IconButton( child: IconButton(
icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.close_bottom_nav_trans : AppAssets.arrow_back_new, width: 24.h, height: 24.h), icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.close_bottom_nav_trans : AppAssets.arrow_back_new, width: 24.h, height: 24.h),
@ -101,21 +104,22 @@ class CollapsingListView extends StatelessWidget {
}, },
highlightColor: Colors.transparent, highlightColor: Colors.transparent,
), ),
)
: ScrollAnimatedTitle(
title: title,
showBack: false,
controller: _controller,
search: search,
report: report,
logout: logout,
history: history,
instructions: instructions,
requests: requests,
sendEmail: sendEmail,
bottomChild: bottomChild,
trailing: trailing,
), ),
)
// : ScrollAnimatedTitle(
// title: title,
// showBack: false,
// controller: _controller,
// search: search,
// report: report,
// logout: logout,
// history: history,
// instructions: instructions,
// requests: requests,
// sendEmail: sendEmail,
// bottomChild: bottomChild,
// trailing: trailing,
// ),
), ),
SliverList( SliverList(
delegate: SliverChildBuilderDelegate( delegate: SliverChildBuilderDelegate(
@ -267,7 +271,7 @@ class _ScrollAnimatedTitleState extends State<ScrollAnimatedTitle> {
style: TextStyle( style: TextStyle(
fontSize: _fontSize, fontSize: _fontSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -1.0, letterSpacing: -0.5,
), ),
).expanded, ).expanded,
...[ ...[

Loading…
Cancel
Save