|
|
|
@@ -53,15 +53,22 @@ class _EditActionCropStatusScreenState |
|
|
|
TextEditingController _abilityProduceBudsController = TextEditingController(); |
|
|
|
TextEditingController _internodeLengthController = TextEditingController(); |
|
|
|
TextEditingController _descriptionController = TextEditingController(); |
|
|
|
final _executeByController = TextEditingController(); |
|
|
|
|
|
|
|
String executeTimeView; |
|
|
|
DateTime executeTime = DateTime.now(); |
|
|
|
List<String> filePaths = List<String>(); |
|
|
|
var changeFileController = Get.put(ChangeFileController()); |
|
|
|
|
|
|
|
Future<Null> getSharedPrefs() async { |
|
|
|
var currentFullName = await pref.getString(DATA_CONST.CURRENT_FULL_NAME); |
|
|
|
_executeByController.text = currentFullName ?? ""; |
|
|
|
} |
|
|
|
|
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
super.initState(); |
|
|
|
getSharedPrefs(); |
|
|
|
changeFileController.initValue(); |
|
|
|
var parsedExecuteDate = |
|
|
|
DateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(executeTime); |
|
|
|
@@ -347,6 +354,16 @@ class _EditActionCropStatusScreenState |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
Widget _executeByField() { |
|
|
|
return TextFormField( |
|
|
|
keyboardType: TextInputType.text, |
|
|
|
decoration: InputDecoration(labelText: "Người thực hiện"), |
|
|
|
enabled: false, |
|
|
|
controller: _executeByController, |
|
|
|
onSaved: (newValue) {}, |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
_actionAppBar() { |
|
|
|
IconButton iconButton; |
|
|
|
if (1 == 1) { |
|
|
|
@@ -433,6 +450,8 @@ class _EditActionCropStatusScreenState |
|
|
|
.formatStringToStringDecimal(); |
|
|
|
_descriptionController.text = |
|
|
|
_cropStatus.description ?? ""; |
|
|
|
_executeByController.text = |
|
|
|
_cropStatus.executeBy ?? ""; |
|
|
|
|
|
|
|
try { |
|
|
|
executeTime = |
|
|
|
@@ -507,6 +526,13 @@ class _EditActionCropStatusScreenState |
|
|
|
height: 8.0, |
|
|
|
), |
|
|
|
_desciptionField(), |
|
|
|
SizedBox( |
|
|
|
height: 8.0, |
|
|
|
), |
|
|
|
_executeByField(), |
|
|
|
SizedBox( |
|
|
|
height: 8.0, |
|
|
|
), |
|
|
|
BlocBuilder<MediaHelperBloc, MediaHelperState>( |
|
|
|
builder: (context, state) { |
|
|
|
if (state is MediaHelperSuccess) { |