Compare commits
2 Commits
8ebc6e1928
...
8687bbb86a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8687bbb86a | ||
|
|
1a35899c41 |
45
lib/screens/about_screen.dart
Normal file
45
lib/screens/about_screen.dart
Normal file
@ -0,0 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AboutScreen extends StatelessWidget {
|
||||
const AboutScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('关于'),
|
||||
),
|
||||
body: const Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'伴享',
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'当前版本: 1.1.9+11',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32),
|
||||
child: Text(
|
||||
'伴享 — 专为银发族打造的社交平台',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@ import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'about_screen.dart';
|
||||
import 'profile_setup_screen.dart';
|
||||
|
||||
class ProfileScreen extends StatefulWidget {
|
||||
@ -127,6 +128,17 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// 关于入口
|
||||
ListTile(
|
||||
leading: const Icon(Icons.info_outline),
|
||||
title: const Text('关于'),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => const AboutScreen()),
|
||||
);
|
||||
},
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(24, 0, 24, 24),
|
||||
child: SizedBox(
|
||||
|
||||
13
scripts/version_check.sh
Executable file
13
scripts/version_check.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 读取 pubspec.yaml 中的 version 字段
|
||||
VERSION=$(grep "^version:" pubspec.yaml | sed 's/version: *//' | tr -d ' ')
|
||||
|
||||
# 检查 version 格式是否符合 x.x.x+x(用正则)
|
||||
if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+\+[0-9]+$ ]]; then
|
||||
echo "错误: version 格式不符合 x.x.x+x"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 输出格式:当前版本: x.x.x+x
|
||||
echo "当前版本: $VERSION"
|
||||
Loading…
Reference in New Issue
Block a user