mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-06-01 20:32:18 +00:00
Small fix
This commit is contained in:
parent
0392639db2
commit
b13410cd96
1 changed files with 3 additions and 6 deletions
|
@ -234,6 +234,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
||||||
userController.text = widget.server!.user;
|
userController.text = widget.server!.user;
|
||||||
passwordController.text = widget.server!.password;
|
passwordController.text = widget.server!.password;
|
||||||
defaultServer = widget.server!.defaultServer;
|
defaultServer = widget.server!.defaultServer;
|
||||||
|
homeAssistant = widget.server!.runningOnHa;
|
||||||
}
|
}
|
||||||
checkDataValid();
|
checkDataValid();
|
||||||
super.initState();
|
super.initState();
|
||||||
|
@ -604,9 +605,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
||||||
Material(
|
Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: widget.server == null
|
onTap: () => setState(() => homeAssistant = !homeAssistant),
|
||||||
? () => setState(() => homeAssistant = !homeAssistant)
|
|
||||||
: null,
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
@ -620,9 +619,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
||||||
),
|
),
|
||||||
Switch(
|
Switch(
|
||||||
value: homeAssistant,
|
value: homeAssistant,
|
||||||
onChanged: widget.server == null
|
onChanged: (value) => setState(() => homeAssistant = value),
|
||||||
? (value) => setState(() => homeAssistant = value)
|
|
||||||
: null,
|
|
||||||
activeColor: Theme.of(context).primaryColor,
|
activeColor: Theme.of(context).primaryColor,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue