mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-02-06 11:39:21 -06:00
51 lines
1.3 KiB
Dart
51 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:phylum/ui/sync/sliver_offline.dart';
|
|
|
|
import 'sliver_actions.dart';
|
|
|
|
class SyncDialog extends StatelessWidget {
|
|
const SyncDialog({super.key});
|
|
|
|
static void show(BuildContext context) {
|
|
showDialog(context: context, builder: (context) => const SyncDialog());
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final size = MediaQuery.sizeOf(context);
|
|
if (size.width < 600) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Server Status'),
|
|
),
|
|
body: buildContents(context),
|
|
);
|
|
} else {
|
|
return Center(
|
|
child: SizedBox(
|
|
width: 800,
|
|
child: Card(
|
|
margin: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
children: [
|
|
AppBar(
|
|
title: const Text('Server Status'),
|
|
leading: const CloseButton(),
|
|
backgroundColor: Colors.transparent),
|
|
Expanded(child: buildContents(context)),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
Widget buildContents(BuildContext context) => const CustomScrollView(
|
|
slivers: [
|
|
OfflineSliver(),
|
|
ActionsSliver(),
|
|
],
|
|
);
|
|
}
|