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