This commit is contained in:
Patrick Alvin Alcala 2025-02-10 09:51:04 +08:00
parent 4586256032
commit 5840df0879
16 changed files with 45 additions and 61 deletions

View file

@ -19,7 +19,8 @@ class ButtonWidget extends StatelessWidget {
shape: RoundedRectangleBorder(
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),
)
: ElevatedButton.styleFrom(
@ -29,7 +30,8 @@ class ButtonWidget extends StatelessWidget {
shape: RoundedRectangleBorder(
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),
),
onPressed: onPressed,

View file

@ -10,9 +10,9 @@ class DataTableWidget extends StatelessWidget {
Widget build(BuildContext context) {
return DataTable(
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),
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)),
dataTextStyle: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14)),

View file

@ -37,7 +37,7 @@ class DatePickerWidget extends StatelessWidget {
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
),
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(
mainAxisAlignment: MainAxisAlignment.end,
@ -46,7 +46,7 @@ class DatePickerWidget extends StatelessWidget {
padding: const EdgeInsets.only(top: 8),
child: Container(
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),
),
child: TextButton(

View file

@ -32,7 +32,7 @@ class DropDownWidget extends StatelessWidget {
Container(
decoration: BoxDecoration(
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(
initialSelection: '',
@ -42,14 +42,14 @@ class DropDownWidget extends StatelessWidget {
label: item[listTitle].toString(),
value: item[listTitle],
style: ButtonStyle(
foregroundColor: WidgetStateProperty.all<Color>(Colors.white),
foregroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(255, 255, 255, 1)),
textStyle: WidgetStateProperty.all<TextStyle>(
GoogleFonts.outfit(fontSize: 16, fontWeight: FontWeight.w500)))),
],
onSelected: onChanged,
width: MediaQuery.of(context).size.width * 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(
backgroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(23, 37, 62, 0.8)),
padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 16)),

View file

@ -25,7 +25,7 @@ class DropdownWrapperWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
spacing: 16,
children: [
CircularProgressIndicator(color: Colors.white),
const CircularProgressIndicator(color: Color.fromRGBO(255, 255, 255, 1)),
TextWidget(
text: 'Fetching $text',
size: 16,

View file

@ -17,13 +17,13 @@ class FormBorderWidget extends StatelessWidget {
return Padding(
padding: const EdgeInsets.only(left: 32, right: 32),
child: Container(
padding: EdgeInsets.fromLTRB(32, 32, 32, 40),
padding: const EdgeInsets.fromLTRB(32, 32, 32, 40),
decoration: BoxDecoration(
color: _getColor(color ?? ''),
borderRadius: BorderRadius.all(Radius.circular(16)),
borderRadius: const BorderRadius.all(Radius.circular(16)),
boxShadow: [
BoxShadow(
color: const Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
const BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
spreadRadius: 0,
blurRadius: 4,
offset: Offset(0, 2),

View file

@ -24,10 +24,10 @@ class InputWidget extends StatelessWidget {
controller: controller,
decoration: InputDecoration(
filled: true, // Enable filling the background
fillColor: Colors.white,
fillColor: const Color.fromRGBO(255, 255, 255, 1),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 24)),
style: GoogleFonts.outfit(textStyle: TextStyle(color: const Color.fromRGBO(0, 0, 0, 1), fontSize: 16)),
contentPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 24)),
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(0, 0, 0, 1), fontSize: 16)),
obscureText: password ?? false,
),
],

View file

@ -22,13 +22,13 @@ class MenuWidget extends StatelessWidget {
onTap: onPressed,
child: Container(
width: MediaQuery.of(context).size.width - 96,
padding: EdgeInsets.only(top: 16, bottom: 16),
padding: const EdgeInsets.only(top: 16, bottom: 16),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: color != null ? _getColorBasedOnString(color ?? '') : const Color.fromRGBO(255, 255, 255, 0.6),
width: 2),
color: color != null ? _getColorBasedOnString(color ?? '') : Colors.transparent,
color: color != null ? _getColorBasedOnString(color ?? '') : const Color.fromRGBO(0, 0, 0, 0),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
@ -61,7 +61,7 @@ class MenuWidget extends StatelessWidget {
case 'teal':
return teal;
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
}
}
}