Resolves #425 Paste option for text fields
This commit is contained in:
parent
57ebdbbe85
commit
83defb08f1
@ -73,13 +73,7 @@ class _TextInputStateWidgetState extends State<TextInputStateWidget> {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
obscureText: entity.isPasswordField,
|
obscureText: entity.isPasswordField,
|
||||||
controller: new TextEditingController.fromValue(
|
controller: TextEditingController.fromValue(TextEditingValue(text: _tmpValue)),
|
||||||
new TextEditingValue(
|
|
||||||
text: _tmpValue,
|
|
||||||
selection:
|
|
||||||
new TextSelection.collapsed(offset: _tmpValue.length)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_tmpValue = value;
|
_tmpValue = value;
|
||||||
}),
|
}),
|
||||||
|
@ -147,13 +147,7 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: "Home Assistant domain or ip address"
|
labelText: "Home Assistant domain or ip address"
|
||||||
),
|
),
|
||||||
controller: new TextEditingController.fromValue(
|
controller: TextEditingController.fromValue(TextEditingValue(text: _newHassioDomain)),
|
||||||
new TextEditingValue(
|
|
||||||
text: _newHassioDomain,
|
|
||||||
selection:
|
|
||||||
new TextSelection.collapsed(offset: _newHassioDomain.length)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_newHassioDomain = value;
|
_newHassioDomain = value;
|
||||||
}
|
}
|
||||||
@ -162,13 +156,7 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: "Home Assistant port (default is 8123)"
|
labelText: "Home Assistant port (default is 8123)"
|
||||||
),
|
),
|
||||||
controller: new TextEditingController.fromValue(
|
controller: TextEditingController.fromValue(TextEditingValue(text: _newHassioPort)),
|
||||||
new TextEditingValue(
|
|
||||||
text: _newHassioPort,
|
|
||||||
selection:
|
|
||||||
new TextSelection.collapsed(offset: _newHassioPort.length)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_newHassioPort = value;
|
_newHassioPort = value;
|
||||||
}
|
}
|
||||||
@ -216,13 +204,7 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: "Long-lived token"
|
labelText: "Long-lived token"
|
||||||
),
|
),
|
||||||
controller: new TextEditingController.fromValue(
|
controller: TextEditingController.fromValue(TextEditingValue(text: _newLongLivedToken)),
|
||||||
new TextEditingValue(
|
|
||||||
text: _newLongLivedToken ?? '',
|
|
||||||
selection:
|
|
||||||
new TextSelection.collapsed(offset: _newLongLivedToken != null ? _newLongLivedToken.length : 0)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_newLongLivedToken = value;
|
_newLongLivedToken = value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user