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.

82 lines
2.5 KiB
Dart

import 'package:cupertino_lists/cupertino_lists.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_web_browser/flutter_web_browser.dart';
import 'package:get/get.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 {
if (GetPlatform.isAndroid || GetPlatform.isIOS) {
await FlutterWebBrowser.openWebPage(
url: Global.wikiHomeUrl,
customTabsOptions: const CustomTabsOptions(
defaultColorSchemeParams: CustomTabsColorSchemeParams(
toolbarColor: Colors.black87,
),
),
);
} else {}
}
}
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('关于'),
previousPageTitle: "我的",
),
child: ListView(
children: [
const SizedBox(height: 18),
Container(
color: Styles.panelBackgroundColor,
child: SafeArea(
top: false,
bottom: false,
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 12, vertical: 16),
child: Column(
children: const <Widget>[
Text("异世界百科APP", style: Styles.articleTitle),
SizedBox(height: 18),
Text("使用Flutter构建"),
],
),
),
),
),
const SizedBox(height: 18),
CupertinoListSection.insetGrouped(
backgroundColor: Styles.themePageBackgroundColor,
children: <CupertinoListTile>[
CupertinoListTile.notched(
title: const Text('异世界百科',
style: TextStyle(color: Styles.linkColor)),
leading: const DummyIcon(
color: CupertinoColors.systemBlue,
icon: CupertinoIcons.globe,
),
trailing: const CupertinoListTileChevron(),
onTap: c.handleMainPageLinkClick,
),
],
),
],
),
);
}
}