ui complete
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../common/widgets/bottom_navigation.dart';
|
||||
import '../../core/constants/assets.dart';
|
||||
import '../../core/constants/colors.dart';
|
||||
import '../../core/utils/size_config.dart';
|
||||
import 'models/tender_model.dart';
|
||||
@@ -42,7 +44,7 @@ class _TendersScreenState extends State<TendersScreen>
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.0.w(),
|
||||
// horizontal: 24.0.w(),
|
||||
vertical: 24.0.h(),
|
||||
),
|
||||
child: Column(
|
||||
@@ -52,27 +54,43 @@ class _TendersScreenState extends State<TendersScreen>
|
||||
|
||||
MainTabBar(controller: controller),
|
||||
SizedBox(height: 24.0.h()),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 762.0.h(),
|
||||
child: PageView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: sampleTenders.length,
|
||||
itemBuilder: (context, index) {
|
||||
final tender = sampleTenders[index];
|
||||
|
||||
return TenderCard(
|
||||
date: tender.date,
|
||||
deadline: tender.deadline,
|
||||
title: tender.title,
|
||||
description: tender.description,
|
||||
tenderId: tender.tenderId,
|
||||
location: tender.location,
|
||||
country: tender.country,
|
||||
matchPercentage: tender.matchPercentage,
|
||||
);
|
||||
},
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 762.0.h(),
|
||||
child: PageView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: sampleTenders.length,
|
||||
itemBuilder: (context, index) {
|
||||
final tender = sampleTenders[index];
|
||||
return TenderCard(
|
||||
date: tender.date,
|
||||
deadline: tender.deadline,
|
||||
title: tender.title,
|
||||
description: tender.description,
|
||||
tenderId: tender.tenderId,
|
||||
location: tender.location,
|
||||
country: tender.country,
|
||||
matchPercentage: tender.matchPercentage,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 237.0.h(),
|
||||
bottom: 366.0.h(),
|
||||
left: 9.0.w(),
|
||||
right: 9.0.w(),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SvgPicture.asset(AssetsManager.arrowCircleLeft),
|
||||
SvgPicture.asset(AssetsManager.arrowCircleRight),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -19,6 +19,7 @@ class _MainTabBarState extends State<MainTabBar> {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: 51.0.h(),
|
||||
margin: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.0.w(), vertical: 8.0.h()),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.grey10,
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
|
||||
class TenderActionButtons extends StatelessWidget {
|
||||
final VoidCallback? onLike;
|
||||
final VoidCallback? onDislike;
|
||||
final VoidCallback? onClose;
|
||||
final bool isLiked;
|
||||
final bool isDisliked;
|
||||
|
||||
const TenderActionButtons({
|
||||
super.key,
|
||||
this.onLike,
|
||||
this.onDislike,
|
||||
this.onClose,
|
||||
this.isLiked = false,
|
||||
this.isDisliked = false,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(width: 16.0.w()),
|
||||
|
||||
// Dislike button
|
||||
GestureDetector(
|
||||
onTap: onDislike,
|
||||
child: SvgPicture.asset(AssetsManager.dislike),
|
||||
),
|
||||
|
||||
SizedBox(width: 16.0.w()),
|
||||
|
||||
// Close button
|
||||
GestureDetector(
|
||||
onTap: onClose,
|
||||
child: SvgPicture.asset(AssetsManager.closeCircle),
|
||||
),
|
||||
SizedBox(width: 16.0.w()),
|
||||
// Like button
|
||||
GestureDetector(
|
||||
onTap: onLike,
|
||||
child: SvgPicture.asset(AssetsManager.like),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -10,24 +10,27 @@ class TenderAppBar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppStrings.tendersTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.grey70,
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppStrings.tendersTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.grey70,
|
||||
),
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
AssetsManager.tenderLogo,
|
||||
width: 59.0.w(),
|
||||
height: 28.0.h(),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
],
|
||||
Image.asset(
|
||||
AssetsManager.tenderLogo,
|
||||
width: 59.0.w(),
|
||||
height: 28.0.h(),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/constants/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
import 'tender_action_buttons.dart';
|
||||
|
||||
class TenderCard extends StatelessWidget {
|
||||
final String date;
|
||||
@@ -220,7 +221,7 @@ class TenderCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
|
||||
// Apply button
|
||||
// See More button
|
||||
GestureDetector(
|
||||
onTap: onApply,
|
||||
child: Container(
|
||||
@@ -261,51 +262,3 @@ class TenderCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Action buttons row widget
|
||||
class TenderActionButtons extends StatelessWidget {
|
||||
final VoidCallback? onLike;
|
||||
final VoidCallback? onDislike;
|
||||
final VoidCallback? onClose;
|
||||
final bool isLiked;
|
||||
final bool isDisliked;
|
||||
|
||||
const TenderActionButtons({
|
||||
super.key,
|
||||
this.onLike,
|
||||
this.onDislike,
|
||||
this.onClose,
|
||||
this.isLiked = false,
|
||||
this.isDisliked = false,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(width: 16.0.w()),
|
||||
|
||||
// Dislike button
|
||||
GestureDetector(
|
||||
onTap: onDislike,
|
||||
child: SvgPicture.asset(AssetsManager.dislike),
|
||||
),
|
||||
|
||||
SizedBox(width: 16.0.w()),
|
||||
|
||||
// Close button
|
||||
GestureDetector(
|
||||
onTap: onClose,
|
||||
child: SvgPicture.asset(AssetsManager.closeCircle),
|
||||
),
|
||||
SizedBox(width: 16.0.w()),
|
||||
// Like button
|
||||
GestureDetector(
|
||||
onTap: onLike,
|
||||
child: SvgPicture.asset(AssetsManager.like),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user