cleared console problems

This commit is contained in:
amirrezaghabeli
2025-09-16 08:36:03 +03:30
parent b6a3598cbf
commit c421f85c95
67 changed files with 236 additions and 196 deletions
-1
View File
@@ -15,7 +15,6 @@ linter:
# always_use_package_imports: true # always_use_package_imports: true
avoid_annotating_with_dynamic: true avoid_annotating_with_dynamic: true
avoid_bool_literals_in_conditional_expressions: true avoid_bool_literals_in_conditional_expressions: true
avoid_catches_without_on_clauses: true
avoid_catching_errors: true avoid_catching_errors: true
avoid_final_parameters: true avoid_final_parameters: true
avoid_function_literals_in_foreach_calls: true avoid_function_literals_in_foreach_calls: true
+6 -3
View File
@@ -197,13 +197,16 @@ class LikedTendersRouteData extends GoRouteData with _$LikedTendersRouteData {
} }
} }
@TypedGoRoute<CompletionOfDocumentsMobileRouteData>(path: '/completion-of-documents') @TypedGoRoute<CompletionOfDocumentsMobileRouteData>(
class CompletionOfDocumentsMobileRouteData extends GoRouteData with _$CompletionOfDocumentsMobileRouteData { path: '/completion-of-documents',
)
class CompletionOfDocumentsMobileRouteData extends GoRouteData
with _$CompletionOfDocumentsMobileRouteData {
const CompletionOfDocumentsMobileRouteData(); const CompletionOfDocumentsMobileRouteData();
@override @override
Widget build(BuildContext context, GoRouterState state) { Widget build(BuildContext context, GoRouterState state) {
return CompletionOfDocumentsMobilePage(); return const CompletionOfDocumentsMobilePage();
} }
} }
+3 -1
View File
@@ -114,7 +114,9 @@ class AppColors {
: const Color(0xFFFFF2DE); : const Color(0xFFFFF2DE);
static Color get orange0 => static Color get orange0 =>
_isDarkMode ? const Color(0xFF8379694D) : const Color(0xFFFEFBF8); _isDarkMode
? const Color.fromRGBO(50, 48, 48, 0.85)
: const Color(0xFFFEFBF8);
static Color get white => static Color get white =>
_isDarkMode ? const Color(0xFFFFFFFF) : const Color(0xFFFFFFFF); _isDarkMode ? const Color(0xFFFFFFFF) : const Color(0xFFFFFFFF);
+1 -1
View File
@@ -65,7 +65,7 @@ class _MyAppState extends State<MyApp> {
return MaterialApp.router( return MaterialApp.router(
title: 'OppLens', title: 'OppLens',
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
scrollBehavior: MaterialScrollBehavior().copyWith( scrollBehavior: const MaterialScrollBehavior().copyWith(
dragDevices: { dragDevices: {
PointerDeviceKind.mouse, PointerDeviceKind.mouse,
PointerDeviceKind.touch, PointerDeviceKind.touch,
@@ -79,7 +79,7 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
), ),
Spacer(), const Spacer(),
Text( Text(
'75%', '75%',
style: TextStyle( style: TextStyle(
@@ -96,7 +96,7 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
Expanded( Expanded(
child: LinearProgressIndicator( child: LinearProgressIndicator(
value: 0.75, value: 0.75,
backgroundColor: Color(0xFFE0E0E0), backgroundColor: const Color(0xFFE0E0E0),
color: AppColors.cyanTeal, color: AppColors.cyanTeal,
minHeight: 6, minHeight: 6,
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
@@ -199,7 +199,7 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
SizedBox(height: 16.0.h()), SizedBox(height: 16.0.h()),
Container( Container(
padding: EdgeInsets.all(12), padding: const EdgeInsets.all(12),
height: 100.0.h(), height: 100.0.h(),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: AppColors.borderColor), border: Border.all(color: AppColors.borderColor),
@@ -208,7 +208,7 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
), ),
child: TextField( child: TextField(
maxLines: null, maxLines: null,
decoration: InputDecoration.collapsed( decoration: const InputDecoration.collapsed(
hintText: CompletionOfDocumentsStrings.note, hintText: CompletionOfDocumentsStrings.note,
), ),
style: TextStyle( style: TextStyle(
@@ -247,7 +247,7 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(bottom: 12.0.h()), margin: EdgeInsets.only(bottom: 12.0.h()),
padding: EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: backgroundColor, color: backgroundColor,
border: Border( border: Border(
@@ -260,9 +260,9 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
Row( Row(
children: [ children: [
if (tag != null) ...[ if (tag != null) ...[
Spacer(), const Spacer(),
Container( Container(
margin: EdgeInsets.only(right: 8), margin: const EdgeInsets.only(right: 8),
height: 32.0.h(), height: 32.0.h(),
width: 91.0.w(), width: 91.0.w(),
decoration: BoxDecoration( decoration: BoxDecoration(
@@ -281,7 +281,7 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
), ),
), ),
], ],
if (tag == null) Spacer(), if (tag == null) const Spacer(),
Container( Container(
height: 32.0.h(), height: 32.0.h(),
width: 91.0.w(), width: 91.0.w(),
@@ -105,7 +105,7 @@ class _TenderDetailDesktopPageState extends State<TenderDetailDesktopPage> {
return Column( return Column(
children: [ children: [
DesktopNavigationWidget( const DesktopNavigationWidget(
currentIndex: 1, // Home index currentIndex: 1, // Home index
), ),
Expanded( Expanded(
@@ -94,7 +94,7 @@ class _TenderDetailTabletPageState extends State<TenderDetailTabletPage> {
key: key, key: key,
), ),
drawer: TabletNavigationWidget( drawer: const TabletNavigationWidget(
currentIndex: 1, // Home is index 0 currentIndex: 1, // Home is index 0
), ),
body: Consumer<TenderDetailViewModel>( body: Consumer<TenderDetailViewModel>(
+2 -2
View File
@@ -21,7 +21,7 @@ class DeadlineItem extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return isScreenBig return isScreenBig
? Padding( ? Padding(
padding: EdgeInsets.symmetric(vertical: 0), padding: const EdgeInsets.symmetric(vertical: 0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@@ -101,7 +101,7 @@ class DeadlineItem extends StatelessWidget {
), ),
) )
: Padding( : Padding(
padding: EdgeInsets.symmetric(vertical: 0), padding: const EdgeInsets.symmetric(vertical: 0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@@ -35,7 +35,7 @@ class _SelectMeetingTimeBottomSheetState
padding: EdgeInsets.fromLTRB(24.0.w(), 24.0.h(), 24.0.w(), 33.0.h()), padding: EdgeInsets.fromLTRB(24.0.w(), 24.0.h(), 24.0.w(), 33.0.h()),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.backgroundColor, color: AppColors.backgroundColor,
borderRadius: BorderRadius.only( borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16.0), topLeft: Radius.circular(16.0),
topRight: Radius.circular(16.0), topRight: Radius.circular(16.0),
), ),
@@ -76,7 +76,7 @@ class _SelectMeetingTimeBottomSheetState
SizedBox(height: 8.0.h()), SizedBox(height: 8.0.h()),
InkWell( InkWell(
onTap: () { onTap: () {
CompletionOfDocumentsMobileRouteData().push(context); const CompletionOfDocumentsMobileRouteData().push(context);
//context.pop(); //context.pop();
}, },
child: Container( child: Container(
@@ -131,7 +131,7 @@ class _SelectMeetingTimeBottomSheetState
horizontal: 10.0.w(), horizontal: 10.0.w(),
vertical: 10.0.h(), vertical: 10.0.h(),
), ),
padding: EdgeInsets.all(3), padding: const EdgeInsets.all(3),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all( border: Border.all(
@@ -158,7 +158,7 @@ class _SelectMeetingTimeBottomSheetState
color: AppColors.grey80, color: AppColors.grey80,
), ),
), ),
Spacer(), const Spacer(),
Text( Text(
time, time,
style: TextStyle( style: TextStyle(
@@ -38,7 +38,7 @@ class TenderDetailActions extends StatelessWidget {
color: AppColors.primary30, color: AppColors.primary30,
borderRadius: BorderRadius.circular(100.0), borderRadius: BorderRadius.circular(100.0),
), ),
child: Center( child: const Center(
child: CircularProgressIndicator( child: CircularProgressIndicator(
color: AppColors.mainBlue, color: AppColors.mainBlue,
), ),
@@ -119,7 +119,7 @@ class TenderDetailActions extends StatelessWidget {
Row _webActions() { Row _webActions() {
return Row( return Row(
children: [ children: [
Spacer(), const Spacer(),
Consumer<TenderDetailViewModel>( Consumer<TenderDetailViewModel>(
builder: (context, viewModel, child) { builder: (context, viewModel, child) {
return viewModel.isRejectApprovalLoading return viewModel.isRejectApprovalLoading
@@ -49,7 +49,9 @@ class TenderDetailCard extends StatelessWidget {
child: LinearProgressIndicator( child: LinearProgressIndicator(
value: 0.75, value: 0.75,
backgroundColor: AppColors.grey20, backgroundColor: AppColors.grey20,
valueColor: AlwaysStoppedAnimation<Color>(AppColors.jellyBean), valueColor: const AlwaysStoppedAnimation<Color>(
AppColors.jellyBean,
),
minHeight: 6.0.h(), minHeight: 6.0.h(),
), ),
), ),
@@ -118,7 +118,7 @@ class DesktopForgotPasswordCreatePage extends StatelessWidget {
), ),
SizedBox(height: 80.0.h()), SizedBox(height: 80.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordCreateStrings.resetLink, text: ForgotPasswordCreateStrings.resetLink,
onPressed: null, onPressed: null,
@@ -10,7 +10,7 @@ class ForgotPasswordCreateScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: MobileForgotPasswordCreatePage(), mobile: MobileForgotPasswordCreatePage(),
tablet: TabletForgotPasswordCreatePage(), tablet: TabletForgotPasswordCreatePage(),
desktop: DesktopForgotPasswordCreatePage(), desktop: DesktopForgotPasswordCreatePage(),
@@ -115,7 +115,7 @@ class MobileForgotPasswordCreatePage extends StatelessWidget {
), ),
SizedBox(height: 80.0.h()), SizedBox(height: 80.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordCreateStrings.resetLink, text: ForgotPasswordCreateStrings.resetLink,
onPressed: null, onPressed: null,
@@ -118,7 +118,7 @@ class TabletForgotPasswordCreatePage extends StatelessWidget {
), ),
SizedBox(height: 80.0.h()), SizedBox(height: 80.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordCreateStrings.resetLink, text: ForgotPasswordCreateStrings.resetLink,
onPressed: null, onPressed: null,
@@ -82,7 +82,7 @@ class DesktopForgotPasswordOtpPage extends StatelessWidget {
), ),
SizedBox(height: 24.0.h()), SizedBox(height: 24.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordOtpStrings.resetLink, text: ForgotPasswordOtpStrings.resetLink,
onPressed: null, onPressed: null,
@@ -105,7 +105,7 @@ class DesktopForgotPasswordOtpPage extends StatelessWidget {
} }
: null, : null,
), ),
SizedBox(height: 12.0), const SizedBox(height: 12.0),
TextButton( TextButton(
onPressed: () { onPressed: () {
@@ -10,7 +10,7 @@ class ForgotPasswordOtpScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: MobileForgotPasswordOtpPage(), mobile: MobileForgotPasswordOtpPage(),
tablet: TabletForgotPasswordOtpPage(), tablet: TabletForgotPasswordOtpPage(),
desktop: DesktopForgotPasswordOtpPage(), desktop: DesktopForgotPasswordOtpPage(),
@@ -78,7 +78,7 @@ class MobileForgotPasswordOtpPage extends StatelessWidget {
), ),
SizedBox(height: 24.0.h()), SizedBox(height: 24.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordOtpStrings.resetLink, text: ForgotPasswordOtpStrings.resetLink,
onPressed: null, onPressed: null,
@@ -82,7 +82,7 @@ class TabletForgotPasswordOtpPage extends StatelessWidget {
), ),
SizedBox(height: 24.0.h()), SizedBox(height: 24.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordOtpStrings.resetLink, text: ForgotPasswordOtpStrings.resetLink,
onPressed: null, onPressed: null,
@@ -105,7 +105,7 @@ class TabletForgotPasswordOtpPage extends StatelessWidget {
} }
: null, : null,
), ),
SizedBox(height: 12.0), const SizedBox(height: 12.0),
TextButton( TextButton(
onPressed: () { onPressed: () {
@@ -83,7 +83,7 @@ class DesktopForgotPasswordPage extends StatelessWidget {
// ), // ),
SizedBox(height: 70.0.h()), SizedBox(height: 70.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordStrings.resetLink, text: ForgotPasswordStrings.resetLink,
onPressed: null, onPressed: null,
@@ -105,7 +105,7 @@ class DesktopForgotPasswordPage extends StatelessWidget {
} }
: null, : null,
), ),
SizedBox(height: 12), const SizedBox(height: 12),
TextButton( TextButton(
onPressed: () { onPressed: () {
context.pop(); context.pop();
@@ -10,7 +10,7 @@ class ForgotPasswordScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: MobileForgotPasswordPage(), mobile: MobileForgotPasswordPage(),
tablet: TabletForgotPasswordPage(), tablet: TabletForgotPasswordPage(),
desktop: DesktopForgotPasswordPage(), desktop: DesktopForgotPasswordPage(),
@@ -78,7 +78,7 @@ class MobileForgotPasswordPage extends StatelessWidget {
// ), // ),
// SizedBox(height: 70.0.h()), // SizedBox(height: 70.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordStrings.resetLink, text: ForgotPasswordStrings.resetLink,
onPressed: null, onPressed: null,
@@ -77,7 +77,7 @@ class TabletForgotPasswordPage extends StatelessWidget {
// ), // ),
// SizedBox(height: 70.0.h()), // SizedBox(height: 70.0.h()),
viewModel.isLoading viewModel.isLoading
? BaseButton( ? const BaseButton(
isEnabled: false, isEnabled: false,
text: ForgotPasswordStrings.resetLink, text: ForgotPasswordStrings.resetLink,
onPressed: null, onPressed: null,
@@ -100,7 +100,7 @@ class TabletForgotPasswordPage extends StatelessWidget {
: null, : null,
), ),
SizedBox(height: 12), const SizedBox(height: 12),
TextButton( TextButton(
onPressed: () { onPressed: () {
context.pop(); context.pop();
+13 -13
View File
@@ -18,7 +18,7 @@ class DesktopHomePage extends StatelessWidget {
return Scaffold( return Scaffold(
body: Column( body: Column(
children: [ children: [
DesktopNavigationWidget( const DesktopNavigationWidget(
currentIndex: 0, // Home index currentIndex: 0, // Home index
), ),
Expanded( Expanded(
@@ -45,9 +45,9 @@ class DesktopHomePage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: 55), const SizedBox(height: 55),
// SizedBox(width: 780, child: NotificationCard()), // SizedBox(width: 780, child: NotificationCard()),
SizedBox(height: 40.0), const SizedBox(height: 40.0),
_progressBarsRow(homeViewModel), _progressBarsRow(homeViewModel),
SizedBox(height: 32.0.h()), SizedBox(height: 32.0.h()),
Padding( Padding(
@@ -89,7 +89,7 @@ class DesktopHomePage extends StatelessWidget {
circularProgressIndicatorHeight: 176, circularProgressIndicatorHeight: 176,
strokeWidth: 9, strokeWidth: 9,
), ),
SizedBox(width: 106), const SizedBox(width: 106),
ProgressBarColumn( ProgressBarColumn(
text: HomeStrings.selfApply, text: HomeStrings.selfApply,
value: homeViewModel.selfApplyPercent, value: homeViewModel.selfApplyPercent,
@@ -126,11 +126,11 @@ class DesktopHomePage extends StatelessWidget {
width: 178, width: 178,
height: 148, height: 148,
onTap: () { onTap: () {
YourTendersRouteData().push(context); const YourTendersRouteData().push(context);
}, },
), ),
), ),
SizedBox(width: 10), const SizedBox(width: 10),
Expanded( Expanded(
child: TenderCard( child: TenderCard(
backgroundColor: AppColors.primary10, backgroundColor: AppColors.primary10,
@@ -142,11 +142,11 @@ class DesktopHomePage extends StatelessWidget {
width: 178, width: 178,
height: 148, height: 148,
onTap: () { onTap: () {
YourTendersRouteData().push(context); const YourTendersRouteData().push(context);
}, },
), ),
), ),
SizedBox(width: 10), const SizedBox(width: 10),
TenderCard( TenderCard(
backgroundColor: AppColors.orange10, backgroundColor: AppColors.orange10,
iconPath: AssetsManager.shield, iconPath: AssetsManager.shield,
@@ -158,7 +158,7 @@ class DesktopHomePage extends StatelessWidget {
height: 148, height: 148,
onTap: () {}, onTap: () {},
), ),
SizedBox(width: 10), const SizedBox(width: 10),
TenderCard( TenderCard(
backgroundColor: AppColors.grey10, backgroundColor: AppColors.grey10,
iconPath: AssetsManager.thumbLike, iconPath: AssetsManager.thumbLike,
@@ -169,7 +169,7 @@ class DesktopHomePage extends StatelessWidget {
width: 178, width: 178,
height: 148, height: 148,
onTap: () { onTap: () {
LikedTendersRouteData().push(context); const LikedTendersRouteData().push(context);
}, },
), ),
], ],
@@ -180,7 +180,7 @@ class DesktopHomePage extends StatelessWidget {
final isYourTenders = final isYourTenders =
homeViewModel.data?.data?.tenders!.isNotEmpty ?? false; homeViewModel.data?.data?.tenders!.isNotEmpty ?? false;
return ConstrainedBox( return ConstrainedBox(
constraints: BoxConstraints(maxWidth: 740), constraints: const BoxConstraints(maxWidth: 740),
child: Align( child: Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text( child: Text(
@@ -216,7 +216,7 @@ class DesktopHomePage extends StatelessWidget {
return false; return false;
}, },
child: ListView.builder( child: ListView.builder(
padding: EdgeInsets.only(bottom: 20), padding: const EdgeInsets.only(bottom: 20),
itemCount: itemCount:
homeViewModel.tenders.length + homeViewModel.tenders.length +
(homeViewModel.isLoadingMore ? 1 : 0), (homeViewModel.isLoadingMore ? 1 : 0),
@@ -225,7 +225,7 @@ class DesktopHomePage extends StatelessWidget {
if (index < homeViewModel.tenders.length) { if (index < homeViewModel.tenders.length) {
return TendersListItem(tender: homeViewModel.tenders[index]); return TendersListItem(tender: homeViewModel.tenders[index]);
} else { } else {
return Center( return const Center(
child: Padding( child: Padding(
padding: EdgeInsets.all(16.0), padding: EdgeInsets.all(16.0),
child: CircularProgressIndicator( child: CircularProgressIndicator(
+1 -1
View File
@@ -10,7 +10,7 @@ class HomeScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SizeConfig.init(context); SizeConfig.init(context);
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: MobileHomePage(), mobile: MobileHomePage(),
tablet: TabletHomePage(), tablet: TabletHomePage(),
desktop: DesktopHomePage(), desktop: DesktopHomePage(),
+7 -7
View File
@@ -68,21 +68,21 @@ class MobileHomePage extends StatelessWidget {
padding: EdgeInsets.symmetric(horizontal: 24.0.w()), padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
child: Row( child: Row(
children: [ children: [
Spacer(), const Spacer(),
SizedBox(width: 20.0.w()), SizedBox(width: 20.0.w()),
ProgressBarColumn( ProgressBarColumn(
text: HomeStrings.partnership, text: HomeStrings.partnership,
value: homeViewModel.partnershipPercent, value: homeViewModel.partnershipPercent,
amount: homeViewModel.partnershipPercent.toString(), amount: homeViewModel.partnershipPercent.toString(),
), ),
Spacer(), const Spacer(),
ProgressBarColumn( ProgressBarColumn(
text: HomeStrings.selfApply, text: HomeStrings.selfApply,
value: homeViewModel.selfApplyPercent, value: homeViewModel.selfApplyPercent,
amount: homeViewModel.selfApplyPercent.toString(), amount: homeViewModel.selfApplyPercent.toString(),
), ),
SizedBox(width: 20.0.w()), SizedBox(width: 20.0.w()),
Spacer(), const Spacer(),
], ],
), ),
); );
@@ -106,7 +106,7 @@ class MobileHomePage extends StatelessWidget {
textColor: AppColors.mainBlue, textColor: AppColors.mainBlue,
enableTap: true, enableTap: true,
onTap: () { onTap: () {
YourTendersRouteData().push(context); const YourTendersRouteData().push(context);
}, },
), ),
TenderCard( TenderCard(
@@ -118,7 +118,7 @@ class MobileHomePage extends StatelessWidget {
textColor: AppColors.jellyBean, textColor: AppColors.jellyBean,
enableTap: true, enableTap: true,
onTap: () { onTap: () {
YourTendersRouteData().push(context); const YourTendersRouteData().push(context);
}, },
), ),
], ],
@@ -152,7 +152,7 @@ class MobileHomePage extends StatelessWidget {
textColor: AppColors.grey80, textColor: AppColors.grey80,
enableTap: true, enableTap: true,
onTap: () { onTap: () {
LikedTendersRouteData().push(context).then((value) { const LikedTendersRouteData().push(context).then((value) {
homeViewModel.init(); homeViewModel.init();
}); });
}, },
@@ -211,7 +211,7 @@ class MobileHomePage extends StatelessWidget {
if (index < homeViewModel.tenders.length) { if (index < homeViewModel.tenders.length) {
return TendersListItem(tender: homeViewModel.tenders[index]); return TendersListItem(tender: homeViewModel.tenders[index]);
} else { } else {
return Center( return const Center(
child: Padding( child: Padding(
padding: EdgeInsets.all(16.0), padding: EdgeInsets.all(16.0),
child: CircularProgressIndicator( child: CircularProgressIndicator(
+10 -10
View File
@@ -24,7 +24,7 @@ class TabletHomePage extends StatelessWidget {
appBar: tabletAppBar(title: HomeStrings.home, key: key), appBar: tabletAppBar(title: HomeStrings.home, key: key),
drawer: TabletNavigationWidget( drawer: const TabletNavigationWidget(
currentIndex: 0, // Home is index 0 currentIndex: 0, // Home is index 0
), ),
body: Consumer<HomeViewModel>( body: Consumer<HomeViewModel>(
@@ -83,7 +83,7 @@ class TabletHomePage extends StatelessWidget {
Widget _progressBarsRow(HomeViewModel homeViewModel) { Widget _progressBarsRow(HomeViewModel homeViewModel) {
return Row( return Row(
children: [ children: [
Spacer(), const Spacer(),
SizedBox(width: 20.0.w()), SizedBox(width: 20.0.w()),
ProgressBarColumn( ProgressBarColumn(
text: HomeStrings.partnership, text: HomeStrings.partnership,
@@ -93,7 +93,7 @@ class TabletHomePage extends StatelessWidget {
circularProgressIndicatorHeight: 176.0, circularProgressIndicatorHeight: 176.0,
strokeWidth: 8.0, strokeWidth: 8.0,
), ),
Spacer(), const Spacer(),
ProgressBarColumn( ProgressBarColumn(
text: HomeStrings.selfApply, text: HomeStrings.selfApply,
value: homeViewModel.selfApplyPercent, value: homeViewModel.selfApplyPercent,
@@ -103,7 +103,7 @@ class TabletHomePage extends StatelessWidget {
strokeWidth: 8.0, strokeWidth: 8.0,
), ),
SizedBox(width: 20.0.w()), SizedBox(width: 20.0.w()),
Spacer(), const Spacer(),
], ],
); );
} }
@@ -128,11 +128,11 @@ class TabletHomePage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 148, height: 148,
onTap: () { onTap: () {
YourTendersRouteData().push(context); const YourTendersRouteData().push(context);
}, },
), ),
), ),
SizedBox(width: 16.0), const SizedBox(width: 16.0),
Expanded( Expanded(
child: TenderCard( child: TenderCard(
backgroundColor: AppColors.primary10, backgroundColor: AppColors.primary10,
@@ -145,7 +145,7 @@ class TabletHomePage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 148, height: 148,
onTap: () { onTap: () {
YourTendersRouteData().push(context); const YourTendersRouteData().push(context);
}, },
), ),
), ),
@@ -174,7 +174,7 @@ class TabletHomePage extends StatelessWidget {
onTap: () {}, onTap: () {},
), ),
), ),
SizedBox(width: 16.0), const SizedBox(width: 16.0),
Expanded( Expanded(
child: TenderCard( child: TenderCard(
backgroundColor: AppColors.grey10, backgroundColor: AppColors.grey10,
@@ -186,7 +186,7 @@ class TabletHomePage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 148, height: 148,
onTap: () { onTap: () {
LikedTendersRouteData().push(context); const LikedTendersRouteData().push(context);
}, },
), ),
), ),
@@ -234,7 +234,7 @@ class TabletHomePage extends StatelessWidget {
if (index < homeViewModel.tenders.length) { if (index < homeViewModel.tenders.length) {
return TendersListItem(tender: homeViewModel.tenders[index]); return TendersListItem(tender: homeViewModel.tenders[index]);
} else { } else {
return Center( return const Center(
child: Padding( child: Padding(
padding: EdgeInsets.all(16.0), padding: EdgeInsets.all(16.0),
child: CircularProgressIndicator( child: CircularProgressIndicator(
+4 -2
View File
@@ -37,7 +37,7 @@ class _ProgressBarColumnState extends State<ProgressBarColumn>
// Initialize the animation controller // Initialize the animation controller
_controller = AnimationController( _controller = AnimationController(
vsync: this, vsync: this,
duration: Duration(milliseconds: 2000), // duration of the animation duration: const Duration(milliseconds: 2000), // duration of the animation
); );
// Create a Tween animation from 0.0 to 0.75 // Create a Tween animation from 0.0 to 0.75
@@ -81,7 +81,9 @@ class _ProgressBarColumnState extends State<ProgressBarColumn>
backgroundColor: AppColors.grey10, backgroundColor: AppColors.grey10,
strokeCap: StrokeCap.round, strokeCap: StrokeCap.round,
strokeWidth: widget.strokeWidth ?? 6.0, strokeWidth: widget.strokeWidth ?? 6.0,
valueColor: AlwaysStoppedAnimation<Color>(AppColors.jellyBean), valueColor: const AlwaysStoppedAnimation<Color>(
AppColors.jellyBean,
),
value: _animation.value, value: _animation.value,
), ),
), ),
+3 -3
View File
@@ -44,7 +44,7 @@ class TenderCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SvgPicture.asset(iconPath,width: 32.0.w(),height: 32.0.h(),), SvgPicture.asset(iconPath, width: 32.0.w(), height: 32.0.h()),
SizedBox(height: 4.0.h()), SizedBox(height: 4.0.h()),
Text( Text(
title, title,
@@ -54,7 +54,7 @@ class TenderCard extends StatelessWidget {
color: AppColors.grey80, color: AppColors.grey80,
), ),
), ),
Spacer(), const Spacer(),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@@ -68,7 +68,7 @@ class TenderCard extends StatelessWidget {
), ),
enableTap enableTap
? SvgPicture.asset(AssetsManager.arrowRight) ? SvgPicture.asset(AssetsManager.arrowRight)
: SizedBox(), : const SizedBox(),
], ],
), ),
], ],
+3 -3
View File
@@ -97,8 +97,8 @@ class TendersListItem extends StatelessWidget {
), ),
), ),
), ),
Spacer(), const Spacer(),
TenderCardProgressBar(), const TenderCardProgressBar(),
SizedBox(height: 15.0.h()), SizedBox(height: 15.0.h()),
Row( Row(
@@ -117,7 +117,7 @@ class TendersListItem extends StatelessWidget {
tender.countryCode != null tender.countryCode != null
? Flag(countryCode: tender.countryCode!) ? Flag(countryCode: tender.countryCode!)
: const Flag(countryCode: ''), : const Flag(countryCode: ''),
Spacer(), const Spacer(),
], ],
), ),
], ],
@@ -39,7 +39,9 @@ class TenderCardProgressBar extends StatelessWidget {
child: LinearProgressIndicator( child: LinearProgressIndicator(
value: 0.75, value: 0.75,
backgroundColor: AppColors.grey20, backgroundColor: AppColors.grey20,
valueColor: AlwaysStoppedAnimation<Color>(AppColors.secondary50), valueColor: const AlwaysStoppedAnimation<Color>(
AppColors.secondary50,
),
minHeight: 6.0.h(), minHeight: 6.0.h(),
), ),
), ),
@@ -242,7 +242,7 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
child: SizedBox( child: SizedBox(
width: 24.0.w(), width: 24.0.w(),
height: 24.0.h(), height: 24.0.h(),
child: CircularProgressIndicator( child: const CircularProgressIndicator(
color: AppColors.secondary50, color: AppColors.secondary50,
strokeWidth: 2, strokeWidth: 2,
), ),
@@ -29,7 +29,7 @@ class _LikedTendersScreenState extends State<LikedTendersScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SizeConfig.init(context); SizeConfig.init(context);
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: LikedTendersMobilePage(), mobile: LikedTendersMobilePage(),
tablet: LikedTendersTabletPage(), tablet: LikedTendersTabletPage(),
desktop: LikedTendersDesktopPage(), desktop: LikedTendersDesktopPage(),
@@ -147,7 +147,7 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
), ),
), ),
//tabletAppBar(title: LikedTendersStrings.likedTenders, key: key), //tabletAppBar(title: LikedTendersStrings.likedTenders, key: key),
drawer: TabletNavigationWidget(currentIndex: 1), drawer: const TabletNavigationWidget(currentIndex: 1),
body: Center( body: Center(
child: SizedBox( child: SizedBox(
width: 720, width: 720,
@@ -151,7 +151,7 @@ class LikedListItem extends StatelessWidget {
), ),
), ),
), ),
Spacer(), const Spacer(),
Row( Row(
children: [ children: [
@@ -168,8 +168,8 @@ class LikedListItem extends StatelessWidget {
SizedBox(width: 8.0.w()), SizedBox(width: 8.0.w()),
tender.countryCode != null tender.countryCode != null
? Flag(countryCode: tender.countryCode!) ? Flag(countryCode: tender.countryCode!)
: Flag(countryCode: ''), : const Flag(countryCode: ''),
Spacer(), const Spacer(),
InkWell( InkWell(
onTap: () { onTap: () {
viewModel.rejectTenderApproval( viewModel.rejectTenderApproval(
@@ -31,7 +31,7 @@ class _LoginDesktopPageState extends State<LoginDesktopPage> {
void _viewModelListener() { void _viewModelListener() {
if (viewModel.loggedInUser != null) { if (viewModel.loggedInUser != null) {
Router.neglect(context, () => HomeRouteData().go(context)); Router.neglect(context, () => const HomeRouteData().go(context));
} else if (viewModel.errorMessage != null) { } else if (viewModel.errorMessage != null) {
AppToast.error(context, viewModel.errorMessage!); AppToast.error(context, viewModel.errorMessage!);
} }
@@ -92,7 +92,7 @@ class _LoginDesktopPageState extends State<LoginDesktopPage> {
), ),
SizedBox(height: 32.0.h()), SizedBox(height: 32.0.h()),
if (viewModel.isLoading) if (viewModel.isLoading)
BaseButton( const BaseButton(
isEnabled: false, isEnabled: false,
onPressed: null, onPressed: null,
isLoading: true, isLoading: true,
+1 -1
View File
@@ -29,7 +29,7 @@ class _LoginMobilePageState extends State<LoginMobilePage> {
void _viewModelListener() { void _viewModelListener() {
if (viewModel.loggedInUser != null) { if (viewModel.loggedInUser != null) {
Router.neglect(context, () => HomeRouteData().go(context)); Router.neglect(context, () => const HomeRouteData().go(context));
} }
if (viewModel.errorMessage != null) { if (viewModel.errorMessage != null) {
AppToast.error(context, viewModel.errorMessage!); AppToast.error(context, viewModel.errorMessage!);
+4 -4
View File
@@ -8,13 +8,13 @@ import 'package:tm_app/views/shared/responsive_builder.dart';
class LoginScreen extends StatelessWidget { class LoginScreen extends StatelessWidget {
const LoginScreen({super.key}); const LoginScreen({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SizeConfig.init(context); SizeConfig.init(context);
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: LoginMobilePage(), mobile: LoginMobilePage(),
tablet: LoginTabletPage(), tablet: LoginTabletPage(),
desktop: LoginDesktopPage(), desktop: LoginDesktopPage(),
); );
} }
} }
+2 -2
View File
@@ -29,7 +29,7 @@ class _LoginTabletPageState extends State<LoginTabletPage> {
void _viewModelListener() { void _viewModelListener() {
if (viewModel.loggedInUser != null) { if (viewModel.loggedInUser != null) {
Router.neglect(context, () => HomeRouteData().go(context)); Router.neglect(context, () => const HomeRouteData().go(context));
} }
if (viewModel.errorMessage != null) { if (viewModel.errorMessage != null) {
AppToast.error(context, viewModel.errorMessage!); AppToast.error(context, viewModel.errorMessage!);
@@ -84,7 +84,7 @@ class _LoginTabletPageState extends State<LoginTabletPage> {
), ),
SizedBox(height: 32.0.h()), SizedBox(height: 32.0.h()),
if (viewModel.isLoading) if (viewModel.isLoading)
BaseButton( const BaseButton(
isEnabled: false, isEnabled: false,
onPressed: null, onPressed: null,
isLoading: true, isLoading: true,
+1 -1
View File
@@ -90,7 +90,7 @@ class LoginTextField extends StatelessWidget {
borderSide: BorderSide(color: AppColors.grey40), borderSide: BorderSide(color: AppColors.grey40),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: AppColors.borderBlue), borderSide: const BorderSide(color: AppColors.borderBlue),
borderRadius: BorderRadius.circular(borderRedus ?? 12.0.w()), borderRadius: BorderRadius.circular(borderRedus ?? 12.0.w()),
), ),
), ),
@@ -41,7 +41,7 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
body: Column( body: Column(
children: [ children: [
DesktopNavigationWidget(currentIndex: 3), const DesktopNavigationWidget(currentIndex: 3),
SizedBox(height: 60.0.h()), SizedBox(height: 60.0.h()),
@@ -80,7 +80,7 @@ class _MobileNotificationPageState extends State<MobileNotificationPage>
Expanded( Expanded(
child: TabBarView( child: TabBarView(
controller: controller, controller: controller,
children: [ children: const [
NotificationAllTab(), NotificationAllTab(),
NotificationUnreadTab(), NotificationUnreadTab(),
NotificationImportantTab(), NotificationImportantTab(),
@@ -11,7 +11,7 @@ class NotificationScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SizeConfig.init(context); SizeConfig.init(context);
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: MobileNotificationPage(), mobile: MobileNotificationPage(),
tablet: TabletNotificationPage(), tablet: TabletNotificationPage(),
desktop: DesktopNotificationPage(), desktop: DesktopNotificationPage(),
@@ -45,7 +45,7 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
title: NotificationStrings.notificationTitle, title: NotificationStrings.notificationTitle,
key: key, key: key,
), ),
drawer: TabletNavigationWidget(currentIndex: 3), drawer: const TabletNavigationWidget(currentIndex: 3),
body: Center( body: Center(
child: SizedBox( child: SizedBox(
width: 720, width: 720,
@@ -92,7 +92,7 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
Expanded( Expanded(
child: TabBarView( child: TabBarView(
controller: controller, controller: controller,
children: [ children: const [
NotificationAllTab(), NotificationAllTab(),
NotificationUnreadTab(), NotificationUnreadTab(),
NotificationImportantTab(), NotificationImportantTab(),
+7 -7
View File
@@ -35,7 +35,7 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
AppToast.error(context, viewModel.errorMessage!); AppToast.error(context, viewModel.errorMessage!);
} }
if (viewModel.loggedOut) { if (viewModel.loggedOut) {
Router.neglect(context, () => LoginScreenRoute().go(context)); Router.neglect(context, () => const LoginScreenRoute().go(context));
} }
} }
@@ -52,7 +52,7 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
body: Consumer<ProfileViewModel>( body: Consumer<ProfileViewModel>(
builder: (context, viewModel, child) { builder: (context, viewModel, child) {
if (viewModel.isLoading) { if (viewModel.isLoading) {
return Center( return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50), child: CircularProgressIndicator(color: AppColors.secondary50),
); );
} }
@@ -61,12 +61,12 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
} }
if (viewModel.companyProfileData == null) { if (viewModel.companyProfileData == null) {
return Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return Column( return Column(
children: [ children: [
DesktopNavigationWidget( const DesktopNavigationWidget(
currentIndex: 4, // Tenders index currentIndex: 4, // Tenders index
), ),
SizedBox( SizedBox(
@@ -87,7 +87,7 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
description: description:
viewModel.companyProfileData!.registrationNumber!, viewModel.companyProfileData!.registrationNumber!,
), ),
TitleDescription( const TitleDescription(
title: ProfileStrings.businessType, title: ProfileStrings.businessType,
description: '-', description: '-',
), ),
@@ -122,13 +122,13 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
color: AppColors.grey70, color: AppColors.grey70,
), ),
), ),
Spacer(), const Spacer(),
SvgPicture.asset(AssetsManager.sun), SvgPicture.asset(AssetsManager.sun),
SizedBox(width: 12.0.w()), SizedBox(width: 12.0.w()),
SizedBox( SizedBox(
width: 52.0.w(), width: 52.0.w(),
height: 32.0.h(), height: 32.0.h(),
child: ThemeToggle(), child: const ThemeToggle(),
), ),
SizedBox(width: 12.0.w()), SizedBox(width: 12.0.w()),
SvgPicture.asset(AssetsManager.moon), SvgPicture.asset(AssetsManager.moon),
+7 -7
View File
@@ -35,7 +35,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
AppToast.error(context, viewModel.errorMessage!); AppToast.error(context, viewModel.errorMessage!);
} }
if (viewModel.loggedOut) { if (viewModel.loggedOut) {
Router.neglect(context, () => LoginScreenRoute().go(context)); Router.neglect(context, () => const LoginScreenRoute().go(context));
} }
} }
@@ -53,7 +53,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
body: Consumer<ProfileViewModel>( body: Consumer<ProfileViewModel>(
builder: (context, viewModel, child) { builder: (context, viewModel, child) {
if (viewModel.isLoading) { if (viewModel.isLoading) {
return Center( return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50), child: CircularProgressIndicator(color: AppColors.secondary50),
); );
} }
@@ -63,7 +63,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
} }
if (viewModel.companyProfileData == null) { if (viewModel.companyProfileData == null) {
return Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return Padding( return Padding(
@@ -87,7 +87,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
description: description:
viewModel.companyProfileData!.registrationNumber!, viewModel.companyProfileData!.registrationNumber!,
), ),
TitleDescription( const TitleDescription(
title: ProfileStrings.businessType, title: ProfileStrings.businessType,
description: '-', description: '-',
), ),
@@ -121,13 +121,13 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
color: AppColors.grey70, color: AppColors.grey70,
), ),
), ),
Spacer(), const Spacer(),
SvgPicture.asset(AssetsManager.sun), SvgPicture.asset(AssetsManager.sun),
SizedBox(width: 12.0.w()), SizedBox(width: 12.0.w()),
SizedBox( SizedBox(
width: 52.0.w(), width: 52.0.w(),
height: 32.0.h(), height: 32.0.h(),
child: ThemeToggle(), child: const ThemeToggle(),
), ),
SizedBox(width: 12.0.w()), SizedBox(width: 12.0.w()),
SvgPicture.asset(AssetsManager.moon), SvgPicture.asset(AssetsManager.moon),
@@ -137,7 +137,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
SizedBox(height: 24.0.h()), SizedBox(height: 24.0.h()),
Divider(color: AppColors.dividerColor, thickness: 1), Divider(color: AppColors.dividerColor, thickness: 1),
SizedBox(height: 24.0.h()), SizedBox(height: 24.0.h()),
Spacer(), const Spacer(),
InkWell( InkWell(
onTap: () => viewModel.logout(), onTap: () => viewModel.logout(),
borderRadius: BorderRadius.circular(100), borderRadius: BorderRadius.circular(100),
+1 -1
View File
@@ -10,7 +10,7 @@ class ProfileScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: MobileProfilePage(), mobile: MobileProfilePage(),
tablet: TabletProfilePage(), tablet: TabletProfilePage(),
desktop: DesktopProfilePage(), desktop: DesktopProfilePage(),
+7 -7
View File
@@ -36,7 +36,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
AppToast.error(context, viewModel.errorMessage!); AppToast.error(context, viewModel.errorMessage!);
} }
if (viewModel.loggedOut) { if (viewModel.loggedOut) {
Router.neglect(context, () => LoginScreenRoute().go(context)); Router.neglect(context, () => const LoginScreenRoute().go(context));
} }
} }
@@ -52,7 +52,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
return Consumer<ProfileViewModel>( return Consumer<ProfileViewModel>(
builder: (context, viewModel, child) { builder: (context, viewModel, child) {
if (viewModel.isLoading) { if (viewModel.isLoading) {
return Center( return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50), child: CircularProgressIndicator(color: AppColors.secondary50),
); );
} }
@@ -61,7 +61,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
} }
if (viewModel.companyProfileData == null) { if (viewModel.companyProfileData == null) {
return Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return SafeArea( return SafeArea(
@@ -70,7 +70,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
appBar: tabletAppBar(title: ProfileStrings.profileTitle, key: key), appBar: tabletAppBar(title: ProfileStrings.profileTitle, key: key),
drawer: TabletNavigationWidget(currentIndex: 4), drawer: const TabletNavigationWidget(currentIndex: 4),
body: Padding( body: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 24.0.w(), horizontal: 24.0.w(),
@@ -92,7 +92,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
description: description:
viewModel.companyProfileData!.registrationNumber!, viewModel.companyProfileData!.registrationNumber!,
), ),
TitleDescription( const TitleDescription(
title: ProfileStrings.businessType, title: ProfileStrings.businessType,
description: '-', description: '-',
), ),
@@ -127,13 +127,13 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
color: AppColors.grey70, color: AppColors.grey70,
), ),
), ),
Spacer(), const Spacer(),
SvgPicture.asset(AssetsManager.sun), SvgPicture.asset(AssetsManager.sun),
SizedBox(width: 12.0.w()), SizedBox(width: 12.0.w()),
SizedBox( SizedBox(
width: 52.0.w(), width: 52.0.w(),
height: 32.0.h(), height: 32.0.h(),
child: ThemeToggle(), child: const ThemeToggle(),
), ),
SizedBox(width: 12.0.w()), SizedBox(width: 12.0.w()),
SvgPicture.asset(AssetsManager.moon), SvgPicture.asset(AssetsManager.moon),
+1 -1
View File
@@ -75,7 +75,7 @@ class _CachedSvgState extends State<CachedSvg> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (_isLoading) { if (_isLoading) {
return SizedBox(); return const SizedBox();
} }
if (_svgData == null) { if (_svgData == null) {
+22 -13
View File
@@ -34,9 +34,9 @@ class DesktopNavigationWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(width: 40), const SizedBox(width: 40),
SvgPicture.asset(AssetsManager.logoSmall), SvgPicture.asset(AssetsManager.logoSmall),
Spacer(), const Spacer(),
_navigationItem( _navigationItem(
context: context, context: context,
text: HomeStrings.home, text: HomeStrings.home,
@@ -45,14 +45,17 @@ class DesktopNavigationWidget extends StatelessWidget {
if (currentIndex == 0) { if (currentIndex == 0) {
return; return;
} else { } else {
Router.neglect(context, () => HomeRouteData().go(context)); Router.neglect(
context,
() => const HomeRouteData().go(context),
);
context.read<HomeViewModel>().init(); context.read<HomeViewModel>().init();
} }
}, },
iconPath: AssetsManager.home, iconPath: AssetsManager.home,
activeIconPath: AssetsManager.homeActive, activeIconPath: AssetsManager.homeActive,
), ),
SizedBox(width: 24), const SizedBox(width: 24),
_navigationItem( _navigationItem(
context: context, context: context,
text: TendersStrings.tendersTitle, text: TendersStrings.tendersTitle,
@@ -61,14 +64,17 @@ class DesktopNavigationWidget extends StatelessWidget {
if (currentIndex == 1) { if (currentIndex == 1) {
return; return;
} else { } else {
Router.neglect(context, () => TendersRouteData().go(context)); Router.neglect(
context,
() => const TendersRouteData().go(context),
);
context.read<TendersViewModel>().getTenders(); context.read<TendersViewModel>().getTenders();
} }
}, },
iconPath: AssetsManager.tenders, iconPath: AssetsManager.tenders,
activeIconPath: AssetsManager.tendersActive, activeIconPath: AssetsManager.tendersActive,
), ),
SizedBox(width: 24), const SizedBox(width: 24),
_navigationItem( _navigationItem(
context: context, context: context,
text: TendersStrings.contracts, text: TendersStrings.contracts,
@@ -84,7 +90,7 @@ class DesktopNavigationWidget extends StatelessWidget {
iconPath: AssetsManager.contracts, iconPath: AssetsManager.contracts,
activeIconPath: AssetsManager.contracts, activeIconPath: AssetsManager.contracts,
), ),
SizedBox(width: 24), const SizedBox(width: 24),
_navigationItem( _navigationItem(
context: context, context: context,
text: TendersStrings.notifications, text: TendersStrings.notifications,
@@ -95,7 +101,7 @@ class DesktopNavigationWidget extends StatelessWidget {
} else { } else {
Router.neglect( Router.neglect(
context, context,
() => NotificationRouteData().go(context), () => const NotificationRouteData().go(context),
); );
//context.read<notificationViewModel>().getTenders(); //context.read<notificationViewModel>().getTenders();
} }
@@ -103,7 +109,7 @@ class DesktopNavigationWidget extends StatelessWidget {
iconPath: AssetsManager.notify, iconPath: AssetsManager.notify,
activeIconPath: AssetsManager.notifyActive, activeIconPath: AssetsManager.notifyActive,
), ),
SizedBox(width: 24), const SizedBox(width: 24),
_navigationItem( _navigationItem(
context: context, context: context,
text: ProfileStrings.profileTitle, text: ProfileStrings.profileTitle,
@@ -112,13 +118,16 @@ class DesktopNavigationWidget extends StatelessWidget {
if (currentIndex == 4) { if (currentIndex == 4) {
return; return;
} else { } else {
Router.neglect(context, () => ProfileRouteData().go(context)); Router.neglect(
context,
() => const ProfileRouteData().go(context),
);
} }
}, },
iconPath: AssetsManager.profile, iconPath: AssetsManager.profile,
activeIconPath: AssetsManager.profileActive, activeIconPath: AssetsManager.profileActive,
), ),
Spacer(), const Spacer(),
if (haveFilter) if (haveFilter)
Builder( Builder(
builder: builder:
@@ -133,7 +142,7 @@ class DesktopNavigationWidget extends StatelessWidget {
}, },
), ),
), ),
SizedBox(width: 68), const SizedBox(width: 68),
], ],
), ),
); );
@@ -157,7 +166,7 @@ class DesktopNavigationWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SvgPicture.asset(isActive ? activeIconPath : iconPath), SvgPicture.asset(isActive ? activeIconPath : iconPath),
SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
text, text,
style: TextStyle( style: TextStyle(
+1 -1
View File
@@ -36,7 +36,7 @@ class _MainTabBarState extends State<MainTabBar> {
BoxShadow( BoxShadow(
color: Colors.black.withValues(alpha: 0.12), color: Colors.black.withValues(alpha: 0.12),
blurRadius: 4, blurRadius: 4,
offset: Offset(0, 2), offset: const Offset(0, 2),
), ),
], ],
), ),
@@ -30,7 +30,7 @@ class _SelectSubmissionBottomSheetState
padding: EdgeInsets.fromLTRB(24.0.w(), 24.0.h(), 24.0.w(), 33.0.h()), padding: EdgeInsets.fromLTRB(24.0.w(), 24.0.h(), 24.0.w(), 33.0.h()),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.backgroundColor, color: AppColors.backgroundColor,
borderRadius: BorderRadius.only( borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16.0), topLeft: Radius.circular(16.0),
topRight: Radius.circular(16.0), topRight: Radius.circular(16.0),
), ),
@@ -115,7 +115,7 @@ class _SelectSubmissionBottomSheetState
horizontal: 10.0.w(), horizontal: 10.0.w(),
vertical: 10.0.h(), vertical: 10.0.h(),
), ),
padding: EdgeInsets.all(3), padding: const EdgeInsets.all(3),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all( border: Border.all(
@@ -114,7 +114,7 @@ class _SelectSubmissionDialogState extends State<SelectSubmissionDialog> {
horizontal: 10.0.w(), horizontal: 10.0.w(),
vertical: 10.0.h(), vertical: 10.0.h(),
), ),
padding: EdgeInsets.all(3), padding: const EdgeInsets.all(3),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all( border: Border.all(
+19 -7
View File
@@ -35,7 +35,10 @@ class TabletNavigationWidget extends StatelessWidget {
if (currentIndex == 0) { if (currentIndex == 0) {
return; return;
} else { } else {
Router.neglect(context, () => HomeRouteData().go(context)); Router.neglect(
context,
() => const HomeRouteData().go(context),
);
context.read<HomeViewModel>().init(); context.read<HomeViewModel>().init();
} }
}, },
@@ -50,7 +53,10 @@ class TabletNavigationWidget extends StatelessWidget {
if (currentIndex == 1) { if (currentIndex == 1) {
return; return;
} else { } else {
Router.neglect(context, () => TendersRouteData().go(context)); Router.neglect(
context,
() => const TendersRouteData().go(context),
);
context.read<TendersViewModel>().getTenders(); context.read<TendersViewModel>().getTenders();
} }
}, },
@@ -65,8 +71,8 @@ class TabletNavigationWidget extends StatelessWidget {
if (currentIndex == 2) { if (currentIndex == 2) {
return; return;
} else { } else {
// context.pop(); // context.pop();
// Router.neglect(context, () => ProfileRouteData().go(context)); // Router.neglect(context, () => ProfileRouteData().go(context));
} }
}, },
iconPath: AssetsManager.contracts, iconPath: AssetsManager.contracts,
@@ -81,7 +87,10 @@ class TabletNavigationWidget extends StatelessWidget {
return; return;
} else { } else {
context.pop(); context.pop();
Router.neglect(context, () => NotificationRouteData().go(context)); Router.neglect(
context,
() => const NotificationRouteData().go(context),
);
} }
}, },
iconPath: AssetsManager.notify, iconPath: AssetsManager.notify,
@@ -96,7 +105,10 @@ class TabletNavigationWidget extends StatelessWidget {
return; return;
} else { } else {
context.pop(); context.pop();
Router.neglect(context, () => ProfileRouteData().go(context)); Router.neglect(
context,
() => const ProfileRouteData().go(context),
);
} }
}, },
iconPath: AssetsManager.profile, iconPath: AssetsManager.profile,
@@ -135,7 +147,7 @@ class TabletNavigationWidget extends StatelessWidget {
color: isActive ? AppColors.primaryColor : AppColors.grey60, color: isActive ? AppColors.primaryColor : AppColors.grey60,
), ),
), ),
Spacer(), const Spacer(),
Container( Container(
width: 4.0.w(), width: 4.0.w(),
height: 64.0.h(), height: 64.0.h(),
+3 -3
View File
@@ -46,14 +46,14 @@ class _DesktopTendersPageState extends State<DesktopTendersPage> {
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
body: Column( body: Column(
children: [ children: [
DesktopNavigationWidget( const DesktopNavigationWidget(
currentIndex: 1, // Tenders index currentIndex: 1, // Tenders index
), ),
Expanded( Expanded(
child: Consumer<TendersViewModel>( child: Consumer<TendersViewModel>(
builder: (context, viewModel, child) { builder: (context, viewModel, child) {
if (viewModel.isLoading) { if (viewModel.isLoading) {
return Expanded( return const Expanded(
child: Center( child: Center(
child: CircularProgressIndicator( child: CircularProgressIndicator(
color: AppColors.jellyBean, color: AppColors.jellyBean,
@@ -67,7 +67,7 @@ class _DesktopTendersPageState extends State<DesktopTendersPage> {
if ((viewModel.tendersResponse?.data?.tenders == null || if ((viewModel.tendersResponse?.data?.tenders == null ||
viewModel.tendersResponse!.data!.tenders!.isEmpty) && viewModel.tendersResponse!.data!.tenders!.isEmpty) &&
viewModel.isLoading == false) { viewModel.isLoading == false) {
return Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return SingleChildScrollView( return SingleChildScrollView(
child: SizedBox( child: SizedBox(
+2 -2
View File
@@ -49,7 +49,7 @@ class _MobileTendersPageState extends State<MobileTendersPage> {
body: Consumer<TendersViewModel>( body: Consumer<TendersViewModel>(
builder: (context, viewModel, child) { builder: (context, viewModel, child) {
if (viewModel.isLoading) { if (viewModel.isLoading) {
return Center( return const Center(
child: CircularProgressIndicator(color: AppColors.jellyBean), child: CircularProgressIndicator(color: AppColors.jellyBean),
); );
} }
@@ -60,7 +60,7 @@ class _MobileTendersPageState extends State<MobileTendersPage> {
if ((viewModel.tendersResponse?.data?.tenders == null || if ((viewModel.tendersResponse?.data?.tenders == null ||
viewModel.tendersResponse!.data!.tenders!.isEmpty) && viewModel.tendersResponse!.data!.tenders!.isEmpty) &&
viewModel.isLoading == false) { viewModel.isLoading == false) {
return Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return Padding( return Padding(
+3 -3
View File
@@ -33,12 +33,12 @@ class _TabletTendersPageState extends State<TabletTendersPage> {
key: key, key: key,
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
appBar: tabletAppBar(title: TendersStrings.tendersTitle, key: key), appBar: tabletAppBar(title: TendersStrings.tendersTitle, key: key),
drawer: TabletNavigationWidget(currentIndex: 1), drawer: const TabletNavigationWidget(currentIndex: 1),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Consumer<TendersViewModel>( child: Consumer<TendersViewModel>(
builder: (context, viewModel, child) { builder: (context, viewModel, child) {
if (viewModel.isLoading) { if (viewModel.isLoading) {
return Center( return const Center(
child: CircularProgressIndicator(color: AppColors.jellyBean), child: CircularProgressIndicator(color: AppColors.jellyBean),
); );
} }
@@ -48,7 +48,7 @@ class _TabletTendersPageState extends State<TabletTendersPage> {
if ((viewModel.tendersResponse?.data?.tenders == null || if ((viewModel.tendersResponse?.data?.tenders == null ||
viewModel.tendersResponse!.data!.tenders!.isEmpty) && viewModel.tendersResponse!.data!.tenders!.isEmpty) &&
viewModel.isLoading == false) { viewModel.isLoading == false) {
return Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return Padding( return Padding(
padding: EdgeInsets.only(right: 24.0.w(), top: 128.0.h()), padding: EdgeInsets.only(right: 24.0.w(), top: 128.0.h()),
+1 -1
View File
@@ -10,7 +10,7 @@ class TendersScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: MobileTendersPage(), mobile: MobileTendersPage(),
tablet: TabletTendersPage(), tablet: TabletTendersPage(),
desktop: DesktopTendersPage(), desktop: DesktopTendersPage(),
@@ -33,7 +33,7 @@ class _MainTendersSliderState extends State<MainTendersSlider> {
} }
pageController.previousPage( pageController.previousPage(
duration: Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
curve: Curves.easeInOutCubic, curve: Curves.easeInOutCubic,
); );
setState(() { setState(() {
@@ -57,7 +57,7 @@ class _MainTendersSliderState extends State<MainTendersSlider> {
} }
pageController.nextPage( pageController.nextPage(
duration: Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
curve: Curves.easeInOutCubic, curve: Curves.easeInOutCubic,
); );
setState(() { setState(() {
@@ -177,7 +177,7 @@ class _MainTendersSliderState extends State<MainTendersSlider> {
child: SizedBox( child: SizedBox(
width: 16.0.w(), width: 16.0.w(),
height: 16.0.w(), height: 16.0.w(),
child: CircularProgressIndicator( child: const CircularProgressIndicator(
strokeWidth: 2.0, strokeWidth: 2.0,
color: AppColors.jellyBean, color: AppColors.jellyBean,
), ),
+2 -2
View File
@@ -75,7 +75,7 @@ class TenderCard extends StatelessWidget {
], ],
), ),
), ),
Spacer(), const Spacer(),
// Bottom section with progress and actions // Bottom section with progress and actions
Padding( Padding(
padding: EdgeInsets.all(16.0.w()), padding: EdgeInsets.all(16.0.w()),
@@ -254,7 +254,7 @@ class TenderCard extends StatelessWidget {
// Country flag placeholder // Country flag placeholder
tender.countryCode != null tender.countryCode != null
? Flag(countryCode: tender.countryCode!) ? Flag(countryCode: tender.countryCode!)
: Flag(countryCode: ''), : const Flag(countryCode: ''),
], ],
), ),
); );
@@ -41,7 +41,7 @@ class _YourTendersDesktopPageState extends State<YourTendersDesktopPage>
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
body: Column( body: Column(
children: [ children: [
DesktopNavigationWidget(currentIndex: 1), // Tenders index const DesktopNavigationWidget(currentIndex: 1), // Tenders index
Expanded( Expanded(
child: SizedBox( child: SizedBox(
width: 740, width: 740,
@@ -117,7 +117,7 @@ class _YourTendersDesktopPageState extends State<YourTendersDesktopPage>
color: AppColors.grey60, color: AppColors.grey60,
), ),
), ),
SizedBox(width: 10.0.w()), SizedBox(width: 10.0.w()),
InkWell( InkWell(
onTap: () async { onTap: () async {
final selectedPage = await showDialog<int>( final selectedPage = await showDialog<int>(
@@ -126,7 +126,9 @@ class _YourTendersDesktopPageState extends State<YourTendersDesktopPage>
return AlertDialog( return AlertDialog(
backgroundColor: backgroundColor:
AppColors.backgroundColor, AppColors.backgroundColor,
title: const Text(YourTendersStrings.selectPage), title: const Text(
YourTendersStrings.selectPage,
),
content: SizedBox( content: SizedBox(
width: 200.0.w(), width: 200.0.w(),
height: 300.0.h(), height: 300.0.h(),
@@ -165,7 +167,7 @@ class _YourTendersDesktopPageState extends State<YourTendersDesktopPage>
), ),
child: Row( child: Row(
children: [ children: [
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
Text( Text(
'${viewModel.currentPage}', '${viewModel.currentPage}',
style: TextStyle( style: TextStyle(
@@ -174,14 +176,14 @@ class _YourTendersDesktopPageState extends State<YourTendersDesktopPage>
color: AppColors.grey70, color: AppColors.grey70,
), ),
), ),
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
const Icon(Icons.arrow_drop_down), const Icon(Icons.arrow_drop_down),
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
], ],
), ),
), ),
), ),
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
Text( Text(
YourTendersStrings.of, YourTendersStrings.of,
style: TextStyle( style: TextStyle(
@@ -190,7 +192,7 @@ class _YourTendersDesktopPageState extends State<YourTendersDesktopPage>
color: AppColors.grey60, color: AppColors.grey60,
), ),
), ),
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
Text( Text(
'${viewModel.totalPages}', '${viewModel.totalPages}',
style: TextStyle( style: TextStyle(
@@ -40,7 +40,7 @@ class _YourTendersMobilePageState extends State<YourTendersMobilePage> {
appBar: appBar(context: context, title: YourTendersStrings.yourTenders), appBar: appBar(context: context, title: YourTendersStrings.yourTenders),
body: Column( body: Column(
children: [ children: [
FilterButton(platformType: PlatformType.mobile), const FilterButton(platformType: PlatformType.mobile),
Expanded( Expanded(
child: Consumer<YourTendersViewModel>( child: Consumer<YourTendersViewModel>(
builder: (context, viewModel, child) { builder: (context, viewModel, child) {
@@ -31,7 +31,7 @@ class _YourTendersScreenState extends State<YourTendersScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SizeConfig.init(context); SizeConfig.init(context);
return ResponsiveBuilder( return const ResponsiveBuilder(
mobile: YourTendersMobilePage(), mobile: YourTendersMobilePage(),
tablet: YourTendersTabletPage(), tablet: YourTendersTabletPage(),
desktop: YourTendersDesktopPage(), desktop: YourTendersDesktopPage(),
@@ -7,6 +7,7 @@ import 'package:tm_app/views/your_tenders/widgets/filter_button.dart';
import 'package:tm_app/views/your_tenders/widgets/liked_disliked_tenders_list.dart'; import 'package:tm_app/views/your_tenders/widgets/liked_disliked_tenders_list.dart';
import 'package:tm_app/views/your_tenders/widgets/tablet_desktop_appbar.dart'; import 'package:tm_app/views/your_tenders/widgets/tablet_desktop_appbar.dart';
import 'package:tm_app/views/your_tenders/widgets/tenders_submitted.dart'; import 'package:tm_app/views/your_tenders/widgets/tenders_submitted.dart';
import '../../../core/constants/tender_feedback.dart'; import '../../../core/constants/tender_feedback.dart';
import '../../shared/tablet_navigation_widget.dart'; import '../../shared/tablet_navigation_widget.dart';
import '../../shared/tender_app_bar.dart'; import '../../shared/tender_app_bar.dart';
@@ -42,19 +43,19 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
key: key, key: key,
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
appBar: tabletAppBar(title: YourTendersStrings.yourTenders, key: key), appBar: tabletAppBar(title: YourTendersStrings.yourTenders, key: key),
drawer: TabletNavigationWidget(currentIndex: 1), drawer: const TabletNavigationWidget(currentIndex: 1),
body: Center( body: Center(
child: SizedBox( child: SizedBox(
width: 720, width: 720,
child: Column( child: Column(
children: [ children: [
SizedBox(height: 64.0), const SizedBox(height: 64.0),
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0.w()), padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
child: TabletDesktopAppbar(), child: const TabletDesktopAppbar(),
), ),
SizedBox(height: 24.0.h()), SizedBox(height: 24.0.h()),
FilterButton(platformType: PlatformType.tabletDesktop), const FilterButton(platformType: PlatformType.tabletDesktop),
Expanded( Expanded(
child: Consumer<YourTendersViewModel>( child: Consumer<YourTendersViewModel>(
@@ -108,7 +109,7 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
return Column( return Column(
children: [ children: [
Expanded(child: content), Expanded(child: content),
SizedBox(height: 10.0.h()), SizedBox(height: 10.0.h()),
Row( Row(
children: [ children: [
@@ -121,15 +122,18 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
color: AppColors.grey60, color: AppColors.grey60,
), ),
), ),
SizedBox(width: 10.0.w()), SizedBox(width: 10.0.w()),
InkWell( InkWell(
onTap: () async { onTap: () async {
final selectedPage = await showDialog<int>( final selectedPage = await showDialog<int>(
context: context, context: context,
builder: (context) { builder: (context) {
return AlertDialog( return AlertDialog(
backgroundColor: AppColors.backgroundColor, backgroundColor:
title: const Text(YourTendersStrings.selectPage), AppColors.backgroundColor,
title: const Text(
YourTendersStrings.selectPage,
),
content: SizedBox( content: SizedBox(
width: 200.0.w(), width: 200.0.w(),
height: 300.0.h(), height: 300.0.h(),
@@ -138,11 +142,14 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
itemBuilder: (context, index) { itemBuilder: (context, index) {
final pageNumber = index + 1; final pageNumber = index + 1;
return ListTile( return ListTile(
title: Text('${YourTendersStrings.page} $pageNumber'), title: Text(
onTap: () => Navigator.pop( '${YourTendersStrings.page} $pageNumber',
context,
pageNumber,
), ),
onTap:
() => Navigator.pop(
context,
pageNumber,
),
); );
}, },
), ),
@@ -165,7 +172,7 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
), ),
child: Row( child: Row(
children: [ children: [
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
Text( Text(
'${viewModel.currentPage}', '${viewModel.currentPage}',
style: TextStyle( style: TextStyle(
@@ -174,14 +181,14 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
color: AppColors.grey70, color: AppColors.grey70,
), ),
), ),
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
const Icon(Icons.arrow_drop_down), const Icon(Icons.arrow_drop_down),
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
], ],
), ),
), ),
), ),
SizedBox(width: 5.0), const SizedBox(width: 5.0),
Text( Text(
YourTendersStrings.page, YourTendersStrings.page,
style: TextStyle( style: TextStyle(
@@ -190,7 +197,7 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
color: AppColors.grey60, color: AppColors.grey60,
), ),
), ),
SizedBox(width: 5.0.w()), SizedBox(width: 5.0.w()),
Text( Text(
'${viewModel.totalPages}', '${viewModel.totalPages}',
style: TextStyle( style: TextStyle(
@@ -55,8 +55,8 @@ class FilterButton extends StatelessWidget {
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Icon(Icons.filter_list, color: Colors.blue), const Icon(Icons.filter_list, color: Colors.blue),
SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
YourTendersStrings.filter, YourTendersStrings.filter,
style: TextStyle( style: TextStyle(
@@ -145,7 +145,7 @@ class TenderCard extends StatelessWidget {
), ),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
Spacer(), const Spacer(),
// Bottom section with location and action button // Bottom section with location and action button
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -171,14 +171,14 @@ class TenderCard extends StatelessWidget {
SizedBox(width: 8.0.w()), SizedBox(width: 8.0.w()),
tender.countryCode != null tender.countryCode != null
? Flag(countryCode: tender.countryCode!) ? Flag(countryCode: tender.countryCode!)
: Flag(countryCode: ''), : const Flag(countryCode: ''),
], ],
), ),
), ),
// Self Control button // Self Control button
status == TenderApprovalStatus.rejected.value status == TenderApprovalStatus.rejected.value
? SizedBox.shrink() ? const SizedBox.shrink()
: Container( : Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 16.0.w(), horizontal: 16.0.w(),
@@ -91,7 +91,7 @@ class _TendersSubmittedState extends State<TendersSubmitted> {
child: SizedBox( child: SizedBox(
width: 24.0.w(), width: 24.0.w(),
height: 24.0.h(), height: 24.0.h(),
child: CircularProgressIndicator( child: const CircularProgressIndicator(
color: AppColors.secondary50, color: AppColors.secondary50,
strokeWidth: 2, strokeWidth: 2,
), ),