mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 14:02:48 +00:00
Improvements added clients list
This commit is contained in:
parent
b599debb3c
commit
6ebde52a7f
2 changed files with 148 additions and 167 deletions
|
@ -171,9 +171,7 @@ class _AddedListState extends State<AddedList> {
|
|||
);
|
||||
}
|
||||
|
||||
return Stack(
|
||||
children: [
|
||||
CustomTabContentList(
|
||||
return CustomTabContentList(
|
||||
loadingGenerator: () => SizedBox(
|
||||
width: double.maxFinite,
|
||||
height: MediaQuery.of(context).size.height-171,
|
||||
|
@ -322,12 +320,9 @@ class _AddedListState extends State<AddedList> {
|
|||
),
|
||||
),
|
||||
loadStatus: widget.loadStatus,
|
||||
onRefresh: widget.fetchClients
|
||||
),
|
||||
ClientsFab(
|
||||
isVisible: isVisible,
|
||||
)
|
||||
],
|
||||
onRefresh: widget.fetchClients,
|
||||
fab: const ClientsFab(),
|
||||
fabVisible: isVisible,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -14,12 +14,7 @@ import 'package:adguard_home_manager/providers/servers_provider.dart';
|
|||
import 'package:adguard_home_manager/providers/app_config_provider.dart';
|
||||
|
||||
class ClientsFab extends StatelessWidget {
|
||||
final bool isVisible;
|
||||
|
||||
const ClientsFab({
|
||||
Key? key,
|
||||
required this.isVisible
|
||||
}) : super(key: key);
|
||||
const ClientsFab({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -67,18 +62,9 @@ class ClientsFab extends StatelessWidget {
|
|||
));
|
||||
}
|
||||
|
||||
return AnimatedPositioned(
|
||||
duration: const Duration(milliseconds: 100),
|
||||
curve: Curves.easeInOut,
|
||||
bottom: isVisible ?
|
||||
appConfigProvider.showingSnackbar
|
||||
? 70 : 20
|
||||
: -70,
|
||||
right: 20,
|
||||
child: FloatingActionButton(
|
||||
return FloatingActionButton(
|
||||
onPressed: openAddClient,
|
||||
child: const Icon(Icons.add),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue