diff --git a/assets/icon/Icon.png b/assets/icon/Icon.png new file mode 100644 index 0000000..8c6693e Binary files /dev/null and b/assets/icon/Icon.png differ diff --git a/assets/icon/icon.png b/assets/icon/icon.png deleted file mode 100644 index 2249f08..0000000 Binary files a/assets/icon/icon.png and /dev/null differ diff --git a/assets/ofa_logo.webp b/assets/ofa_logo.webp index 7e87896..b4a2fab 100644 Binary files a/assets/ofa_logo.webp and b/assets/ofa_logo.webp differ diff --git a/lib/pages/add_category_page.dart b/lib/pages/add_category_page.dart index ea0a76f..aa0a0c5 100644 --- a/lib/pages/add_category_page.dart +++ b/lib/pages/add_category_page.dart @@ -3,7 +3,7 @@ import 'package:gap/gap.dart'; import 'package:internet_connection_checker/internet_connection_checker.dart'; import 'package:pharmacy_mobile/tables/ref_categories.dart'; import 'package:pharmacy_mobile/widgets/button_widget.dart'; -import 'package:pharmacy_mobile/widgets/form_border_widget.dart'; +import 'package:pharmacy_mobile/widgets/form_border_widget2.dart'; import 'package:pharmacy_mobile/widgets/input_widget.dart'; import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; import 'package:pharmacy_mobile/widgets/snackbar_widget.dart'; @@ -66,7 +66,7 @@ class _AddCategoryPageState extends State { const Gap(32), const TextWidget(text: 'Add Category'), const Gap(16), - FormBorderWidget( + FormBorderWidget2( color: 'blue', child: Form( key: _formKey, diff --git a/lib/pages/add_generics_page.dart b/lib/pages/add_generics_page.dart index d5cfabd..479af4e 100644 --- a/lib/pages/add_generics_page.dart +++ b/lib/pages/add_generics_page.dart @@ -6,6 +6,7 @@ import 'package:pharmacy_mobile/tables/ref_generic_names.dart'; import 'package:pharmacy_mobile/widgets/button_widget.dart'; import 'package:pharmacy_mobile/widgets/dropdown_widget.dart'; import 'package:pharmacy_mobile/widgets/form_border_widget.dart'; +import 'package:pharmacy_mobile/widgets/form_border_widget2.dart'; import 'package:pharmacy_mobile/widgets/input_widget.dart'; import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; import 'package:pharmacy_mobile/widgets/snackbar_widget.dart'; @@ -130,7 +131,7 @@ class _AddGenericsPageState extends State { const Gap(32), const TextWidget(text: 'Add Generics'), const Gap(16), - FormBorderWidget( + FormBorderWidget2( color: 'blue', child: Form( key: _formKey, diff --git a/lib/pages/add_medicine_page.dart b/lib/pages/add_medicine_page.dart index 93f750d..dfb6ddd 100644 --- a/lib/pages/add_medicine_page.dart +++ b/lib/pages/add_medicine_page.dart @@ -12,6 +12,7 @@ import 'package:pharmacy_mobile/widgets/button_widget.dart'; import 'package:pharmacy_mobile/widgets/dropdown_widget.dart'; import 'package:pharmacy_mobile/widgets/dropdown_wrappermulti_widget.dart'; import 'package:pharmacy_mobile/widgets/form_border_widget.dart'; +import 'package:pharmacy_mobile/widgets/form_border_widget2.dart'; import 'package:pharmacy_mobile/widgets/input_widget.dart'; import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; import 'package:pharmacy_mobile/widgets/snackbar_widget.dart'; @@ -199,7 +200,7 @@ class _AddMedicinePageState extends State { const Gap(32), const TextWidget(text: 'Add Medicine'), const Gap(16), - FormBorderWidget( + FormBorderWidget2( color: 'green', child: Form( key: _formKey, diff --git a/lib/pages/add_stock_page.dart b/lib/pages/add_stock_page.dart index 94cd283..460ce46 100644 --- a/lib/pages/add_stock_page.dart +++ b/lib/pages/add_stock_page.dart @@ -6,6 +6,7 @@ import 'package:pharmacy_mobile/widgets/button_widget.dart'; import 'package:pharmacy_mobile/widgets/datepicker_widget.dart'; import 'package:pharmacy_mobile/widgets/dropdown_widget.dart'; import 'package:pharmacy_mobile/widgets/form_border_widget.dart'; +import 'package:pharmacy_mobile/widgets/form_border_widget2.dart'; import 'package:pharmacy_mobile/widgets/input_widget.dart'; import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; import 'package:pharmacy_mobile/widgets/text_widget.dart'; @@ -74,7 +75,7 @@ class _AddStockPageState extends State { const Gap(32), const TextWidget(text: 'Add Stock'), const Gap(16), - FormBorderWidget( + FormBorderWidget2( color: 'green', child: Form( key: _formKey, diff --git a/lib/pages/add_type_page.dart b/lib/pages/add_type_page.dart index 6ac990d..a500756 100644 --- a/lib/pages/add_type_page.dart +++ b/lib/pages/add_type_page.dart @@ -4,6 +4,7 @@ import 'package:internet_connection_checker/internet_connection_checker.dart'; import 'package:pharmacy_mobile/tables/ref_types.dart'; import 'package:pharmacy_mobile/widgets/button_widget.dart'; import 'package:pharmacy_mobile/widgets/form_border_widget.dart'; +import 'package:pharmacy_mobile/widgets/form_border_widget2.dart'; import 'package:pharmacy_mobile/widgets/input_widget.dart'; import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; import 'package:pharmacy_mobile/widgets/snackbar_widget.dart'; @@ -73,7 +74,7 @@ class _AddTypePageState extends State { const Gap(32), const TextWidget(text: 'Add Medicine Type'), const Gap(16), - FormBorderWidget( + FormBorderWidget2( color: 'blue', child: Form( key: _formKey, diff --git a/lib/pages/delete_stock_page.dart b/lib/pages/delete_stock_page.dart index d691ceb..b787123 100644 --- a/lib/pages/delete_stock_page.dart +++ b/lib/pages/delete_stock_page.dart @@ -6,6 +6,7 @@ import 'package:pharmacy_mobile/widgets/button_widget.dart'; import 'package:pharmacy_mobile/widgets/dropdown_widget.dart'; import 'package:pharmacy_mobile/widgets/dropdown_wrappermulti_widget.dart'; import 'package:pharmacy_mobile/widgets/form_border_widget.dart'; +import 'package:pharmacy_mobile/widgets/form_border_widget2.dart'; import 'package:pharmacy_mobile/widgets/input_widget.dart'; import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; import 'package:pharmacy_mobile/widgets/snackbar_widget.dart'; @@ -123,7 +124,7 @@ class _DeleteStockPageState extends State { const Gap(32), const TextWidget(text: 'Remove Stock'), const Gap(16), - FormBorderWidget( + FormBorderWidget2( color: 'red', child: Form( key: _formKey, diff --git a/lib/pages/main_page.dart b/lib/pages/main_page.dart index 850a5bd..0df49c3 100644 --- a/lib/pages/main_page.dart +++ b/lib/pages/main_page.dart @@ -55,7 +55,7 @@ class _MainPageState extends State { icon: FontAwesomeIcons.circlePlus, text: 'Add Category', description: 'Create a new medicine category', - onPressed: () => {context.push('/addtype')}, + onPressed: () => {context.push('/addcategory')}, color: 'blue', ), const Gap(16), diff --git a/lib/widgets/form_border_widget2.dart b/lib/widgets/form_border_widget2.dart new file mode 100644 index 0000000..fc207c7 --- /dev/null +++ b/lib/widgets/form_border_widget2.dart @@ -0,0 +1,77 @@ +import 'package:flutter/material.dart'; + +class FormBorderWidget2 extends StatelessWidget { + final Widget child; + final String? color; + + final List blue = [ + const Color.fromRGBO(30, 50, 77, 0.8), + const Color.fromRGBO(30, 50, 77, 0.8), + const Color.fromRGBO(37, 94, 94, 0.8), + ]; + + final List green = [ + const Color.fromRGBO(23, 56, 38, 0.8), + const Color.fromRGBO(23, 56, 38, 0.8), + const Color.fromRGBO(66, 98, 38, 0.8), + ]; + + final List red = [ + const Color.fromRGBO(87, 33, 33, 0.8), + const Color.fromRGBO(87, 33, 33, 0.8), + const Color.fromRGBO(68, 44, 26, 0.8), + ]; + + final List yellow = [ + const Color.fromRGBO(156, 156, 59, 1), + const Color.fromRGBO(156, 156, 59, 1), + const Color.fromRGBO(104, 156, 59, 1), + ]; + + FormBorderWidget2({super.key, required this.child, this.color}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.only(left: 32, right: 32), + child: Container( + padding: const EdgeInsets.fromLTRB(32, 32, 32, 40), + decoration: BoxDecoration( + // color: _getColor(color ?? ''), + borderRadius: const BorderRadius.all(Radius.circular(16)), + gradient: LinearGradient( + colors: _getColorList(color!), + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + boxShadow: [ + // const BoxShadow( + // color: Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth + // spreadRadius: 0, + // blurRadius: 4, + // offset: Offset(0, 2), + // ) + ]), + child: child), + ); + } + + List _getColorList(String color) { + switch (color.toLowerCase()) { + case 'green': + return green; + case 'blue': + return blue; + case 'red': + return red; + case 'yellow': + return yellow; + default: + return [ + const Color.fromRGBO(0, 0, 0, 0.8), + const Color.fromRGBO(0, 0, 0, 0.8), + const Color.fromRGBO(133, 133, 133, 0.8), + ]; + } + } +} diff --git a/lib/widgets/menu_widget2.dart b/lib/widgets/menu_widget2.dart index 60aaf51..03d45d2 100644 --- a/lib/widgets/menu_widget2.dart +++ b/lib/widgets/menu_widget2.dart @@ -11,27 +11,27 @@ class MenuWidget2 extends StatelessWidget { final String description; final List blue = [ - const Color.fromRGBO(59, 101, 156, 1), - const Color.fromRGBO(59, 101, 156, 1), - const Color.fromRGBO(59, 156, 156, 1), + const Color.fromRGBO(59, 101, 156, 0.8), + const Color.fromRGBO(59, 101, 156, 0.8), + const Color.fromRGBO(59, 156, 156, 0.8), ]; final List green = [ - const Color.fromRGBO(59, 156, 103, 1), - const Color.fromRGBO(59, 156, 103, 1), - const Color.fromRGBO(122, 182, 70, 1), + const Color.fromRGBO(59, 156, 103, 0.8), + const Color.fromRGBO(59, 156, 103, 0.8), + const Color.fromRGBO(122, 182, 70, 0.8), ]; final List red = [ - const Color.fromRGBO(156, 59, 59, 1), - const Color.fromRGBO(164, 62, 62, 1), - const Color.fromRGBO(186, 120, 70, 1), + const Color.fromRGBO(156, 59, 59, 0.8), + const Color.fromRGBO(164, 62, 62, 0.8), + const Color.fromRGBO(186, 120, 70, 0.8), ]; final List yellow = [ - const Color.fromRGBO(156, 156, 59, 1), - const Color.fromRGBO(156, 156, 59, 1), - const Color.fromRGBO(104, 156, 59, 1), + const Color.fromRGBO(156, 156, 59, 0.8), + const Color.fromRGBO(156, 156, 59, 0.8), + const Color.fromRGBO(104, 156, 59, 0.8), ]; MenuWidget2({super.key, required this.text, required this.description, this.icon, this.onPressed, this.color});