mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-31 11:52:16 +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;
|
||||
passwordController.text = widget.server!.password;
|
||||
defaultServer = widget.server!.defaultServer;
|
||||
homeAssistant = widget.server!.runningOnHa;
|
||||
}
|
||||
checkDataValid();
|
||||
super.initState();
|
||||
|
@ -604,9 +605,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: widget.server == null
|
||||
? () => setState(() => homeAssistant = !homeAssistant)
|
||||
: null,
|
||||
onTap: () => setState(() => homeAssistant = !homeAssistant),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Row(
|
||||
|
@ -620,9 +619,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
),
|
||||
Switch(
|
||||
value: homeAssistant,
|
||||
onChanged: widget.server == null
|
||||
? (value) => setState(() => homeAssistant = value)
|
||||
: null,
|
||||
onChanged: (value) => setState(() => homeAssistant = value),
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
)
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue