mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-16 23:12:50 +00:00
Minor improvements on clients fab
This commit is contained in:
parent
7ce291a34a
commit
d115ec1b1a
3 changed files with 10 additions and 5 deletions
|
@ -218,7 +218,7 @@ class AddedList extends StatelessWidget {
|
||||||
const Positioned(
|
const Positioned(
|
||||||
bottom: 20,
|
bottom: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
child: ClientsFab(),
|
child: ClientsFab(tab: 1),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -119,7 +119,7 @@ class BlockedList extends StatelessWidget {
|
||||||
const Positioned(
|
const Positioned(
|
||||||
bottom: 20,
|
bottom: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
child: ClientsFab(),
|
child: ClientsFab(tab: 2),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
|
@ -15,7 +15,12 @@ import 'package:adguard_home_manager/providers/servers_provider.dart';
|
||||||
import 'package:adguard_home_manager/providers/app_config_provider.dart';
|
import 'package:adguard_home_manager/providers/app_config_provider.dart';
|
||||||
|
|
||||||
class ClientsFab extends StatelessWidget {
|
class ClientsFab extends StatelessWidget {
|
||||||
const ClientsFab({Key? key}) : super(key: key);
|
final int tab;
|
||||||
|
|
||||||
|
const ClientsFab({
|
||||||
|
Key? key,
|
||||||
|
required this.tab,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -126,13 +131,13 @@ class ClientsFab extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appConfigProvider.selectedClientsTab == 1) {
|
if (tab == 1) {
|
||||||
return FloatingActionButton(
|
return FloatingActionButton(
|
||||||
onPressed: () => openAddClient(),
|
onPressed: () => openAddClient(),
|
||||||
child: const Icon(Icons.add),
|
child: const Icon(Icons.add),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (appConfigProvider.selectedClientsTab == 2) {
|
else if (tab == 2) {
|
||||||
return FloatingActionButton(
|
return FloatingActionButton(
|
||||||
onPressed: () => openBlockClient(),
|
onPressed: () => openBlockClient(),
|
||||||
child: const Icon(Icons.add),
|
child: const Icon(Icons.add),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue