Add toggle button to show or hide password in MapSurveyView Settings page
This commit is contained in:
@@ -108,7 +108,8 @@ class MapSurveyController extends GetxController {
|
||||
|
||||
Rx<bool> pointMeasuringDirectionForward = true.obs;
|
||||
|
||||
Rx<bool> isShowPassword = true.obs;
|
||||
Rx<bool> isShowPassword = false.obs;
|
||||
final passwordFieldFocusNode = FocusNode();
|
||||
|
||||
List<PointWithDescription> pointWithDescriptionList = [];
|
||||
late Directory? directory;
|
||||
@@ -843,4 +844,10 @@ class MapSurveyController extends GetxController {
|
||||
}
|
||||
|
||||
void updatePointStatus(int pointId) {}
|
||||
|
||||
void toggleShowPassword() {
|
||||
isShowPassword.value = !isShowPassword.value;
|
||||
if (passwordFieldFocusNode.hasPrimaryFocus) return;
|
||||
passwordFieldFocusNode.canRequestFocus = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user