cleared console problems
This commit is contained in:
@@ -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(),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user