~cytrogen/fluent-reader-mobile

ref: ef069a24a53bebe8f5b54f49e4c480dc540d62c9 fluent-reader-mobile/lib/pages/settings/about_page.dart -rw-r--r-- 2.1 KiB
ef069a24 — Bruce Liu add tr locale 2 years ago
                                                                                
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
import 'package:fluent_reader_lite/components/list_tile_group.dart';
import 'package:fluent_reader_lite/components/my_list_tile.dart';
import 'package:fluent_reader_lite/generated/l10n.dart';
import 'package:fluent_reader_lite/utils/colors.dart';
import 'package:fluent_reader_lite/utils/utils.dart';
import 'package:flutter/cupertino.dart';

class AboutPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final String version = ModalRoute.of(context).settings.arguments ?? "1.0.0";
    final nameStyle = TextStyle(
      color: CupertinoColors.label.resolveFrom(context),
      fontSize: 18,
      fontWeight: FontWeight.bold,
      height: 1.5,
    );
    final versionStyle = TextStyle(
      color: CupertinoColors.label.resolveFrom(context),
      fontSize: 14,
      height: 1.5,
    );
    final copyrightStyle = TextStyle(
      color: CupertinoColors.secondaryLabel.resolveFrom(context),
      fontSize: 12,
      height: 2,
    );
    return CupertinoPageScaffold(
      backgroundColor: MyColors.background,
      navigationBar: CupertinoNavigationBar(
        middle: Text(S.of(context).about),
      ),
      child: ListView(
        children: [
          Container(
            padding: EdgeInsets.symmetric(vertical: 100),
            child: Column(
              children: [
                Image.asset("assets/icons/logo.png", width: 80, height: 80),
                Text("Fluent Reader Lite", style: nameStyle),
                Text("${S.of(context).version} $version", style: versionStyle),
                Text("Copyright © 2021 Haoyuan Liu. All rights reserved.", style: copyrightStyle),
              ],
            ),
          ),
          ListTileGroup([
            MyListTile(
              title: Text(S.of(context).openSource),
              onTap: () { Utils.openExternal("https://github.com/yang991178/fluent-reader-lite"); },
            ),
            MyListTile(
              title: Text(S.of(context).feedback),
              onTap: () { Utils.openExternal("https://github.com/yang991178/fluent-reader-lite/issues"); },
              withDivider: false,
            ),
          ]),
        ],
      ),
    );
  }
}