Adapted servers list and connection screen

This commit is contained in:
Juan Gilsanz Polo 2023-04-30 20:18:29 +02:00
parent f631780e18
commit 33125e543c
8 changed files with 743 additions and 225 deletions

View file

@ -6,12 +6,27 @@ class FabConnect extends StatelessWidget {
@override
Widget build(BuildContext context) {
final width = MediaQuery.of(context).size.width;
void openAddServerModal() async {
await Future.delayed(const Duration(seconds: 0), (() => {
Navigator.push(context, MaterialPageRoute(
fullscreenDialog: true,
builder: (BuildContext context) => const AddServerModal()
))
if (width > 700) {
showDialog(
context: context,
barrierDismissible: false,
builder: (context) => const AddServerModal(
window: true,
),
)
}
else {
Navigator.push(context, MaterialPageRoute(
fullscreenDialog: true,
builder: (BuildContext context) => const AddServerModal(
window: false,
)
))
}
}));
}