✨implement light and dark theme
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
|
||||
import '../../core/constants/colors.dart';
|
||||
import '../../core/theme/colors.dart';
|
||||
import '../../core/utils/size_config.dart';
|
||||
import 'widgets/main_tenders_slider.dart';
|
||||
import 'widgets/widgets.dart';
|
||||
|
||||
class TendersScreen extends StatefulWidget {
|
||||
const TendersScreen({super.key});
|
||||
@@ -34,18 +34,16 @@ class _TendersScreenState extends State<TendersScreen>
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
body: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
appBar: _appbar(),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.0.h()),
|
||||
child: Column(
|
||||
children: [
|
||||
TenderAppBar(),
|
||||
SizedBox(height: 24.0.h()),
|
||||
// MainTabBar(controller: controller),
|
||||
SizedBox(height: 24.0.h()),
|
||||
MainTendersSlider(),
|
||||
],
|
||||
),
|
||||
@@ -54,4 +52,35 @@ class _TendersScreenState extends State<TendersScreen>
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
PreferredSize _appbar() {
|
||||
return PreferredSize(
|
||||
preferredSize: Size.fromHeight(56.0.h()),
|
||||
child: Container(
|
||||
color: AppColors.backgroundColor,
|
||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
height: 56.0.h(),
|
||||
width: double.infinity,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppStrings.tendersTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.grey70,
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
'assets/icons/tenderLogo.png',
|
||||
width: 59.0.w(),
|
||||
height: 28.0.h(),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:tm_app/core/constants/colors.dart';
|
||||
import 'package:tm_app/core/routes/app_routes.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
@@ -86,7 +86,7 @@ class _MainTendersSliderState extends State<MainTendersSlider> {
|
||||
children: [
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 693.0.h(),
|
||||
height: 694.0.h(),
|
||||
child: PageView.builder(
|
||||
controller: pageController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/constants/colors.dart';
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
|
||||
class TenderActionButtons extends StatelessWidget {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/constants/colors.dart';
|
||||
import '../../../core/constants/strings.dart';
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
|
||||
class TenderAppBar extends StatelessWidget {
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/constants/colors.dart';
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
import 'tender_action_buttons.dart';
|
||||
|
||||
@@ -50,7 +50,7 @@ class TenderCard extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.grey0,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: AppColors.borderColor),
|
||||
border: Border.all(color: AppColors.grey30),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -75,10 +75,7 @@ class TenderCard extends StatelessWidget {
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 24.0.h(),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.0.w(),
|
||||
vertical: 4.0.h(),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primary2,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
@@ -89,7 +86,7 @@ class TenderCard extends StatelessWidget {
|
||||
Text(
|
||||
'Deadline:',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainBlue,
|
||||
color: AppColors.textBlue,
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@@ -134,7 +131,7 @@ class TenderCard extends StatelessWidget {
|
||||
Text(
|
||||
tenderId,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey60,
|
||||
color: AppColors.grey,
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
@@ -155,7 +152,7 @@ class TenderCard extends StatelessWidget {
|
||||
Text(
|
||||
'Match with your profile',
|
||||
style: TextStyle(
|
||||
color: AppColors.primaryTextColor,
|
||||
color: AppColors.grey80,
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@@ -163,7 +160,7 @@ class TenderCard extends StatelessWidget {
|
||||
Text(
|
||||
'${matchPercentage.toInt()}%',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF2484A8),
|
||||
color: AppColors.secondaryTextColor,
|
||||
fontSize: 16.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
@@ -177,7 +174,7 @@ class TenderCard extends StatelessWidget {
|
||||
width: double.infinity,
|
||||
height: 4.0.h(),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.grey10,
|
||||
color: AppColors.grey20,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
child: FractionallySizedBox(
|
||||
@@ -185,7 +182,7 @@ class TenderCard extends StatelessWidget {
|
||||
widthFactor: matchPercentage / 100,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF34BC9B),
|
||||
color: AppColors.secondary50,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
),
|
||||
@@ -205,7 +202,7 @@ class TenderCard extends StatelessWidget {
|
||||
Text(
|
||||
location,
|
||||
style: TextStyle(
|
||||
color: AppColors.primaryTextColor,
|
||||
color: AppColors.grey80,
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user