collapsing toolbar behaviour changed as like barq

dev_sikander
Sikander Saleem 2 weeks ago
parent 45b013a048
commit 0b9df1f22b

@ -61,62 +61,66 @@ class CollapsingListView extends StatelessWidget {
controller: _controller,
slivers: [
SliverAppBar(
automaticallyImplyLeading: isLeading,
pinned: true,
toolbarHeight: isLeading ? 40.h : kToolbarHeight,
leadingWidth: isLeading ? null : double.infinity,
systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
surfaceTintColor: Colors.transparent,
backgroundColor: AppColors.bgScaffoldColor,
bottom: isLeading
? ScrollAnimatedTitle(
title: title,
showBack: true,
controller: _controller,
search: search,
report: report,
logout: logout,
history: history,
instructions: instructions,
requests: requests,
sendEmail: sendEmail,
bottomChild: bottomChild,
trailing: trailing,
)
: null,
leading: isLeading
? Transform.flip(
flipX: appState.isArabic(),
child: IconButton(
icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.close_bottom_nav_trans : AppAssets.arrow_back_new, width: 24.h, height: 24.h),
padding: EdgeInsets.zero,
constraints: BoxConstraints(),
style: const ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
onPressed: () {
if (leadingCallback != null) {
leadingCallback!();
} else {
context.pop();
}
},
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,
automaticallyImplyLeading: isLeading,
pinned: true,
toolbarHeight: 40,
leadingWidth: isLeading ? null : double.infinity,
systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
surfaceTintColor: Colors.transparent,
backgroundColor: AppColors.bgScaffoldColor,
bottom:
// isLeading
// ?
ScrollAnimatedTitle(
title: title,
showBack: true,
controller: _controller,
search: search,
report: report,
logout: logout,
history: history,
instructions: instructions,
requests: requests,
sendEmail: sendEmail,
bottomChild: bottomChild,
trailing: trailing,
),
// : null,
leading: Visibility(
visible: isLeading,
child: Transform.flip(
flipX: appState.isArabic(),
child: IconButton(
icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.close_bottom_nav_trans : AppAssets.arrow_back_new, width: 24.h, height: 24.h),
padding: EdgeInsets.zero,
constraints: BoxConstraints(),
style: const ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
onPressed: () {
if (leadingCallback != null) {
leadingCallback!();
} else {
context.pop();
}
},
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,
// ),
),
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) => child,
@ -267,7 +271,7 @@ class _ScrollAnimatedTitleState extends State<ScrollAnimatedTitle> {
style: TextStyle(
fontSize: _fontSize,
fontWeight: FontWeight.bold,
letterSpacing: -1.0,
letterSpacing: -0.5,
),
).expanded,
...[

Loading…
Cancel
Save