dark colors added
This commit is contained in:
@@ -91,10 +91,20 @@ class AppColors {
|
|||||||
static Color get textBlue =>
|
static Color get textBlue =>
|
||||||
_isDarkMode ? const Color(0xFF3A87FF) : const Color(0xFF0164FF);
|
_isDarkMode ? const Color(0xFF3A87FF) : const Color(0xFF0164FF);
|
||||||
|
|
||||||
|
static Color get primary10 =>
|
||||||
|
_isDarkMode
|
||||||
|
? const Color.fromRGBO(104, 151, 151, 0.2)
|
||||||
|
: const Color(0xFFEAF8F9);
|
||||||
|
|
||||||
static Color get primary20 =>
|
static Color get primary20 =>
|
||||||
_isDarkMode
|
_isDarkMode
|
||||||
? const Color(0x7386a533).withValues(alpha: 0.2)
|
? const Color.fromRGBO(111, 134, 165, 0.2)
|
||||||
: const Color(0xFFE5EFFF);
|
: const Color.fromRGBO(11, 134, 165, 0.2);
|
||||||
|
|
||||||
|
static Color get orange10 =>
|
||||||
|
_isDarkMode
|
||||||
|
? const Color.fromRGBO(131, 120, 105, 0.2)
|
||||||
|
: const Color(0xFFFFF2DE);
|
||||||
|
|
||||||
// Primary color variations
|
// Primary color variations
|
||||||
static const Color primary2 = Color(0xFFE5EFFF);
|
static const Color primary2 = Color(0xFFE5EFFF);
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
// main.dart
|
// main.dart
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:tm_app/core/config/dependencies.dart';
|
import 'package:tm_app/core/config/dependencies.dart';
|
||||||
@@ -41,6 +43,14 @@ class _MyAppState extends State<MyApp> {
|
|||||||
|
|
||||||
return MaterialApp.router(
|
return MaterialApp.router(
|
||||||
title: 'Flutter Demo',
|
title: 'Flutter Demo',
|
||||||
|
scrollBehavior: MaterialScrollBehavior().copyWith(
|
||||||
|
dragDevices: {
|
||||||
|
PointerDeviceKind.mouse,
|
||||||
|
PointerDeviceKind.touch,
|
||||||
|
PointerDeviceKind.stylus,
|
||||||
|
PointerDeviceKind.unknown,
|
||||||
|
},
|
||||||
|
),
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
brightness:
|
brightness:
|
||||||
themeProvider.isDarkMode ? Brightness.dark : Brightness.light,
|
themeProvider.isDarkMode ? Brightness.dark : Brightness.light,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tm_app/core/routes/app_routes.dart';
|
import 'package:tm_app/core/routes/app_routes.dart';
|
||||||
|
import 'package:tm_app/views/shared/tender_app_bar.dart';
|
||||||
|
|
||||||
import '../../../core/constants/strings.dart';
|
import '../../../core/constants/strings.dart';
|
||||||
import '../../core/theme/colors.dart';
|
import '../../core/theme/colors.dart';
|
||||||
@@ -16,7 +17,7 @@ class HomeScreen extends StatelessWidget {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
body: _body(context),
|
body: _body(context),
|
||||||
appBar: _appbar(),
|
appBar: tenderAppBar(title: AppStrings.home),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -52,37 +53,6 @@ class HomeScreen extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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.home,
|
|
||||||
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,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _progressBarsRow() {
|
Widget _progressBarsRow() {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
@@ -122,7 +92,7 @@ class HomeScreen extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
StatisticsCard(
|
StatisticsCard(
|
||||||
backgroundColor: Color(0xFFEAF8F9),
|
backgroundColor: AppColors.primary10,
|
||||||
iconPath: 'assets/icons/thumb.svg',
|
iconPath: 'assets/icons/thumb.svg',
|
||||||
title: AppStrings.approvedTenders,
|
title: AppStrings.approvedTenders,
|
||||||
amount: '03',
|
amount: '03',
|
||||||
@@ -141,7 +111,7 @@ class HomeScreen extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
StatisticsCard(
|
StatisticsCard(
|
||||||
backgroundColor: Color(0xFFFFF2E0),
|
backgroundColor: AppColors.orange10,
|
||||||
iconPath: 'assets/icons/shield.svg',
|
iconPath: 'assets/icons/shield.svg',
|
||||||
title: AppStrings.tenderValue,
|
title: AppStrings.tenderValue,
|
||||||
amount: '\$250,000',
|
amount: '\$250,000',
|
||||||
@@ -150,7 +120,7 @@ class HomeScreen extends StatelessWidget {
|
|||||||
onTap: () {},
|
onTap: () {},
|
||||||
),
|
),
|
||||||
StatisticsCard(
|
StatisticsCard(
|
||||||
backgroundColor: Color(0xFFF4F4F4),
|
backgroundColor: AppColors.grey10,
|
||||||
iconPath: 'assets/icons/edit.svg',
|
iconPath: 'assets/icons/edit.svg',
|
||||||
title: AppStrings.thunderStatus,
|
title: AppStrings.thunderStatus,
|
||||||
amount: '23',
|
amount: '23',
|
||||||
@@ -187,3 +157,39 @@ class HomeScreen extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TenderAppBar extends StatelessWidget {
|
||||||
|
const TenderAppBar({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
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.home,
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import '../../core/utils/size_config.dart';
|
|||||||
|
|
||||||
class StatisticsCard extends StatelessWidget {
|
class StatisticsCard extends StatelessWidget {
|
||||||
const StatisticsCard({
|
const StatisticsCard({
|
||||||
super.key,
|
|
||||||
required this.backgroundColor,
|
required this.backgroundColor,
|
||||||
required this.iconPath,
|
required this.iconPath,
|
||||||
required this.title,
|
required this.title,
|
||||||
@@ -13,6 +12,7 @@ class StatisticsCard extends StatelessWidget {
|
|||||||
required this.textColor,
|
required this.textColor,
|
||||||
required this.onTap,
|
required this.onTap,
|
||||||
required this.enableTap,
|
required this.enableTap,
|
||||||
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
final Color backgroundColor;
|
final Color backgroundColor;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tm_app/core/constants/strings.dart';
|
import 'package:tm_app/core/constants/strings.dart';
|
||||||
import 'package:tm_app/core/utils/size_config.dart';
|
import 'package:tm_app/core/utils/size_config.dart';
|
||||||
|
import 'package:tm_app/views/shared/tender_app_bar.dart';
|
||||||
|
|
||||||
import '../../core/theme/colors.dart';
|
import '../../core/theme/colors.dart';
|
||||||
import '../../widgets/theme_toggle.dart';
|
import '../../widgets/theme_toggle.dart';
|
||||||
@@ -13,34 +14,7 @@ class ProfileScreen extends StatelessWidget {
|
|||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
appBar: PreferredSize(
|
appBar: tenderAppBar(title: AppStrings.profile),
|
||||||
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.profile,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: AppColors.primaryTextColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Image.asset(
|
|
||||||
'assets/icons/tenderLogo.png',
|
|
||||||
width: 59.0.w(),
|
|
||||||
height: 28.0.h(),
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 24.0.w(),
|
horizontal: 24.0.w(),
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:tm_app/core/constants/assets.dart';
|
||||||
|
import 'package:tm_app/core/theme/colors.dart';
|
||||||
|
import 'package:tm_app/core/utils/size_config.dart';
|
||||||
|
|
||||||
|
PreferredSize tenderAppBar({required String title}) {
|
||||||
|
return PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(kToolbarHeight.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(
|
||||||
|
title,
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferredSize appBar({required String title, required BuildContext context}) {
|
||||||
|
return PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(kToolbarHeight.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: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
AssetsManager.arrowLeft,
|
||||||
|
width: 24.0.w(),
|
||||||
|
height: 24.0.h(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 2.0.w()),
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColors.grey70,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tm_app/core/constants/strings.dart';
|
import 'package:tm_app/core/constants/strings.dart';
|
||||||
|
import 'package:tm_app/views/shared/tender_app_bar.dart';
|
||||||
|
|
||||||
import '../../core/theme/colors.dart';
|
import '../../core/theme/colors.dart';
|
||||||
import '../../core/utils/size_config.dart';
|
import '../../core/utils/size_config.dart';
|
||||||
@@ -37,7 +38,7 @@ class _TendersScreenState extends State<TendersScreen>
|
|||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
appBar: _appbar(),
|
appBar: tenderAppBar(title: AppStrings.tendersTitle),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 24.0.h()),
|
padding: EdgeInsets.symmetric(vertical: 24.0.h()),
|
||||||
@@ -52,35 +53,4 @@ 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,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class TenderCard extends StatelessWidget {
|
|||||||
height: 24.0.h(),
|
height: 24.0.h(),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.primary2,
|
color: AppColors.primary20,
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -226,7 +226,7 @@ class TenderCard extends StatelessWidget {
|
|||||||
height: 40.0.h(),
|
height: 40.0.h(),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.primary2,
|
color: AppColors.primary20,
|
||||||
borderRadius: BorderRadius.circular(100),
|
borderRadius: BorderRadius.circular(100),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tm_app/core/constants/strings.dart';
|
import 'package:tm_app/core/constants/strings.dart';
|
||||||
import 'package:tm_app/core/theme/colors.dart';
|
import 'package:tm_app/core/theme/colors.dart';
|
||||||
import 'package:tm_app/core/utils/size_config.dart';
|
import 'package:tm_app/views/shared/tender_app_bar.dart';
|
||||||
import 'package:tm_app/views/your_tenders/widgets/approved_tenders.dart';
|
import 'package:tm_app/views/your_tenders/widgets/approved_tenders.dart';
|
||||||
import 'package:tm_app/views/your_tenders/widgets/tenders_submitted.dart';
|
import 'package:tm_app/views/your_tenders/widgets/tenders_submitted.dart';
|
||||||
|
|
||||||
@@ -35,34 +35,7 @@ class _YourTendersScreenState extends State<YourTendersScreen>
|
|||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
appBar: PreferredSize(
|
appBar: tenderAppBar(title: AppStrings.yourTenders),
|
||||||
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.yourTenders,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 20.0.sp(),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Color(0xFF222222),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Image.asset(
|
|
||||||
'assets/icons/tenderLogo.png',
|
|
||||||
width: 59.0.w(),
|
|
||||||
height: 28.0.h(),
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
MainTabBar(
|
MainTabBar(
|
||||||
|
|||||||
Reference in New Issue
Block a user