From 913eea198460a1404577be68b862de2d80671703 Mon Sep 17 00:00:00 2001
From: Kelvin Samuel <kelvinbalkes@gmail.com>
Date: Fri, 13 May 2022 11:31:37 +0700
Subject: [PATCH] Delete constants file and move to utils file

---
 lib/components/categories.dart           | 2 +-
 lib/components/color_dot.dart            | 2 +-
 lib/components/details_screen.dart       | 2 +-
 lib/components/new_arrival_products.dart | 2 +-
 lib/components/popular_products.dart     | 2 +-
 lib/components/product_card.dart         | 2 +-
 lib/components/search_form.dart          | 2 +-
 lib/constants.dart                       | 7 -------
 lib/screens/home_screen.dart             | 2 +-
 lib/utils/utils.dart                     | 6 ++++++
 10 files changed, 14 insertions(+), 15 deletions(-)
 delete mode 100644 lib/constants.dart

diff --git a/lib/components/categories.dart b/lib/components/categories.dart
index fddc2b3..535911a 100644
--- a/lib/components/categories.dart
+++ b/lib/components/categories.dart
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
 import 'package:flutter_svg/flutter_svg.dart';
 import 'package:nekoya_flutter/components/Category.dart';
 
-import '../../../constants.dart';
+import '../utils/utils.dart';
 
 class Categories extends StatelessWidget {
   const Categories({
diff --git a/lib/components/color_dot.dart b/lib/components/color_dot.dart
index 62e3349..d59df7b 100644
--- a/lib/components/color_dot.dart
+++ b/lib/components/color_dot.dart
@@ -1,6 +1,6 @@
 import 'package:flutter/material.dart';
 
-import '../../../constants.dart';
+import '../utils/utils.dart';
 
 class ColorDot extends StatelessWidget {
   const ColorDot({
diff --git a/lib/components/details_screen.dart b/lib/components/details_screen.dart
index 1586b1e..da1de94 100644
--- a/lib/components/details_screen.dart
+++ b/lib/components/details_screen.dart
@@ -1,6 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_svg/svg.dart';
-import 'package:nekoya_flutter/constants.dart';
+import '../utils/utils.dart';
 import 'package:nekoya_flutter/screens/productcoba.dart';
 import 'package:nekoya_flutter/screens/products.dart';
 
diff --git a/lib/components/new_arrival_products.dart b/lib/components/new_arrival_products.dart
index bfa28bb..11dddb4 100644
--- a/lib/components/new_arrival_products.dart
+++ b/lib/components/new_arrival_products.dart
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
 import 'package:nekoya_flutter/screens/productcoba.dart';
 import 'package:nekoya_flutter/components/details_screen.dart';
 
-import '../../../constants.dart';
+import '../utils/utils.dart';
 import 'product_card.dart';
 import 'section_title.dart';
 
diff --git a/lib/components/popular_products.dart b/lib/components/popular_products.dart
index 3118320..f22d170 100644
--- a/lib/components/popular_products.dart
+++ b/lib/components/popular_products.dart
@@ -1,7 +1,7 @@
 import 'package:flutter/material.dart';
 import 'package:nekoya_flutter/screens/productcoba.dart';
 
-import '../../../constants.dart';
+import '../utils/utils.dart';
 import 'product_card.dart';
 import 'section_title.dart';
 
diff --git a/lib/components/product_card.dart b/lib/components/product_card.dart
index 73b1442..90d7f3f 100644
--- a/lib/components/product_card.dart
+++ b/lib/components/product_card.dart
@@ -1,6 +1,6 @@
 import 'package:flutter/material.dart';
 
-import '../../../constants.dart';
+import '../utils/utils.dart';
 
 class ProductCard extends StatelessWidget {
   const ProductCard({
diff --git a/lib/components/search_form.dart b/lib/components/search_form.dart
index 488ba7a..46dba28 100644
--- a/lib/components/search_form.dart
+++ b/lib/components/search_form.dart
@@ -1,7 +1,7 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_svg/flutter_svg.dart';
 
-import '../../../constants.dart';
+import '../utils/utils.dart';
 
 const OutlineInputBorder outlineInputBorder = OutlineInputBorder(
   borderRadius: BorderRadius.all(Radius.circular(12)),
diff --git a/lib/constants.dart b/lib/constants.dart
deleted file mode 100644
index cdb0130..0000000
--- a/lib/constants.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-import 'package:flutter/material.dart';
-
-const Color primaryColor = Color(0xFFF67952);
-const Color bgColor = Color(0xFFFBFBFD);
-
-const double defaultPadding = 16.0;
-const double defaultBorderRadius = 12.0;
diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart
index 9afcf28..92ad996 100644
--- a/lib/screens/home_screen.dart
+++ b/lib/screens/home_screen.dart
@@ -1,6 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_svg/flutter_svg.dart';
-import 'package:nekoya_flutter/constants.dart';
+import 'package:nekoya_flutter/utils/utils.dart';
 
 import 'package:nekoya_flutter/components/categories.dart';
 import 'package:nekoya_flutter/components/new_arrival_products.dart';
diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart
index b9c3cc8..862355b 100644
--- a/lib/utils/utils.dart
+++ b/lib/utils/utils.dart
@@ -12,6 +12,12 @@ class HideScrollGlow extends ScrollBehavior {
   }
 }
 
+const Color primaryColor = Color(0xFFF67952);
+const Color bgColor = Color(0xFFFBFBFD);
+
+const double defaultPadding = 16.0;
+const double defaultBorderRadius = 12.0;
+
 const kHintTextStyle = TextStyle(
   color: Colors.white54,
   fontFamily: 'OpenSans',