Skip to content

Commit

Permalink
Merge pull request #5 from AbdeltwabMF/feature/alarm-ui-controller
Browse files Browse the repository at this point in the history
Fix bug: can not run on some places
  • Loading branch information
AbdeltwabMF authored Feb 3, 2023
2 parents 33ec3f1 + dd9a7c5 commit 5f37c9a
Show file tree
Hide file tree
Showing 8 changed files with 361 additions and 241 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Features

- Free and open-data embedded map.
- Free and open-data embedded map (based on OSM).
- Search for the destination.
- Shows Eucliedian distance and bearing angle.
- Shows Live location.
Expand Down Expand Up @@ -68,4 +68,4 @@ flutter build apk --build-name=<vx.y.x> --release

## License

Licensed under the [GPL-v3+](LICENSE) License.
Licensed under the [GPL-v3](LICENSE) License.
220 changes: 143 additions & 77 deletions lib/screens/about.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:loc/styles/colors.dart';
import 'package:url_launcher/url_launcher.dart';

class About extends StatelessWidget {
const About({super.key});
const String version = 'v0.3.0';

class AboutScreen extends StatelessWidget {
const AboutScreen({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.bg,
appBar: AppBar(
backgroundColor: AppColors.pink,
backgroundColor: AppColors.lavender,
elevation: 0,
foregroundColor: AppColors.fg,
title: const Text(
Expand All @@ -23,102 +24,167 @@ class About extends StatelessWidget {
),
body: Container(
padding: const EdgeInsets.only(
top: 24,
left: 16,
right: 16,
top: 16,
bottom: 16,
),
alignment: Alignment.center,
child: Column(
children: [
alignment: Alignment.topCenter,
child: ListView(
physics: const ScrollPhysics(),
shrinkWrap: true,
children: <Widget>[
const Image(
image: AssetImage('assets/images/app_icon.png'),
width: 150,
height: 150,
width: 100,
height: 100,
),
const Padding(
padding: EdgeInsets.only(
Container(
margin: const EdgeInsets.only(
top: 24,
),
child: Text(
'Loc',
textAlign: TextAlign.center,
style: TextStyle(
decoration: const BoxDecoration(
color: AppColors.ashGray,
borderRadius: BorderRadius.all(
Radius.circular(12),
),
),
child: const ListTile(
leading: Icon(
Icons.star_border_rounded,
color: AppColors.fg,
fontSize: 48,
size: 48,
),
title: Text('Loc version'),
subtitle: Text(version),
),
),
const Padding(
padding: EdgeInsets.only(
top: 16,
bottom: 8,
),
child: Text(
'v0.2.2',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
Container(
margin: const EdgeInsets.only(
top: 8,
),
decoration: const BoxDecoration(
color: AppColors.ashGray,
borderRadius: BorderRadius.all(
Radius.circular(12),
),
),
child: const ListTile(
leading: Icon(
Icons.copyright_rounded,
color: AppColors.fg,
size: 48,
),
title: Text('License'),
subtitle: Text('GPL v3'),
),
),
const Padding(
padding: EdgeInsets.only(
Container(
margin: const EdgeInsets.only(
top: 8,
bottom: 16,
),
child: Text(
'GPL v3 License',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
decoration: const BoxDecoration(
color: AppColors.ashGray,
borderRadius: BorderRadius.all(
Radius.circular(12),
),
),
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero)),
onPressed: () {
const String sourceCode =
'https://github.com/AbdeltwabMF/Loc';
_launchUrl(sourceCode);
},
child: const ListTile(
leading: Icon(
Icons.code_rounded,
color: AppColors.fg,
size: 48,
),
title: Text('Source code'),
subtitle: Text('GitHub'),
),
),
),
RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: const TextStyle(
color: AppColors.fg,
fontFamily: 'Fantasque',
fontSize: 18,
Container(
margin: const EdgeInsets.only(
top: 8,
),
decoration: const BoxDecoration(
color: AppColors.ashGray,
borderRadius: BorderRadius.all(
Radius.circular(12),
),
children: [
const TextSpan(
text:
'Free and open-source location-based reminder for Android.\n\n',
),
const TextSpan(
text: 'Designed by \n\n',
),
TextSpan(
text: 'Abd El-Twab M. Fakhry\n\n',
style: const TextStyle(
color: AppColors.lavender,
fontSize: 28,
),
recognizer: TapGestureRecognizer()
..onTap = () async {
const amf = 'https://abdeltwabmf.github.io/';
await _launchUrl(amf);
},
),
const TextSpan(
text: 'Source Code can be found here on\n\n',
),
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero)),
onPressed: () {
const String issues =
'https://github.com/AbdeltwabMF/Loc/issues';
_launchUrl(issues);
},
child: const ListTile(
leading: Icon(
Icons.info_rounded,
color: AppColors.fg,
size: 48,
),
TextSpan(
text: 'GitHub',
style: const TextStyle(
color: AppColors.coral,
fontSize: 20,
),
recognizer: TapGestureRecognizer()
..onTap = () async {
const loc = 'https://github.com/AbdeltwabMF/Loc';
await _launchUrl(loc);
},
title: Text('Issues'),
subtitle: Text('Issues found in this software'),
),
),
),
Container(
margin: const EdgeInsets.only(
top: 8,
),
decoration: const BoxDecoration(
color: AppColors.ashGray,
borderRadius: BorderRadius.all(
Radius.circular(12),
),
),
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero)),
onPressed: () {
const String amf = 'https://abdeltwabmf.github.io/about';
_launchUrl(amf);
},
child: const ListTile(
leading: Icon(
Icons.person_rounded,
color: AppColors.fg,
size: 48,
),
],
title: Text('Author'),
subtitle: Text('Abd El-Twab M. Fakhry'),
),
),
),
Container(
margin: const EdgeInsets.only(
top: 8,
),
decoration: const BoxDecoration(
color: AppColors.ashGray,
borderRadius: BorderRadius.all(
Radius.circular(12),
),
),
child: const ListTile(
isThreeLine: true,
leading: Icon(
Icons.privacy_tip_rounded,
color: AppColors.fg,
size: 48,
),
title: Text('Privacy policy'),
subtitle:
Text('Loc doesn\'t collect or store any of your data'),
),
),
],
Expand All @@ -129,7 +195,7 @@ class About extends StatelessWidget {
}

Future<void> _launchUrl(String url) async {
if (!await launchUrl(Uri.parse(url))) {
if (!await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication)) {
debugPrint('Can not launch $url');
}
}
Loading

0 comments on commit 5f37c9a

Please sign in to comment.