mirror of
https://github.com/johrpan/memor.git
synced 2025-10-28 11:17:26 +01:00
Add about screen
This commit is contained in:
parent
4c6358667a
commit
503d44b8c0
4 changed files with 169 additions and 0 deletions
112
lib/about_screen.dart
Normal file
112
lib/about_screen.dart
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart' as url;
|
||||
|
||||
import 'localizations.dart';
|
||||
|
||||
class AboutScreen extends StatelessWidget {
|
||||
static const _email = 'mailto:johrpan@gmail.com?subject=Memor';
|
||||
static const _license = 'https://www.gnu.org/licenses/gpl-3.0.html';
|
||||
static const _github = 'https://github.com/johrpan/memor';
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = MemorLocalizations.of(context);
|
||||
final theme = Theme.of(context);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(l10n.about),
|
||||
),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
children: <Widget>[
|
||||
Text(
|
||||
l10n.introTitle,
|
||||
style: theme.textTheme.headline6,
|
||||
),
|
||||
SizedBox(
|
||||
height: 12.0,
|
||||
),
|
||||
Text(l10n.intro),
|
||||
SizedBox(
|
||||
height: 24.0,
|
||||
),
|
||||
Text(
|
||||
l10n.contactTitle,
|
||||
style: theme.textTheme.headline6,
|
||||
),
|
||||
SizedBox(
|
||||
height: 12.0,
|
||||
),
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: theme.textTheme.bodyText1,
|
||||
children: [
|
||||
TextSpan(
|
||||
text: l10n.contact1,
|
||||
),
|
||||
TextSpan(
|
||||
text: l10n.contact2,
|
||||
style: theme.textTheme.bodyText1.copyWith(
|
||||
color: Colors.amber[700],
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () => url.launch(_email),
|
||||
),
|
||||
TextSpan(
|
||||
text: l10n.contact3,
|
||||
),
|
||||
TextSpan(
|
||||
text: l10n.contact4,
|
||||
style: theme.textTheme.bodyText1.copyWith(
|
||||
color: Colors.amber[700],
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () => url.launch(_github),
|
||||
),
|
||||
TextSpan(
|
||||
text: l10n.contact5,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 24.0,
|
||||
),
|
||||
Text(
|
||||
l10n.licenseTitle,
|
||||
style: theme.textTheme.headline6,
|
||||
),
|
||||
SizedBox(
|
||||
height: 12.0,
|
||||
),
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: theme.textTheme.bodyText1,
|
||||
children: [
|
||||
TextSpan(
|
||||
text: l10n.license1,
|
||||
),
|
||||
TextSpan(
|
||||
text: l10n.license2,
|
||||
style: theme.textTheme.bodyText1.copyWith(
|
||||
color: Colors.amber[700],
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () => url.launch(_license),
|
||||
),
|
||||
TextSpan(
|
||||
text: l10n.license3,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue