cleaner add button added.

main_production
Sikander Saleem 1 week ago
parent 9f3a5b234f
commit a109734171

@ -32,6 +32,7 @@ class _RequestCategoryFragmentHouseKeeperState extends State<RequestCategoryFrag
late Animation<double> _headerFadeAnimation; late Animation<double> _headerFadeAnimation;
late Animation<Offset> _headerSlideAnimation; late Animation<Offset> _headerSlideAnimation;
final ScrollController _scrollController = ScrollController(); final ScrollController _scrollController = ScrollController();
// int _selectedIndex = 0; // Default first tab // int _selectedIndex = 0; // Default first tab
@override @override
@ -75,7 +76,6 @@ class _RequestCategoryFragmentHouseKeeperState extends State<RequestCategoryFrag
super.dispose(); super.dispose();
} }
void _loadCategoryData(int index) { void _loadCategoryData(int index) {
final dashboardProvider = Provider.of<DashBoardProvider>(context, listen: false); final dashboardProvider = Provider.of<DashBoardProvider>(context, listen: false);
List<CategoryTabs> tabs = CategoryTabs.getTabs(userType: UsersTypes.houseKeeper, context: context); List<CategoryTabs> tabs = CategoryTabs.getTabs(userType: UsersTypes.houseKeeper, context: context);
@ -122,14 +122,17 @@ class _RequestCategoryFragmentHouseKeeperState extends State<RequestCategoryFrag
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
'All Tasks'.addTranslation.heading4(context), 'All Tasks'.addTranslation.heading4(context),
Transform.flip( 'add_icon'.toSvgAsset(width: 24, height: 24).onPress(() {
flipY: isAscending, Navigator.of(context).pushNamed('/cleaner_search');
child: 'dashboard/sort_descending'.toSvgAsset( }),
width: 24, // Transform.flip(
height: 24, // flipY: isAscending,
color: AppColor.headingTextColor(context), // child: 'dashboard/sort_descending'.toSvgAsset(
).onPress(()=>_toggleSort(dashboardProvider)), // width: 24,
) // height: 24,
// color: AppColor.headingTextColor(context),
// ).onPress(()=>_toggleSort(dashboardProvider)),
// )
], ],
).paddingOnly(start: 16, end: 16), ).paddingOnly(start: 16, end: 16),
), ),
@ -237,4 +240,3 @@ class _RequestCategoryFragmentHouseKeeperState extends State<RequestCategoryFrag
); );
} }
} }

@ -183,7 +183,7 @@ class _CleanerSearchFormViewState extends State<CleanerSearchFormView> {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8, spacing: 12,
children: [ children: [
// Task Type Dropdown // Task Type Dropdown
SingleItemDropDownMenu<TaskType, NullableLoadingProvider>( SingleItemDropDownMenu<TaskType, NullableLoadingProvider>(
@ -204,18 +204,17 @@ class _CleanerSearchFormViewState extends State<CleanerSearchFormView> {
), ),
// Scan QR Code Button // Scan QR Code Button
8.height,
GestureDetector( GestureDetector(
onTap: selectedTaskType != null ? _onScanQRCode : null, onTap: selectedTaskType != null ? _onScanQRCode : null,
child: Container( child: Container(
height: 50, height: 50,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: selectedTaskType != null ? Colors.white : Colors.grey[300], color: selectedTaskType != null ? AppColor.background(context) : Colors.grey[300],
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(16),
border: Border.all( border: Border.all(
color: selectedTaskType != null ? AppColor.blueStatus(context) : Colors.grey, color: selectedTaskType != null ? AppColor.borderColor(context) : Colors.grey,
width: 2, width: 1,
), ),
), ),
padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight), padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight),
@ -225,16 +224,16 @@ class _CleanerSearchFormViewState extends State<CleanerSearchFormView> {
"scan_asset".toSvgAsset( "scan_asset".toSvgAsset(
height: 22, height: 22,
fit: BoxFit.fitHeight, fit: BoxFit.fitHeight,
color: selectedTaskType != null ? (context.isDark ? AppColor.neutral20 : AppColor.neutral120) : Colors.grey, color: selectedTaskType != null ? AppColor.icon2Color(context) : Colors.grey,
), ),
8.width, 8.width,
//we can change the implementation when merge with uiux branch //we can change the implementation when merge with uiux branch
_scannedLocationData == null _scannedLocationData == null
? "Scan QR Code".bodyText(context).custom( ? "Scan QR Code".bodyText(context).custom(
color: selectedTaskType != null ? (context.isDark ? AppColor.neutral20 : AppColor.black20) : Colors.grey, color: selectedTaskType != null ? AppColor.icon2Color(context) : Colors.grey,
) )
: 'Re Scan QR Code'.bodyText(context).custom( : 'Re Scan QR Code'.bodyText(context).custom(
color: selectedTaskType != null ? (context.isDark ? AppColor.neutral20 : AppColor.black20) : Colors.grey, color: selectedTaskType != null ? AppColor.icon2Color(context) : Colors.grey,
), ),
], ],
), ),

Loading…
Cancel
Save