home responsive and some changes

This commit is contained in:
amirrezaghabeli
2025-08-09 08:18:05 +03:30
parent 4179a0b292
commit eaa9ef18c2
16 changed files with 634 additions and 210 deletions
+172
View File
@@ -0,0 +1,172 @@
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();
},
),
);
}
}