-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhelp.dart
46 lines (40 loc) · 1.15 KB
/
help.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
import 'package:flutter/material.dart';
import 'package:auto_size_text/auto_size_text.dart';
import 'appbar.dart';
import 'utils.dart';
/// Provides context-sensitive help
class HelpScreen extends StatelessWidget {
/// The name of the page that help should be given for
final String page;
HelpScreen({this.page = ROUTES.help});
@override
Widget build(BuildContext context) {
Widget helpText = Text('EEK! failed to assign help text');
switch (page) {
case ROUTES.help:
helpText = AutoSizeText(LONGTEXT.ronTsumoHelp);
break;
case ROUTES.privacyPolicy:
helpText = AutoSizeText(LONGTEXT.privacy);
break;
case ROUTES.helpSettings:
helpText = Text('''Server-side stuff is still in development.
'''); // TODO help text for settings screen
break;
}
return Scaffold(
appBar: MyAppBar('Help is here'),
body: DefaultTextStyle(
style: TextStyle(
fontSize: 35.0,
color: Colors.yellow,
decoration: null,
),
child: Padding(
padding: EdgeInsets.all(10),
child: helpText,
),
),
);
}
}