This repository has been archived by the owner on May 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added about, license, imprint pages
- Loading branch information
Showing
8 changed files
with
382 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
// Flutter Imports | ||
import 'package:flutter/gestures.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
// Package Imports | ||
import 'package:url_launcher/url_launcher.dart'; | ||
|
||
// Project Imports | ||
import 'package:fis_app/src/features/shared/nav_items.dart'; | ||
import 'package:fis_app/src/features/shared/theme_toggle.dart'; | ||
import 'package:fis_app/src/utils/ui_helpers.dart'; | ||
|
||
class ImprintScreen extends StatelessWidget { | ||
const ImprintScreen({super.key}); | ||
|
||
static const String route = '/imprint'; | ||
|
||
static const pageSize = 30; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return SafeArea( | ||
child: Scaffold( | ||
appBar: AppBar( | ||
backgroundColor: Theme.of(context).colorScheme.inversePrimary, | ||
title: const NavItems(), | ||
actions: const [ | ||
ThemeToggle(), | ||
], | ||
), | ||
body: Center( | ||
child: SizedBox( | ||
width: halfScreenWidth(context), | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
verticalSpaceMedium, | ||
_licenseContent(context), | ||
], | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
|
||
RichText _licenseContent(BuildContext context) { | ||
return RichText( | ||
text: TextSpan( | ||
text: "Imprint\n\n", | ||
style: Theme.of(context).textTheme.titleLarge, | ||
children: [ | ||
TextSpan( | ||
text: "\nAlexander Schellenberg", | ||
style: Theme.of(context).textTheme.titleMedium!.copyWith( | ||
fontWeight: FontWeight.bold, | ||
), | ||
children: [ | ||
TextSpan( | ||
text: "\n\n" | ||
"Am Blaufuß 40\n" | ||
"46485 Wesel\n" | ||
"Germany", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
), | ||
], | ||
), | ||
TextSpan( | ||
text: "\n\nContact", | ||
style: Theme.of(context).textTheme.titleMedium!.copyWith( | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
TextSpan( | ||
text: "\n\nEmail: ", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
children: [ | ||
_linkTextSpan(context, "[email protected]", | ||
"mailto:[email protected]"), | ||
]), | ||
], | ||
), | ||
); | ||
} | ||
|
||
TextSpan _linkTextSpan(BuildContext context, String text, String url) { | ||
return TextSpan( | ||
text: text, | ||
style: TextStyle( | ||
color: Theme.of(context).colorScheme.primary, | ||
decoration: TextDecoration.underline, | ||
), | ||
recognizer: TapGestureRecognizer() | ||
..onTap = () { | ||
launchUrl(Uri.parse(url)); | ||
}, | ||
); | ||
} | ||
} |
Oops, something went wrong.