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
70 lines
2.2 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:isekai_wiki/components/isekai_text.dart';
|
|
import 'package:isekai_wiki/utils/dialog.dart';
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
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('关于'),
|
|
),
|
|
child: ListView(
|
|
children: [
|
|
const SizedBox(height: 18),
|
|
Container(
|
|
color: Theme.of(context).cardTheme.color,
|
|
child: SafeArea(
|
|
top: false,
|
|
bottom: false,
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16),
|
|
child: Column(
|
|
children: const <Widget>[
|
|
IsekaiText("异世界百科APP", style: Styles.articleTitle),
|
|
SizedBox(height: 18),
|
|
IsekaiText("使用Flutter构建"),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 18),
|
|
CupertinoListSection.insetGrouped(
|
|
backgroundColor: CupertinoTheme.of(context).scaffoldBackgroundColor,
|
|
children: <CupertinoListTile>[
|
|
CupertinoListTile.notched(
|
|
title: const IsekaiText('异世界百科', style: TextStyle(color: Styles.linkColor)),
|
|
leading: const DummyIcon(
|
|
color: CupertinoColors.systemBlue,
|
|
icon: CupertinoIcons.globe,
|
|
),
|
|
trailing: const CupertinoListTileChevron(),
|
|
onTap: c.handleMainPageLinkClick,
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|