rename shipment
This commit is contained in:
@@ -87,69 +87,6 @@ Future<void> showConfirmDialog(
|
||||
});
|
||||
}
|
||||
|
||||
void showCommentDialog(BuildContext context, commentCallback(comment)) {
|
||||
TextEditingController _comment = new TextEditingController();
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) {
|
||||
return AlertDialog(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(32.0))),
|
||||
content: Container(
|
||||
width: 300.0,
|
||||
height: 80.0,
|
||||
child: Container(
|
||||
child: TextFormField(
|
||||
controller: _comment,
|
||||
autofocus: false,
|
||||
cursorColor: primaryColor,
|
||||
maxLines: 3,
|
||||
style: textStyle,
|
||||
decoration: new InputDecoration(
|
||||
labelText: "Comment",
|
||||
labelStyle: labelStyle,
|
||||
icon: Icon(
|
||||
Icons.add_comment,
|
||||
color: primaryColor,
|
||||
),
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: primaryColor, width: 1.0)),
|
||||
),
|
||||
validator: (value) {
|
||||
if (value.isEmpty) {
|
||||
return "Please enter comment";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: labelStyle,
|
||||
),
|
||||
onPressed: () {
|
||||
_comment.clear();
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
FlatButton(
|
||||
color: primaryColor,
|
||||
child: Text("Submit",
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontWeight: FontWeight.bold)),
|
||||
onPressed: () {
|
||||
commentCallback(_comment.text);
|
||||
Navigator.of(context).pop();
|
||||
})
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget getStatus(String status) {
|
||||
return status == "Delivered"
|
||||
? Text(status,
|
||||
|
||||
Reference in New Issue
Block a user