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(
|
||||
focusNode: _focusNode,
|
||||
obscureText: entity.isPasswordField,
|
||||
controller: new TextEditingController.fromValue(
|
||||
new TextEditingValue(
|
||||
text: _tmpValue,
|
||||
selection:
|
||||
new TextSelection.collapsed(offset: _tmpValue.length)
|
||||
)
|
||||
),
|
||||
controller: TextEditingController.fromValue(TextEditingValue(text: _tmpValue)),
|
||||
onChanged: (value) {
|
||||
_tmpValue = value;
|
||||
}),
|
||||
|
@ -147,13 +147,7 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
||||
decoration: InputDecoration(
|
||||
labelText: "Home Assistant domain or ip address"
|
||||
),
|
||||
controller: new TextEditingController.fromValue(
|
||||
new TextEditingValue(
|
||||
text: _newHassioDomain,
|
||||
selection:
|
||||
new TextSelection.collapsed(offset: _newHassioDomain.length)
|
||||
)
|
||||
),
|
||||
controller: TextEditingController.fromValue(TextEditingValue(text: _newHassioDomain)),
|
||||
onChanged: (value) {
|
||||
_newHassioDomain = value;
|
||||
}
|
||||
@ -162,13 +156,7 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
||||
decoration: InputDecoration(
|
||||
labelText: "Home Assistant port (default is 8123)"
|
||||
),
|
||||
controller: new TextEditingController.fromValue(
|
||||
new TextEditingValue(
|
||||
text: _newHassioPort,
|
||||
selection:
|
||||
new TextSelection.collapsed(offset: _newHassioPort.length)
|
||||
)
|
||||
),
|
||||
controller: TextEditingController.fromValue(TextEditingValue(text: _newHassioPort)),
|
||||
onChanged: (value) {
|
||||
_newHassioPort = value;
|
||||
}
|
||||
@ -216,13 +204,7 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
||||
decoration: InputDecoration(
|
||||
labelText: "Long-lived token"
|
||||
),
|
||||
controller: new TextEditingController.fromValue(
|
||||
new TextEditingValue(
|
||||
text: _newLongLivedToken ?? '',
|
||||
selection:
|
||||
new TextSelection.collapsed(offset: _newLongLivedToken != null ? _newLongLivedToken.length : 0)
|
||||
)
|
||||
),
|
||||
controller: TextEditingController.fromValue(TextEditingValue(text: _newLongLivedToken)),
|
||||
onChanged: (value) {
|
||||
_newLongLivedToken = value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user