💄 Improved about page

This commit is contained in:
LittleSheep 2024-09-19 20:39:09 +08:00
parent 16b2e3a0c7
commit befc647b03

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:gap/gap.dart'; import 'package:gap/gap.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:solian/widgets/sized_container.dart';
import 'package:url_launcher/url_launcher_string.dart'; import 'package:url_launcher/url_launcher_string.dart';
class AboutScreen extends StatelessWidget { class AboutScreen extends StatelessWidget {
@ -48,38 +49,50 @@ class AboutScreen extends StatelessWidget {
), ),
Text('Copyright © ${DateTime.now().year} Solsynth LLC'), Text('Copyright © ${DateTime.now().year} Solsynth LLC'),
const Gap(16), const Gap(16),
TextButton( CenteredContainer(
style: denseButtonStyle, maxWidth: 280,
child: Text('appDetails'.tr), child: Wrap(
onPressed: () async { spacing: 8,
final info = await PackageInfo.fromPlatform(); runSpacing: 8,
children: [
TextButton(
style: denseButtonStyle,
child: Text('appDetails'.tr),
onPressed: () async {
final info = await PackageInfo.fromPlatform();
showAboutDialog( showAboutDialog(
context: context, context: context,
applicationVersion: '${info.version} (${info.buildNumber})', applicationVersion:
applicationLegalese: '${info.version} (${info.buildNumber})',
'The Solar Network App is an intuitive and self-hostable social network and computing platform. Experience the freedom of a user-friendly design that empowers you to create and connect with communities on your own terms. Embrace the future of social networking with a platform that prioritizes your independence and privacy.', applicationLegalese:
applicationIcon: ClipRRect( 'The Solar Network App is an intuitive and open-source social network and computing platform. Experience the freedom of a user-friendly design that empowers you to create and connect with communities on your own terms. Embrace the future of social networking with a platform that prioritizes your independence and privacy.',
borderRadius: const BorderRadius.all(Radius.circular(16)), applicationIcon: ClipRRect(
child: borderRadius:
Image.asset('assets/logo.png', width: 60, height: 60), const BorderRadius.all(Radius.circular(16)),
child: Image.asset('assets/logo.png',
width: 60, height: 60),
),
);
},
), ),
); TextButton(
}, style: denseButtonStyle,
), child: Text('projectWebsite'.tr),
TextButton( onPressed: () {
style: denseButtonStyle, launchUrlString(
child: Text('projectWebsite'.tr), 'https://solsynth.dev/products/solar-network');
onPressed: () { },
launchUrlString('https://solsynth.dev/products/solar-network'); ),
}, TextButton(
), style: denseButtonStyle,
TextButton( child: Text('termRelated'.tr),
style: denseButtonStyle, onPressed: () {
child: Text('termRelated'.tr), launchUrlString('https://solsynth.dev/terms');
onPressed: () { },
launchUrlString('https://solsynth.dev/terms'); ),
}, ],
),
), ),
const Gap(16), const Gap(16),
const Text( const Text(