update shipment list and editor

This commit is contained in:
tzw
2024-01-30 17:24:28 +06:30
parent c9680ca3ca
commit a944357490
8 changed files with 152 additions and 156 deletions

View File

@@ -53,8 +53,23 @@ class InputDate extends StatelessWidget {
firstDate: DateTime(0),
lastDate: DateTime(2025),
initialDate: initialDate,
builder: (context, child) {
return Theme(
data: Theme.of(context).copyWith(
colorScheme: ColorScheme.light(
background: primaryColor,
surfaceTint: Colors.white,
primary: primaryColor),
textButtonTheme: TextButtonThemeData(
style:
TextButton.styleFrom(foregroundColor: primaryColor),
),
),
child: child!,
);
},
);
if (d != null && controller.text != "") {
if (d != null) {
controller.text = dateFormatter.format(d);
}
},

View File

@@ -20,42 +20,31 @@ class LocalButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(left: 10, right: 10, top: 10),
child: Container(
height: 45.0,
decoration: BoxDecoration(
color: color,
shape: BoxShape.rectangle,
),
child: ButtonTheme(
minWidth: 900.0,
height: 100.0,
child: TextButton(
onPressed: callBack == null ? null : () => callBack!(),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
iconData == null
? Container()
: Icon(
iconData,
color: Colors.white,
),
SizedBox(
width: 15,
),
LocalText(
context,
textKey!,
color: Colors.white,
fontSize: 16,
),
],
return ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: color,
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(5))),
onPressed: callBack,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
iconData == null
? Container()
: Icon(
iconData,
color: Colors.white,
),
SizedBox(
width: 15,
),
),
),
),
);
LocalText(
context,
textKey!,
color: Colors.white,
fontSize: 16,
),
],
));
}
}