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.
- Loading branch information
Showing
4 changed files
with
252 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
// 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 AboutScreen extends StatelessWidget { | ||
const AboutScreen({super.key}); | ||
|
||
static const String route = '/about'; | ||
|
||
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, | ||
_aboutContent(context), | ||
], | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
|
||
RichText _aboutContent(BuildContext context) { | ||
return RichText( | ||
text: TextSpan( | ||
text: "About\n\n", | ||
style: Theme.of(context).textTheme.titleLarge, | ||
children: [ | ||
TextSpan( | ||
text: "Welcome to Free Image Search, your ultimate destination for " | ||
"simplified access to a diverse array of license-free photos!" | ||
"\n\nWe've harnessed the power of leading image repositories, ", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
children: [ | ||
_linkTextSpan(context, "Pexels", "https://www.pexels.com/"), | ||
const TextSpan( | ||
text: ", ", | ||
), | ||
_linkTextSpan(context, "Unsplash", | ||
"https://www.unsplash.com/?utm_source=free_image_search&utm_medium=referral"), | ||
const TextSpan( | ||
text: ", ", | ||
), | ||
_linkTextSpan(context, "Pixabay", "https://www.pixabay.com/"), | ||
const TextSpan( | ||
text: ", to bring you a streamlined search experience " | ||
"without the need to navigate multiple sites.", | ||
), | ||
TextSpan( | ||
text: "\n\nKey Features\n\n", | ||
style: Theme.of(context).textTheme.titleLarge, | ||
), | ||
TextSpan( | ||
text: "Centralized Search", | ||
style: Theme.of(context).textTheme.titleMedium, | ||
), | ||
TextSpan( | ||
text: | ||
"\nSave time and effort by searching for license-free photos " | ||
"across ", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
children: [ | ||
_linkTextSpan(context, "Pexels", "https://www.pexels.com/"), | ||
const TextSpan( | ||
text: ", ", | ||
), | ||
_linkTextSpan(context, "Unsplash", | ||
"https://www.unsplash.com/?utm_source=free_image_search&utm_medium=referral"), | ||
const TextSpan( | ||
text: ", ", | ||
), | ||
_linkTextSpan(context, "Pixabay", "https://www.pixabay.com/"), | ||
const TextSpan( | ||
text: " simultaneously. Our " | ||
"platform combines the results, shuffling them at the end to" | ||
" ensure an unbiased selection. Explore a vast collection of " | ||
"images in one convenient place."), | ||
], | ||
), | ||
TextSpan( | ||
text: "\n\nShuffeled Results", | ||
style: Theme.of(context).textTheme.titleMedium, | ||
), | ||
TextSpan( | ||
text: | ||
"\nWe believe in fairness. To avoid any bias, the search results" | ||
" are shuffled, providing an unbiased and varied selection of " | ||
"images for your creative projects.", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
), | ||
TextSpan( | ||
text: "\n\nSeamless Redirect", | ||
style: Theme.of(context).textTheme.titleMedium, | ||
), | ||
TextSpan( | ||
text: | ||
"\nDiscover the perfect images effortlessly. While we don't " | ||
"provide direct download links, we seamlessly redirect you to" | ||
" the respective websites (", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
children: [ | ||
_linkTextSpan(context, "Pexels", "https://www.pexels.com/"), | ||
const TextSpan( | ||
text: ", ", | ||
), | ||
_linkTextSpan(context, "Unsplash", | ||
"https://www.unsplash.com/?utm_source=free_image_search&utm_medium=referral"), | ||
const TextSpan( | ||
text: ", ", | ||
), | ||
_linkTextSpan(context, "Pixabay", "https://www.pixabay.com/"), | ||
TextSpan( | ||
text: | ||
") where you can easily access and download the images you desire.", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
), | ||
], | ||
), | ||
TextSpan( | ||
text: "\n\nLicense Information", | ||
style: Theme.of(context).textTheme.titleMedium, | ||
), | ||
TextSpan( | ||
text: "\nEnsuring transparency, we redirect you to the " | ||
"respective API licenses of ", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
children: [ | ||
_linkTextSpan(context, "Pexels License", | ||
"https://www.pexels.com/license/"), | ||
const TextSpan( | ||
text: ", ", | ||
), | ||
_linkTextSpan(context, "Unsplash License", | ||
"https://www.unsplash.com/license/?utm_source=free_image_search&utm_medium=referral"), | ||
const TextSpan( | ||
text: ", and ", | ||
), | ||
_linkTextSpan(context, "Pixabay License", | ||
"https://www.pixabay.com/service/license-summary/"), | ||
TextSpan( | ||
text: ". You can review the licensing details " | ||
"directly from the source, giving you confidence " | ||
"in using the images for your personal and commercial projects.", | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
), | ||
], | ||
), | ||
], | ||
), | ||
], | ||
), | ||
); | ||
} | ||
|
||
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)); | ||
}, | ||
); | ||
} | ||
} |
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