|
|
|
@@ -51,15 +51,22 @@ class _EditActionDiseaseScreenState extends State<EditActionDiseaseScreen> { |
|
|
|
TextEditingController _naturalEnemyController = TextEditingController(); |
|
|
|
TextEditingController _treatmentMeasuresController = 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); |
|
|
|
@@ -284,6 +291,16 @@ class _EditActionDiseaseScreenState extends State<EditActionDiseaseScreen> { |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
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) { |
|
|
|
@@ -360,6 +377,7 @@ class _EditActionDiseaseScreenState extends State<EditActionDiseaseScreen> { |
|
|
|
_disease.treatmentMeasures ?? ""; |
|
|
|
_descriptionController.text = |
|
|
|
_disease.description ?? ""; |
|
|
|
_executeByController.text = _disease.executeBy; |
|
|
|
|
|
|
|
try { |
|
|
|
executeTime = |
|
|
|
@@ -426,6 +444,10 @@ class _EditActionDiseaseScreenState extends State<EditActionDiseaseScreen> { |
|
|
|
SizedBox( |
|
|
|
height: 8.0, |
|
|
|
), |
|
|
|
_executeByField(), |
|
|
|
SizedBox( |
|
|
|
height: 8.0, |
|
|
|
), |
|
|
|
BlocBuilder<MediaHelperBloc, MediaHelperState>( |
|
|
|
builder: (context, state) { |
|
|
|
if (state is MediaHelperSuccess) { |
|
|
|
@@ -455,6 +477,7 @@ class _EditActionDiseaseScreenState extends State<EditActionDiseaseScreen> { |
|
|
|
_naturalEnemyController.dispose(); |
|
|
|
_treatmentMeasuresController.dispose(); |
|
|
|
_descriptionController.dispose(); |
|
|
|
_executeByController.dispose(); |
|
|
|
super.dispose(); |
|
|
|
} |
|
|
|
} |