|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
@ -69,7 +68,7 @@ class CollapsingListView extends StatelessWidget {
|
|
|
|
automaticallyImplyLeading: isLeading,
|
|
|
|
automaticallyImplyLeading: isLeading,
|
|
|
|
pinned: true,
|
|
|
|
pinned: true,
|
|
|
|
toolbarHeight: 40.h,
|
|
|
|
toolbarHeight: 40.h,
|
|
|
|
leadingWidth: isLeading ? null : double.infinity,
|
|
|
|
leadingWidth: isLeading ? 40.w + 32.w : double.infinity,
|
|
|
|
systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
|
|
|
|
systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
|
|
|
|
surfaceTintColor: Colors.transparent,
|
|
|
|
surfaceTintColor: Colors.transparent,
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
@ -93,23 +92,22 @@ class CollapsingListView extends StatelessWidget {
|
|
|
|
// : null,
|
|
|
|
// : null,
|
|
|
|
leading: Visibility(
|
|
|
|
leading: Visibility(
|
|
|
|
visible: isLeading,
|
|
|
|
visible: isLeading,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
height: 32.h,
|
|
|
|
|
|
|
|
width: 32.w,
|
|
|
|
|
|
|
|
alignment: appState.isArabic() ? Alignment.centerRight : Alignment.centerLeft,
|
|
|
|
|
|
|
|
margin: EdgeInsets.fromLTRB(24.w, 0, 24.w, 0),
|
|
|
|
child: Transform.flip(
|
|
|
|
child: Transform.flip(
|
|
|
|
flipX: appState.isArabic(),
|
|
|
|
flipX: appState.isArabic(),
|
|
|
|
child: IconButton(
|
|
|
|
child: 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),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
).onPress(() {
|
|
|
|
constraints: BoxConstraints(),
|
|
|
|
|
|
|
|
style: const ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
|
|
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
if (leadingCallback != null) {
|
|
|
|
if (leadingCallback != null) {
|
|
|
|
leadingCallback!();
|
|
|
|
leadingCallback!();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
context.pop();
|
|
|
|
context.pop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
highlightColor: Colors.transparent,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
// : ScrollAnimatedTitle(
|
|
|
|
// : ScrollAnimatedTitle(
|
|
|
|
// title: title,
|
|
|
|
// title: title,
|
|
|
|
@ -218,7 +216,7 @@ class ScrollAnimatedTitle extends StatefulWidget implements PreferredSizeWidget
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Size get preferredSize => const Size.fromHeight(50.0);
|
|
|
|
Size get preferredSize => const Size.fromHeight(56.0);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
State<ScrollAnimatedTitle> createState() => _ScrollAnimatedTitleState();
|
|
|
|
State<ScrollAnimatedTitle> createState() => _ScrollAnimatedTitleState();
|
|
|
|
@ -265,7 +263,7 @@ class _ScrollAnimatedTitleState extends State<ScrollAnimatedTitle> {
|
|
|
|
final isRtl = Directionality.of(context) == TextDirection.RTL;
|
|
|
|
final isRtl = Directionality.of(context) == TextDirection.RTL;
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
// height: (widget.preferredSize.height - _fontSize / 2).h,
|
|
|
|
// height: (widget.preferredSize.height - _fontSize / 2).h,
|
|
|
|
height: 60.h,
|
|
|
|
height: 56.h,
|
|
|
|
alignment: isRtl ? (widget.showBack ? Alignment.topRight : Alignment.centerRight) : (widget.showBack ? Alignment.topLeft : Alignment.centerLeft),
|
|
|
|
alignment: isRtl ? (widget.showBack ? Alignment.topRight : Alignment.centerRight) : (widget.showBack ? Alignment.topLeft : Alignment.centerLeft),
|
|
|
|
padding: EdgeInsets.fromLTRB(24.w, 0, 24.w, 0),
|
|
|
|
padding: EdgeInsets.fromLTRB(24.w, 0, 24.w, 0),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
|