184 lines
4.5 KiB
Dart
184 lines
4.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../core/constants/strings.dart';
|
|
import '../../core/constants/colors.dart';
|
|
import '../../core/utils/size_config.dart';
|
|
import 'widgets.dart';
|
|
|
|
class HomeScreen extends StatelessWidget {
|
|
const HomeScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SafeArea(
|
|
child: Scaffold(
|
|
backgroundColor: Colors.white,
|
|
body: _body(context),
|
|
appBar: _appbar(),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _body(BuildContext context) {
|
|
return ListView(
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
24.0.w(),
|
|
26.0.h(),
|
|
24.0.w(),
|
|
24.0.h(),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
// _appbar(),
|
|
// SizedBox(height: 32.0.h()),
|
|
_progressBarsRow(),
|
|
SizedBox(height: 32.0.h()),
|
|
_firstStatisticsRow(),
|
|
SizedBox(height: 8.0.h()),
|
|
_secondStatisticsRow(),
|
|
SizedBox(height: 32.0.h()),
|
|
_yourTenderText(),
|
|
SizedBox(height: 28.0.h()),
|
|
_bottomListView(),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
PreferredSize _appbar() {
|
|
return PreferredSize(
|
|
preferredSize: Size.fromHeight(56.0.h()),
|
|
child: Container(
|
|
color: AppColors.backgroundColor,
|
|
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
|
height: 56.0.h(),
|
|
width: double.infinity,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
AppStrings.home,
|
|
style: TextStyle(
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.bold,
|
|
color: Color(0xFF222222),
|
|
),
|
|
),
|
|
Image.asset(
|
|
'assets/icons/tenderLogo.png',
|
|
width: 59.0.w(),
|
|
height: 28.0.h(),
|
|
fit: BoxFit.cover,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _progressBarsRow() {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
ProgressBarColumn(
|
|
text: AppStrings.partnership,
|
|
value: 0.75,
|
|
amount: '75%',
|
|
),
|
|
ProgressBarColumn(
|
|
text: AppStrings.selfApply,
|
|
value: 0.88,
|
|
amount: '12',
|
|
),
|
|
ProgressBarColumn(
|
|
text: AppStrings.contracting,
|
|
value: 0.36,
|
|
amount: '36',
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget _firstStatisticsRow() {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
StatisticsCard(
|
|
backgroundColor: Color(0xFFE5EFFF),
|
|
iconPath: 'assets/icons/arrows.svg',
|
|
title: AppStrings.tenderSubmitting,
|
|
amount: '12',
|
|
textColor: Color(0xFF0164FF),
|
|
enableTap: true,
|
|
onTap: () {},
|
|
),
|
|
StatisticsCard(
|
|
backgroundColor: Color(0xFFEAF8F9),
|
|
iconPath: 'assets/icons/thumb.svg',
|
|
title: AppStrings.approvedTenders,
|
|
amount: '03',
|
|
textColor: Color(0xFF24848E),
|
|
enableTap: true,
|
|
onTap: () {},
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget _secondStatisticsRow() {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
StatisticsCard(
|
|
backgroundColor: Color(0xFFFFF2E0),
|
|
iconPath: 'assets/icons/shield.svg',
|
|
title: AppStrings.tenderValue,
|
|
amount: '\$250,000',
|
|
textColor: Color(0xFFE5821E),
|
|
enableTap: true,
|
|
onTap: () {},
|
|
),
|
|
StatisticsCard(
|
|
backgroundColor: Color(0xFFF4F4F4),
|
|
iconPath: 'assets/icons/edit.svg',
|
|
title: AppStrings.thunderStatus,
|
|
amount: '23',
|
|
textColor: Color(0xFF9E9E9E),
|
|
enableTap: false,
|
|
onTap: () {},
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget _yourTenderText() {
|
|
return Text(
|
|
AppStrings.yourTenders,
|
|
style: TextStyle(
|
|
fontSize: 20.0.sp(),
|
|
fontWeight: FontWeight.w600,
|
|
color: Color(0xFF777777),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _bottomListView() {
|
|
return SizedBox(
|
|
width: double.infinity,
|
|
height: 310.0.h(),
|
|
child: ListView.builder(
|
|
itemCount: 10,
|
|
scrollDirection: Axis.horizontal,
|
|
itemBuilder: (context, index) {
|
|
return TendersListItem();
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|