You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.2 KiB
Dart

2 years ago
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
2 years ago
import 'package:get/get.dart';
import 'package:isekai_wiki/components/isekai_text.dart';
import 'package:isekai_wiki/utils/dialog.dart';
2 years ago
import '../components/dummy_icon.dart';
import '../components/isekai_nav_bar.dart';
import '../components/isekai_page_scaffold.dart';
import '../global.dart';
import '../styles.dart';
class AboutPageController extends GetxController {
Future<void> handleMainPageLinkClick() async {
openUrl(Global.siteConfig.indexUrl);
2 years ago
}
}
class AboutPage extends StatelessWidget {
const AboutPage({super.key});
@override
Widget build(BuildContext context) {
var c = Get.put(AboutPageController());
return IsekaiPageScaffold(
navigationBar: const IsekaiNavigationBar(
middle: Text('关于'),
),
2 years ago
child: ListView(
children: [
const SizedBox(height: 18),
Container(
color: Theme.of(context).cardTheme.color,
2 years ago
child: SafeArea(
top: false,
bottom: false,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16),
2 years ago
child: Column(
children: const <Widget>[
IsekaiText("异世界百科APP", style: Styles.articleTitle),
2 years ago
SizedBox(height: 18),
IsekaiText("使用Flutter构建"),
2 years ago
],
),
),
),
),
const SizedBox(height: 18),
CupertinoListSection.insetGrouped(
backgroundColor: CupertinoTheme.of(context).scaffoldBackgroundColor,
2 years ago
children: <CupertinoListTile>[
CupertinoListTile.notched(
title: const IsekaiText('异世界百科', style: TextStyle(color: Styles.linkColor)),
2 years ago
leading: const DummyIcon(
color: CupertinoColors.systemBlue,
icon: CupertinoIcons.globe,
),
trailing: const CupertinoListTileChevron(),
onTap: c.handleMainPageLinkClick,
),
],
),
],
),
);
}
}