update
This commit is contained in:
parent
4586256032
commit
5840df0879
16 changed files with 45 additions and 61 deletions
26
.metadata
26
.metadata
|
|
@ -4,8 +4,8 @@
|
||||||
# This file should be version controlled and should not be manually edited.
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
version:
|
version:
|
||||||
revision: "archlinuxaur0000000000000000000000000000"
|
revision: "c519ee916eaeb88923e67befb89c0f1dabfa83e6"
|
||||||
channel: ""
|
channel: "stable"
|
||||||
|
|
||||||
project_type: app
|
project_type: app
|
||||||
|
|
||||||
|
|
@ -13,23 +13,11 @@ project_type: app
|
||||||
migration:
|
migration:
|
||||||
platforms:
|
platforms:
|
||||||
- platform: root
|
- platform: root
|
||||||
create_revision: archlinuxaur0000000000000000000000000000
|
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
|
||||||
base_revision: archlinuxaur0000000000000000000000000000
|
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
|
||||||
- platform: android
|
- platform: web
|
||||||
create_revision: archlinuxaur0000000000000000000000000000
|
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
|
||||||
base_revision: archlinuxaur0000000000000000000000000000
|
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
|
||||||
- platform: ios
|
|
||||||
create_revision: archlinuxaur0000000000000000000000000000
|
|
||||||
base_revision: archlinuxaur0000000000000000000000000000
|
|
||||||
- platform: linux
|
|
||||||
create_revision: archlinuxaur0000000000000000000000000000
|
|
||||||
base_revision: archlinuxaur0000000000000000000000000000
|
|
||||||
- platform: macos
|
|
||||||
create_revision: archlinuxaur0000000000000000000000000000
|
|
||||||
base_revision: archlinuxaur0000000000000000000000000000
|
|
||||||
- platform: windows
|
|
||||||
create_revision: archlinuxaur0000000000000000000000000000
|
|
||||||
base_revision: archlinuxaur0000000000000000000000000000
|
|
||||||
|
|
||||||
# User provided section
|
# User provided section
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ class _AddCategoryPageState extends State<AddCategoryPage> {
|
||||||
InputWidget(label: 'Category Name', controller: _categoryController),
|
InputWidget(label: 'Category Name', controller: _categoryController),
|
||||||
const Gap(32),
|
const Gap(32),
|
||||||
if (_isLoading)
|
if (_isLoading)
|
||||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
const Center(child: CircularProgressIndicator(color: Colors.white))
|
||||||
else
|
else
|
||||||
ButtonWidget(text: 'Save Category', onPressed: _saveCategory)
|
ButtonWidget(text: 'Save Category', onPressed: _saveCategory)
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
|
||||||
onChanged: _updateManufactorer)),
|
onChanged: _updateManufactorer)),
|
||||||
const Gap(32),
|
const Gap(32),
|
||||||
if (_isLoading)
|
if (_isLoading)
|
||||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
const Center(child: CircularProgressIndicator(color: Colors.white))
|
||||||
else
|
else
|
||||||
ButtonWidget(text: 'Save Medicine', onPressed: _saveMedicine)
|
ButtonWidget(text: 'Save Medicine', onPressed: _saveMedicine)
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@ import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||||
|
|
||||||
// import 'package:intl/intl.dart';
|
|
||||||
|
|
||||||
class AddStockPage extends StatefulWidget {
|
class AddStockPage extends StatefulWidget {
|
||||||
const AddStockPage({super.key});
|
const AddStockPage({super.key});
|
||||||
|
|
||||||
|
|
@ -40,7 +38,7 @@ class _AddStockPageState extends State<AddStockPage> {
|
||||||
_selectedMedicine = medicine;
|
_selectedMedicine = medicine;
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveStock() async {
|
void _saveStock() async {
|
||||||
final stockNameUUID = await _refMedicines.getUUID(_selectedMedicine);
|
final stockNameUUID = await _refMedicines.getUUID(_selectedMedicine);
|
||||||
final stockQuantity = _quantityController.text;
|
final stockQuantity = _quantityController.text;
|
||||||
final stockExpiration = _dateController.text;
|
final stockExpiration = _dateController.text;
|
||||||
|
|
@ -97,7 +95,7 @@ class _AddStockPageState extends State<AddStockPage> {
|
||||||
value: selectedDate,
|
value: selectedDate,
|
||||||
),
|
),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
ButtonWidget(text: 'Add Stock', onPressed: saveStock)
|
ButtonWidget(text: 'Add Stock', onPressed: _saveStock)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class _AddTypePageState extends State<AddTypePage> {
|
||||||
|
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
|
||||||
void saveType() async {
|
void _saveType() async {
|
||||||
setState(() => _isLoading = true);
|
setState(() => _isLoading = true);
|
||||||
try {
|
try {
|
||||||
if (await InternetConnectionChecker.instance.hasConnection) {
|
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||||
|
|
@ -83,9 +83,9 @@ class _AddTypePageState extends State<AddTypePage> {
|
||||||
InputWidget(label: 'Type Name', controller: _typeController),
|
InputWidget(label: 'Type Name', controller: _typeController),
|
||||||
const Gap(32),
|
const Gap(32),
|
||||||
if (_isLoading)
|
if (_isLoading)
|
||||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
const Center(child: CircularProgressIndicator(color: Colors.white))
|
||||||
else
|
else
|
||||||
ButtonWidget(text: 'Save Type', onPressed: saveType)
|
ButtonWidget(text: 'Save Type', onPressed: _saveType)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
// import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||||
|
|
@ -16,7 +13,6 @@ class IndexPage extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
void gotoLogin() {
|
void gotoLogin() {
|
||||||
log(MediaQuery.of(context).size.height.toString());
|
|
||||||
context.push('/login');
|
context.push('/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,9 +94,9 @@ class _ListStocksPageState extends State<ListStocksPage> {
|
||||||
const TextWidget(text: 'List of Stocks'),
|
const TextWidget(text: 'List of Stocks'),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
if (_isLoading)
|
if (_isLoading)
|
||||||
Center(
|
const Center(
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
color: Colors.white,
|
color: Color.fromRGBO(255, 255, 255, 1),
|
||||||
))
|
))
|
||||||
else if (_stockList.isEmpty)
|
else if (_stockList.isEmpty)
|
||||||
// TextWidget(text: 'No Stock Listed')
|
// TextWidget(text: 'No Stock Listed')
|
||||||
|
|
@ -105,11 +105,11 @@ class _ListStocksPageState extends State<ListStocksPage> {
|
||||||
border: Border.all(color: const Color.fromRGBO(205, 59, 208, 0.702), width: 2),
|
border: Border.all(color: const Color.fromRGBO(205, 59, 208, 0.702), width: 2),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 32, vertical: 16.0),
|
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'No Stock Listed',
|
'No Stock Listed',
|
||||||
style: GoogleFonts.outfit(
|
style: GoogleFonts.outfit(
|
||||||
color: Color.fromRGBO(255, 255, 255, 1),
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -115,13 +115,13 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 32, right: 32),
|
padding: const EdgeInsets.only(left: 32, right: 32),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.fromLTRB(32, 32, 32, 40),
|
padding: const EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||||
decoration: BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: const Color.fromRGBO(57, 38, 62, 0.6),
|
color: Color.fromRGBO(57, 38, 62, 0.6),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
color: Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
||||||
spreadRadius: 0,
|
spreadRadius: 0,
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
offset: Offset(0, 2),
|
offset: Offset(0, 2),
|
||||||
|
|
@ -148,7 +148,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
const Gap(40),
|
const Gap(40),
|
||||||
// TextButton(onPressed: () => {_signIn()}, child: const Text('Login'))
|
// TextButton(onPressed: () => {_signIn()}, child: const Text('Login'))
|
||||||
if (_isLoading)
|
if (_isLoading)
|
||||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
const Center(child: CircularProgressIndicator(color: Color.fromRGBO(255, 255, 255, 1)))
|
||||||
else
|
else
|
||||||
ButtonWidget(text: 'Login', onPressed: _signIn)
|
ButtonWidget(text: 'Login', onPressed: _signIn)
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ class ButtonWidget extends StatelessWidget {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
minimumSize: Size(MediaQuery.of(context).size.width - 96, 44), // minimum size
|
minimumSize: Size(MediaQuery.of(context).size.width <= 768 ? MediaQuery.of(context).size.width - 96 : 320,
|
||||||
|
44), // minimum size
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||||
)
|
)
|
||||||
: ElevatedButton.styleFrom(
|
: ElevatedButton.styleFrom(
|
||||||
|
|
@ -29,7 +30,8 @@ class ButtonWidget extends StatelessWidget {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12), // rounded corners
|
borderRadius: BorderRadius.circular(12), // rounded corners
|
||||||
),
|
),
|
||||||
minimumSize: Size(MediaQuery.of(context).size.width - 96, 44), // minimum size
|
minimumSize: Size(MediaQuery.of(context).size.width <= 768 ? MediaQuery.of(context).size.width - 96 : 320,
|
||||||
|
44), // minimum size
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||||
),
|
),
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ class DataTableWidget extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return DataTable(
|
return DataTable(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Colors.black, width: 1.0),
|
border: Border.all(color: const Color.fromRGBO(0, 0, 0, 1), width: 1.0),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
color: Color.fromARGB(255, 240, 240, 240),
|
color: const Color.fromARGB(255, 240, 240, 240),
|
||||||
),
|
),
|
||||||
headingTextStyle: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
|
headingTextStyle: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
|
||||||
dataTextStyle: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14)),
|
dataTextStyle: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14)),
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class DatePickerWidget extends StatelessWidget {
|
||||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
|
||||||
),
|
),
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
style: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white, fontSize: 16)),
|
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 16)),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
|
@ -46,7 +46,7 @@ class DatePickerWidget extends StatelessWidget {
|
||||||
padding: const EdgeInsets.only(top: 8),
|
padding: const EdgeInsets.only(top: 8),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Colors.white, width: 1),
|
border: Border.all(color: const Color.fromRGBO(255, 255, 255, 1), width: 1),
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
),
|
),
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class DropDownWidget extends StatelessWidget {
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12), // Set the desired border radius
|
borderRadius: BorderRadius.circular(12), // Set the desired border radius
|
||||||
border: Border.all(color: Colors.white), // Set the border color
|
border: Border.all(color: const Color.fromRGBO(255, 255, 255, 1)), // Set the border color
|
||||||
),
|
),
|
||||||
child: DropdownMenu(
|
child: DropdownMenu(
|
||||||
initialSelection: '',
|
initialSelection: '',
|
||||||
|
|
@ -42,14 +42,14 @@ class DropDownWidget extends StatelessWidget {
|
||||||
label: item[listTitle].toString(),
|
label: item[listTitle].toString(),
|
||||||
value: item[listTitle],
|
value: item[listTitle],
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
foregroundColor: WidgetStateProperty.all<Color>(Colors.white),
|
foregroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(255, 255, 255, 1)),
|
||||||
textStyle: WidgetStateProperty.all<TextStyle>(
|
textStyle: WidgetStateProperty.all<TextStyle>(
|
||||||
GoogleFonts.outfit(fontSize: 16, fontWeight: FontWeight.w500)))),
|
GoogleFonts.outfit(fontSize: 16, fontWeight: FontWeight.w500)))),
|
||||||
],
|
],
|
||||||
onSelected: onChanged,
|
onSelected: onChanged,
|
||||||
width: MediaQuery.of(context).size.width * 0.8,
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
menuHeight: MediaQuery.of(context).size.height * 0.8,
|
menuHeight: MediaQuery.of(context).size.height * 0.8,
|
||||||
textStyle: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white)),
|
textStyle: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1))),
|
||||||
menuStyle: MenuStyle(
|
menuStyle: MenuStyle(
|
||||||
backgroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(23, 37, 62, 0.8)),
|
backgroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(23, 37, 62, 0.8)),
|
||||||
padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 16)),
|
padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 16)),
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class DropdownWrapperWidget extends StatelessWidget {
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
spacing: 16,
|
spacing: 16,
|
||||||
children: [
|
children: [
|
||||||
CircularProgressIndicator(color: Colors.white),
|
const CircularProgressIndicator(color: Color.fromRGBO(255, 255, 255, 1)),
|
||||||
TextWidget(
|
TextWidget(
|
||||||
text: 'Fetching $text',
|
text: 'Fetching $text',
|
||||||
size: 16,
|
size: 16,
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,13 @@ class FormBorderWidget extends StatelessWidget {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(left: 32, right: 32),
|
padding: const EdgeInsets.only(left: 32, right: 32),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.fromLTRB(32, 32, 32, 40),
|
padding: const EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: _getColor(color ?? ''),
|
color: _getColor(color ?? ''),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
const BoxShadow(
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
color: Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
||||||
spreadRadius: 0,
|
spreadRadius: 0,
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
offset: Offset(0, 2),
|
offset: Offset(0, 2),
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,10 @@ class InputWidget extends StatelessWidget {
|
||||||
controller: controller,
|
controller: controller,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
filled: true, // Enable filling the background
|
filled: true, // Enable filling the background
|
||||||
fillColor: Colors.white,
|
fillColor: const Color.fromRGBO(255, 255, 255, 1),
|
||||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 24)),
|
contentPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 24)),
|
||||||
style: GoogleFonts.outfit(textStyle: TextStyle(color: const Color.fromRGBO(0, 0, 0, 1), fontSize: 16)),
|
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(0, 0, 0, 1), fontSize: 16)),
|
||||||
obscureText: password ?? false,
|
obscureText: password ?? false,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@ class MenuWidget extends StatelessWidget {
|
||||||
onTap: onPressed,
|
onTap: onPressed,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.of(context).size.width - 96,
|
width: MediaQuery.of(context).size.width - 96,
|
||||||
padding: EdgeInsets.only(top: 16, bottom: 16),
|
padding: const EdgeInsets.only(top: 16, bottom: 16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: color != null ? _getColorBasedOnString(color ?? '') : const Color.fromRGBO(255, 255, 255, 0.6),
|
color: color != null ? _getColorBasedOnString(color ?? '') : const Color.fromRGBO(255, 255, 255, 0.6),
|
||||||
width: 2),
|
width: 2),
|
||||||
color: color != null ? _getColorBasedOnString(color ?? '') : Colors.transparent,
|
color: color != null ? _getColorBasedOnString(color ?? '') : const Color.fromRGBO(0, 0, 0, 0),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
|
@ -61,7 +61,7 @@ class MenuWidget extends StatelessWidget {
|
||||||
case 'teal':
|
case 'teal':
|
||||||
return teal;
|
return teal;
|
||||||
default:
|
default:
|
||||||
return Colors.transparent; // Default to transparent if color is not recognized
|
return const Color.fromRGBO(0, 0, 0, 0); // Default to transparent if color is not recognized
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue