173 lines
4.6 KiB
Dart
173 lines
4.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:tm_app/core/constants/strings.dart';
|
|
import 'package:tm_app/core/routes/app_routes.dart';
|
|
import 'package:tm_app/core/theme/colors.dart';
|
|
import 'package:tm_app/core/utils/size_config.dart';
|
|
|
|
import '../widgets.dart';
|
|
|
|
class TabletHomePage extends StatelessWidget {
|
|
const TabletHomePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: SingleChildScrollView(
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
24.0.w(),
|
|
120.0.h(),
|
|
24.0.w(),
|
|
24.0.h(),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
_progressBarsRow(),
|
|
SizedBox(height: 32.0.h()),
|
|
_firstTenderCardsRow(context),
|
|
SizedBox(height: 8.0.h()),
|
|
_secondTenderCardsRow(),
|
|
SizedBox(height: 32.0.h()),
|
|
_yourTenderText(),
|
|
SizedBox(height: 8.0.h()),
|
|
_bottomListView(),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _progressBarsRow() {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
ProgressBarColumn(
|
|
text: AppStrings.partnership,
|
|
value: 0.75,
|
|
amount: '75%',
|
|
circularProgressIndicatorWidth: 176.0,
|
|
circularProgressIndicatorHeight: 176.0,
|
|
strokeWidth: 8.0,
|
|
),
|
|
ProgressBarColumn(
|
|
text: AppStrings.selfApply,
|
|
value: 0.88,
|
|
amount: '12',
|
|
circularProgressIndicatorWidth: 176.0,
|
|
circularProgressIndicatorHeight: 176.0,
|
|
strokeWidth: 8.0,
|
|
),
|
|
ProgressBarColumn(
|
|
text: AppStrings.contracting,
|
|
value: 0.36,
|
|
amount: '36',
|
|
circularProgressIndicatorWidth: 176.0,
|
|
circularProgressIndicatorHeight: 176.0,
|
|
strokeWidth: 8.0,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget _firstTenderCardsRow(BuildContext context) {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: TenderCard(
|
|
backgroundColor: AppColors.primary20,
|
|
iconPath: 'assets/icons/arrows.svg',
|
|
title: AppStrings.tenderSubmitting,
|
|
amount: '12',
|
|
textColor: Color(0xFF0164FF),
|
|
enableTap: true,
|
|
width: double.infinity,
|
|
height: 148,
|
|
onTap: () {
|
|
YourTendersRouteData().push(context);
|
|
},
|
|
),
|
|
),
|
|
SizedBox(width: 16.0),
|
|
Expanded(
|
|
child: TenderCard(
|
|
backgroundColor: AppColors.primary10,
|
|
iconPath: 'assets/icons/thumb.svg',
|
|
title: AppStrings.approvedTenders,
|
|
amount: '03',
|
|
textColor: Color(0xFF24848E),
|
|
enableTap: true,
|
|
width: double.infinity,
|
|
height: 148,
|
|
onTap: () {
|
|
YourTendersRouteData().push(context);
|
|
},
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget _secondTenderCardsRow() {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: TenderCard(
|
|
backgroundColor: AppColors.orange10,
|
|
iconPath: 'assets/icons/shield.svg',
|
|
title: AppStrings.tenderValue,
|
|
amount: '\$250,000',
|
|
textColor: Color(0xFFE5821E),
|
|
enableTap: true,
|
|
width: double.infinity,
|
|
height: 148,
|
|
onTap: () {},
|
|
),
|
|
),
|
|
SizedBox(width: 16.0),
|
|
Expanded(
|
|
child: TenderCard(
|
|
backgroundColor: AppColors.grey10,
|
|
iconPath: 'assets/icons/edit.svg',
|
|
title: AppStrings.thunderStatus,
|
|
amount: '23',
|
|
textColor: Color(0xFF9E9E9E),
|
|
enableTap: false,
|
|
width: double.infinity,
|
|
height: 148,
|
|
onTap: () {},
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget _yourTenderText() {
|
|
return Text(
|
|
AppStrings.yourTenders,
|
|
style: TextStyle(
|
|
fontSize: 20.0.sp(),
|
|
fontWeight: FontWeight.w600,
|
|
color: AppColors.grey60,
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _bottomListView() {
|
|
return SizedBox(
|
|
width: double.infinity,
|
|
height: 310.0.h(),
|
|
child: ListView.builder(
|
|
itemCount: 10,
|
|
scrollDirection: Axis.horizontal,
|
|
itemBuilder: (context, index) {
|
|
return TendersListItem();
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|