This repository has been archived on 2024-06-08. You can view files and clone it, but cannot push or open issues or pull requests.
SolarAgent/lib/screens/about.dart
LittleSheep 8bb9c960c1 💄 Optimized notification page
⬇️ Remove firebase deps
2024-03-23 20:56:32 +08:00

50 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';
class AboutScreen extends StatelessWidget {
const AboutScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('About'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text('SolarAgent',
style: Theme.of(context).textTheme.headlineMedium),
Text('Solar Networks Official Mobile Application',
style: Theme.of(context).textTheme.bodyMedium),
const SizedBox(height: 20),
FutureBuilder(
future: PackageInfo.fromPlatform(),
builder: (context, snapshot) {
if (snapshot.hasData) {
var version = snapshot.data!.version;
return Text('v$version',
style: Theme.of(context).textTheme.bodyLarge);
} else {
return Container();
}
},
),
Text('Open sourced under AGPLv3', style: Theme.of(context).textTheme.bodyMedium),
const SizedBox(height: 10),
MaterialButton(
onPressed: () async {
await launchUrl(Uri.parse('https://solsynth.dev'));
},
child: const Text('Official Website'),
),
],
),
),
);
}
}