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(
|
return CustomTabContentList(
|
||||||
children: [
|
|
||||||
CustomTabContentList(
|
|
||||||
loadingGenerator: () => SizedBox(
|
loadingGenerator: () => SizedBox(
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
height: MediaQuery.of(context).size.height-171,
|
height: MediaQuery.of(context).size.height-171,
|
||||||
|
@ -322,12 +320,9 @@ class _AddedListState extends State<AddedList> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
loadStatus: widget.loadStatus,
|
loadStatus: widget.loadStatus,
|
||||||
onRefresh: widget.fetchClients
|
onRefresh: widget.fetchClients,
|
||||||
),
|
fab: const ClientsFab(),
|
||||||
ClientsFab(
|
fabVisible: isVisible,
|
||||||
isVisible: isVisible,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,12 +14,7 @@ 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 {
|
||||||
final bool isVisible;
|
const ClientsFab({Key? key}) : super(key: key);
|
||||||
|
|
||||||
const ClientsFab({
|
|
||||||
Key? key,
|
|
||||||
required this.isVisible
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -67,18 +62,9 @@ class ClientsFab extends StatelessWidget {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
return AnimatedPositioned(
|
return FloatingActionButton(
|
||||||
duration: const Duration(milliseconds: 100),
|
|
||||||
curve: Curves.easeInOut,
|
|
||||||
bottom: isVisible ?
|
|
||||||
appConfigProvider.showingSnackbar
|
|
||||||
? 70 : 20
|
|
||||||
: -70,
|
|
||||||
right: 20,
|
|
||||||
child: FloatingActionButton(
|
|
||||||
onPressed: openAddClient,
|
onPressed: openAddClient,
|
||||||
child: const Icon(Icons.add),
|
child: const Icon(Icons.add),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue