Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Develop #629

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ class _SearchConsumerConnectionState extends State<SearchConsumerConnection> {
onChange: (value) => searchConnectionProvider
.getdetails(value, 0),
key: Keys.searchConnection.SEARCH_PHONE_NUMBER_KEY,
onSubmit: (value){
searchConnectionProvider.validatesearchConnectionDetails(
context, widget.arguments, (searchConnectionProvider.searchconnection.controllers[1] == false)
? true : false);
}
),
Text(
'\n${ApplicationLocalizations.of(context).translate(i18.common.OR)}',
Expand All @@ -116,6 +121,11 @@ class _SearchConsumerConnectionState extends State<SearchConsumerConnection> {
],
onChange: (value) => searchConnectionProvider
.getdetails(value, 1),
onSubmit: (value){
searchConnectionProvider.validatesearchConnectionDetails(
context, widget.arguments, (searchConnectionProvider.searchconnection.controllers[1] == false)
? true : false);
},
hint: ApplicationLocalizations.of(context)
.translate(
i18.searchWaterConnection.NAME_HINT),
Expand Down Expand Up @@ -145,6 +155,11 @@ class _SearchConsumerConnectionState extends State<SearchConsumerConnection> {
.searchWaterConnection
.OLD_CONNECTION_HINT),
key: Keys.searchConnection.SEARCH_OLD_ID_KEY,
onSubmit: (value){
searchConnectionProvider.validatesearchConnectionDetails(
context, widget.arguments, (searchConnectionProvider.searchconnection.controllers[1] == false)
? true : false);
}
),
Text(
'\n${ApplicationLocalizations.of(context).translate(i18.common.OR)}',
Expand All @@ -166,6 +181,11 @@ class _SearchConsumerConnectionState extends State<SearchConsumerConnection> {
.searchWaterConnection
.NEW_CONNECTION_HINT),
key: Keys.searchConnection.SEARCH_NEW_ID_KEY,
onSubmit: (value){
searchConnectionProvider.validatesearchConnectionDetails(
context, widget.arguments, (searchConnectionProvider.searchconnection.controllers[1] == false)
? true : false);
}
),
]),
]))),
Expand Down
7 changes: 7 additions & 0 deletions frontend/mgramseva/lib/screeens/login/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class _LoginState extends State<Login> {
maxLength: 10,
validator: Validators.mobileNumberValidator,
textInputType: TextInputType.phone,
textInputAction: TextInputAction.done,
key: Keys.login.LOGIN_PHONE_NUMBER_KEY,
),
BuildTextField(
Expand All @@ -105,6 +106,12 @@ class _LoginState extends State<Login> {
suffixIcon: buildPasswordVisibility(),
maxLines: 1,
key: Keys.login.LOGIN_PASSWORD_KEY,
textInputAction: TextInputAction.done,
onSubmit: (value){
if(buttonStatus){
saveandLogin(context);
}
},
),
GestureDetector(
onTap: () =>
Expand Down
2 changes: 2 additions & 0 deletions frontend/mgramseva/lib/widgets/auto_complete_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class AutoCompleteView extends StatelessWidget {
textFieldConfiguration: TextFieldConfiguration(
inputFormatters: inputFormatter,
keyboardType: textInputType ?? TextInputType.text,
textInputAction: TextInputAction.done,
enabled: (isEnabled ?? true),
controller: controller,
style: TextStyle(
Expand All @@ -106,6 +107,7 @@ class AutoCompleteView extends StatelessWidget {
suggestionsCallback: (pattern) async {
return await callBack(pattern);
},
minCharsForSuggestions: 1,
itemBuilder: listTile,
onSuggestionSelected: onSuggestionSelected,
validator: isRequired == null || !isRequired!
Expand Down
8 changes: 6 additions & 2 deletions frontend/mgramseva/lib/widgets/text_field_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class BuildTextField extends StatefulWidget {
final bool? isFilled;
final Widget? suffixIcon;
final Key? key;
final TextInputAction? textInputAction;

BuildTextField(this.labelText, this.controller,
{this.input = '',
Expand Down Expand Up @@ -65,7 +66,7 @@ class BuildTextField extends StatefulWidget {
this.requiredMessage,
this.autoValidation,
this.suffixIcon,
this.key});
this.key, this.textInputAction});

@override
State<StatefulWidget> createState() => _BuildTextField();
Expand All @@ -90,6 +91,7 @@ class _BuildTextField extends State<BuildTextField> {
: true,
controller: widget.controller,
keyboardType: widget.textInputType ?? TextInputType.text,
textInputAction: widget.textInputAction??TextInputAction.done,
inputFormatters: widget.inputFormatter,
autofocus: false,
maxLength: widget.maxLength,
Expand Down Expand Up @@ -153,7 +155,9 @@ class _BuildTextField extends State<BuildTextField> {
)),
suffixIcon: widget.suffixIcon
),
onChanged: widget.onChange));
onChanged: widget.onChange,
onFieldSubmitted: widget.onSubmit,
));
// Label Text
Widget textLabelwidget =
Wrap(direction: Axis.horizontal, children: <Widget>[
Expand Down
Loading