170 lines
5.8 KiB
Dart
170 lines
5.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import '../theme.dart';
|
|
import '../l10n/app_localizations.dart';
|
|
|
|
class AboutPage extends StatelessWidget {
|
|
const AboutPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final l10n = AppLocalizations.of(context)!;
|
|
return Scaffold(
|
|
backgroundColor: AppColors.background,
|
|
appBar: AppBar(title: Text(l10n.aboutUs)),
|
|
body: SingleChildScrollView(
|
|
padding: const EdgeInsets.all(20),
|
|
child: Column(
|
|
children: [
|
|
const SizedBox(height: 20),
|
|
Container(
|
|
width: 100,
|
|
height: 100,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(24),
|
|
),
|
|
clipBehavior: Clip.antiAlias,
|
|
child: Image.asset('assets/logo.png', fit: BoxFit.cover),
|
|
),
|
|
const SizedBox(height: 20),
|
|
Text(
|
|
l10n.appTitle,
|
|
style: TextStyle(
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.bold,
|
|
color: AppColors.textPrimary,
|
|
),
|
|
),
|
|
const SizedBox(height: 4),
|
|
Text(
|
|
'${l10n.version} 1.0.0',
|
|
style: TextStyle(fontSize: 14, color: AppColors.textSecondary),
|
|
),
|
|
const SizedBox(height: 8),
|
|
Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
|
decoration: BoxDecoration(
|
|
color: AppColors.success.withValues(alpha: 0.1),
|
|
borderRadius: BorderRadius.circular(20),
|
|
),
|
|
child: Text(
|
|
l10n.latestVersion,
|
|
style: const TextStyle(
|
|
fontSize: 12,
|
|
color: AppColors.success,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 32),
|
|
Container(
|
|
padding: const EdgeInsets.all(20),
|
|
decoration: BoxDecoration(
|
|
color: AppColors.surface,
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
l10n.productIntro,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w600,
|
|
color: AppColors.textPrimary,
|
|
),
|
|
),
|
|
const SizedBox(height: 12),
|
|
Text(
|
|
l10n.productDesc,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
color: AppColors.textSecondary,
|
|
height: 1.7,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
Container(
|
|
decoration: BoxDecoration(
|
|
color: AppColors.surface,
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
_buildAboutRow(l10n.officialWebsite, 'www.zhinian.com'),
|
|
const Divider(height: 1, indent: 20),
|
|
_buildAboutRow(l10n.servicePhone, '400-888-8888'),
|
|
const Divider(height: 1, indent: 20),
|
|
_buildAboutRow(l10n.techSupport, 'support@zhinian.com'),
|
|
const Divider(height: 1, indent: 20),
|
|
_buildAboutRow(l10n.companyAddress, '浙江省杭州市西湖区'),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
Container(
|
|
decoration: BoxDecoration(
|
|
color: AppColors.surface,
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
ListTile(
|
|
leading: const Icon(Icons.description_outlined, color: AppColors.primary),
|
|
title: Text(l10n.userAgreement),
|
|
trailing: Icon(Icons.chevron_right, color: AppColors.textTertiary),
|
|
onTap: () => context.push('/settings/policy?type=agreement'),
|
|
),
|
|
const Divider(height: 1, indent: 72),
|
|
ListTile(
|
|
leading: const Icon(Icons.privacy_tip_outlined, color: AppColors.primary),
|
|
title: Text(l10n.privacyPolicy),
|
|
trailing: Icon(Icons.chevron_right, color: AppColors.textTertiary),
|
|
onTap: () => context.push('/settings/policy?type=privacy'),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 32),
|
|
Text(
|
|
l10n.copyright,
|
|
style: TextStyle(fontSize: 12, color: AppColors.textTertiary),
|
|
),
|
|
const SizedBox(height: 8),
|
|
Text(
|
|
l10n.allRightsReserved,
|
|
style: TextStyle(fontSize: 12, color: AppColors.textTertiary),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildAboutRow(String label, String value) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
label,
|
|
style: TextStyle(fontSize: 14, color: AppColors.textSecondary),
|
|
),
|
|
const Spacer(),
|
|
Text(
|
|
value,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
color: AppColors.textPrimary,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|