Skip to content

Commit

Permalink
Color changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinpal committed Jul 31, 2023
1 parent c8076fc commit 1d4ec48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 26 deletions.
32 changes: 8 additions & 24 deletions lib/helpers/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,8 @@ import 'package:flutter/material.dart';

String expensConstant = 'Expense';
String incomeConstant = 'Income';
const Color customColorPrimary = Color(0xFF00e600);
const Color customDangerColor = Color(0xFFFF0000);

MaterialColor customSwatch = const MaterialColor(
0xFF00e600,
<int, Color>{
50: Color(0xFFE8F5E9),
100: Color(0xFFC8E6C9),
200: Color(0xFFA5D6A7),
300: Color(0xFF81C784),
400: Color(0xFF66BB6A),
500: Color(0xFF00e600),
600: Color(0xFF43A047),
700: Color(0xFF388E3C),
800: Color(0xFF2E7D32),
900: Color(0xFF1B5E20),
},
);
const Color customColorPrimary = Colors.green;
const Color customDangerColor = Colors.red;

List expenseCategories = [
{
Expand Down Expand Up @@ -80,17 +64,17 @@ List incomeCategories = [
];

List transactionTypes = [
{
'name': expensConstant,
'icon': Icons.shopping_cart,
'color': customDangerColor,
'categories': expenseCategories
},
{
'name': incomeConstant,
'icon': Icons.attach_money,
'color': customColorPrimary,
'categories': incomeCategories
},
{
'name': expensConstant,
'icon': Icons.shopping_cart,
'color': customDangerColor,
'categories': expenseCategories
}
];

Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CashCompass extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ThemeData theme = ThemeData(
primarySwatch: customSwatch,
primarySwatch: Colors.green,
colorScheme: const ColorScheme.light().copyWith(
primary: customColorPrimary,
secondary: customColorPrimary,
Expand Down
3 changes: 2 additions & 1 deletion lib/screens/splash_screen.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:cash_compass/helpers/constants.dart';
import 'package:cash_compass/screens/main_screen.dart';
import 'package:flutter/material.dart';

Expand Down Expand Up @@ -26,7 +27,7 @@ class _SplashScreenState extends State<SplashScreen> {
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: const Color(0xFF00d72e),
backgroundColor: customColorPrimary,
body: Stack(
children: <Widget>[
Center(
Expand Down

0 comments on commit 1d4ec48

Please sign in to comment.