Browse Source

show executeBy action environment update

master
daivph 5 years ago
parent
commit
73b3efebee
1 changed files with 27 additions and 0 deletions
  1. +27
    -0
      lib/presentation/screens/actions/environment_update/sc_edit_action_environment_update.dart

+ 27
- 0
lib/presentation/screens/actions/environment_update/sc_edit_action_environment_update.dart View File

@@ -49,14 +49,22 @@ class _EditActionEnvironmentUpdateState
TextEditingController _temperatureController = TextEditingController();
TextEditingController _doController = TextEditingController();
TextEditingController _llnController = 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);
@@ -302,6 +310,16 @@ class _EditActionEnvironmentUpdateState
);
}

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) {
@@ -408,6 +426,7 @@ class _EditActionEnvironmentUpdateState
_environment.dodo.formatStringToStringDecimal();
_llnController.text =
_environment.lln.formatStringToStringDecimal();
_executeByController.text = _environment.executeBy;

try {
executeTime =
@@ -470,6 +489,13 @@ class _EditActionEnvironmentUpdateState
height: 8.0,
),
_llnField(),
SizedBox(
height: 8.0,
),
_executeByField(),
SizedBox(
height: 8.0,
),
BlocBuilder<MediaHelperBloc, MediaHelperState>(
builder: (context, state) {
if (state is MediaHelperSuccess) {
@@ -498,6 +524,7 @@ class _EditActionEnvironmentUpdateState
_temperatureController.dispose();
_doController.dispose();
_llnController.dispose();
_executeByController.dispose();
super.dispose();
}
}

Loading…
Cancel
Save