2022-09-26 16:08:56 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2023-10-07 18:37:16 +02:00
|
|
|
import 'package:adguard_home_manager/widgets/add_server/add_server_functions.dart';
|
2023-05-13 18:33:09 +02:00
|
|
|
|
2022-09-26 16:08:56 +02:00
|
|
|
class FabConnect extends StatelessWidget {
|
|
|
|
const FabConnect({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2023-04-30 20:18:29 +02:00
|
|
|
final width = MediaQuery.of(context).size.width;
|
|
|
|
|
2022-09-26 16:08:56 +02:00
|
|
|
void openAddServerModal() async {
|
|
|
|
await Future.delayed(const Duration(seconds: 0), (() => {
|
2023-10-07 18:37:16 +02:00
|
|
|
openServerFormModal(context: context, width: width)
|
2022-09-26 16:08:56 +02:00
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
return FloatingActionButton(
|
|
|
|
onPressed: openAddServerModal,
|
2023-01-25 19:55:34 +01:00
|
|
|
child: const Icon(Icons.add_rounded),
|
2022-09-26 16:08:56 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|