chore: Add label to homeserver textfield

This commit is contained in:
Christian Pauly 2021-09-02 09:56:58 +02:00
parent 1e41a2c5ff
commit 55d82d3437
3 changed files with 9 additions and 1 deletions

View File

@ -923,6 +923,7 @@
"type": "text",
"placeholders": {}
},
"homeserver": "Homeserver",
"enterYourHomeserver": "Enter your homeserver",
"@enterYourHomeserver": {
"type": "text",

View File

@ -39,6 +39,7 @@ class HomeserverPickerView extends StatelessWidget {
onSubmit: (_) => controller.checkHomeserverAction(),
unfocusOnClear: false,
autocorrect: false,
labelText: L10n.of(context).homeserver,
),
elevation: 0,
),
@ -78,7 +79,10 @@ class HomeserverPickerView extends StatelessWidget {
return Center(child: CircularProgressIndicator());
}
return Padding(
padding: const EdgeInsets.all(12.0),
padding: const EdgeInsets.symmetric(
horizontal: 12.0,
vertical: 4.0,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,

View File

@ -11,6 +11,7 @@ class DefaultAppBarSearchField extends StatefulWidget {
final bool autofocus;
final String prefixText;
final String hintText;
final String labelText;
final EdgeInsets padding;
final bool readOnly;
final Widget prefixIcon;
@ -27,6 +28,7 @@ class DefaultAppBarSearchField extends StatefulWidget {
this.prefixText,
this.hintText,
this.padding,
this.labelText,
this.readOnly = false,
this.prefixIcon,
this.unfocusOnClear = true,
@ -89,6 +91,7 @@ class DefaultAppBarSearchFieldState extends State<DefaultAppBarSearchField> {
onSubmitted: widget.onSubmit,
decoration: InputDecoration(
prefixText: widget.prefixText,
labelText: widget.labelText,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
borderSide: