2022-09-26 16:08:56 +02:00
|
|
|
import 'package:adguard_home_manager/widgets/add_server_modal.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class FabConnect extends StatelessWidget {
|
|
|
|
const FabConnect({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
void openAddServerModal() async {
|
|
|
|
await Future.delayed(const Duration(seconds: 0), (() => {
|
|
|
|
Navigator.push(context, MaterialPageRoute(
|
|
|
|
fullscreenDialog: true,
|
|
|
|
builder: (BuildContext context) => const AddServerModal()
|
|
|
|
))
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
return FloatingActionButton(
|
|
|
|
onPressed: openAddServerModal,
|
2022-11-05 02:35:35 +01:00
|
|
|
backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor,
|
2022-10-26 14:26:31 +02:00
|
|
|
child: Icon(
|
|
|
|
Icons.add_rounded,
|
2022-11-05 02:35:35 +01:00
|
|
|
color: Theme.of(context).floatingActionButtonTheme.foregroundColor,
|
2022-10-26 14:26:31 +02:00
|
|
|
),
|
2022-09-26 16:08:56 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|