-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathoffline_page.dart
64 lines (59 loc) · 1.64 KB
/
offline_page.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import 'package:flutter/material.dart';
import 'package:yaru/yaru.dart';
import '../extensions/build_context_x.dart';
import '../l10n/l10n.dart';
class OfflinePage extends StatelessWidget {
const OfflinePage({super.key});
@override
Widget build(BuildContext context) {
return YaruDetailPage(
backgroundColor: Colors.transparent,
appBar: YaruWindowTitleBar(
border: BorderSide.none,
title: Text(context.l10n.offline),
backgroundColor: Colors.transparent,
leading: Navigator.of(context).canPop() == true
? const YaruBackButton(
style: YaruBackButtonStyle.rounded,
)
: const SizedBox.shrink(),
),
body: const OfflineBody(),
);
}
}
class OfflineBody extends StatelessWidget {
const OfflineBody({
super.key,
});
@override
Widget build(BuildContext context) {
final theme = context.theme;
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
YaruAnimatedVectorIcon(
YaruAnimatedIcons.no_network,
size: 200,
color: theme.disabledColor,
),
Padding(
padding: const EdgeInsets.only(
top: kYaruPagePadding,
left: 40,
right: 40,
),
child: Text(
"It look's like your computer is not connected to the internet",
textAlign: TextAlign.center,
style: theme.textTheme.headlineMedium?.copyWith(
color: theme.disabledColor,
),
),
),
],
),
);
}
}