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

50 lines
1.6 KiB
Dart
Raw Normal View History

2024-02-08 12:30:19 +00:00
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('GoatAgent',
style: Theme.of(context).textTheme.headlineMedium),
Text('Goatworks Official Mobile Helper',
style: Theme.of(context).textTheme.bodyLarge),
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 GOLv1', style: Theme.of(context).textTheme.bodyMedium),
const SizedBox(height: 10),
MaterialButton(
onPressed: () async {
await launchUrl(Uri.parse('https://smartsheep.studio'));
},
child: const Text('Official Website'),
),
],
),
),
);
}
}