mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-23 15:29:13 +00:00
Fab color dynamic based on primary color
This commit is contained in:
parent
ddb9130769
commit
2816448ee2
8 changed files with 32 additions and 8 deletions
|
@ -80,7 +80,10 @@ class ClientsFab extends StatelessWidget {
|
||||||
|
|
||||||
return FloatingActionButton(
|
return FloatingActionButton(
|
||||||
onPressed: () => openAddClient(),
|
onPressed: () => openAddClient(),
|
||||||
child: const Icon(Icons.add),
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,10 @@ class FabConnect extends StatelessWidget {
|
||||||
|
|
||||||
return FloatingActionButton(
|
return FloatingActionButton(
|
||||||
onPressed: openAddServerModal,
|
onPressed: openAddServerModal,
|
||||||
child: const Icon(Icons.add_rounded),
|
child: Icon(
|
||||||
|
Icons.add_rounded,
|
||||||
|
color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -176,7 +176,10 @@ class FiltersFab extends StatelessWidget {
|
||||||
onPressed: type == 'blacklist' || type == 'whitelist'
|
onPressed: type == 'blacklist' || type == 'whitelist'
|
||||||
? () => openAddWhitelistBlacklist()
|
? () => openAddWhitelistBlacklist()
|
||||||
: () => openAddCustomRule(),
|
: () => openAddCustomRule(),
|
||||||
child: const Icon(Icons.add),
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -24,7 +24,10 @@ class HomeFab extends StatelessWidget {
|
||||||
return serversProvider.serverStatus.loadStatus == 1
|
return serversProvider.serverStatus.loadStatus == 1
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
onPressed: openManagementBottomSheet,
|
onPressed: openManagementBottomSheet,
|
||||||
child: const Icon(Icons.shield_rounded),
|
child: Icon(
|
||||||
|
Icons.shield_rounded,
|
||||||
|
color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: const SizedBox();
|
: const SizedBox();
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,10 @@ class _ServersState extends State<Servers> {
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: openAddServerModal,
|
onPressed: openAddServerModal,
|
||||||
child: const Icon(Icons.add),
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -319,7 +319,10 @@ class _ClientsListState extends State<ClientsList> {
|
||||||
isScrollControlled: true
|
isScrollControlled: true
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: const Icon(Icons.add),
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
|
@ -184,7 +184,10 @@ class DhcpLeases extends StatelessWidget {
|
||||||
floatingActionButton: staticLeases == true
|
floatingActionButton: staticLeases == true
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
onPressed: openAddStaticLease,
|
onPressed: openAddStaticLease,
|
||||||
child: const Icon(Icons.add),
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -287,7 +287,10 @@ class _DnsRewritesWidgetState extends State<DnsRewritesWidget> {
|
||||||
isScrollControlled: true
|
isScrollControlled: true
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
child: const Icon(Icons.add),
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue