From f23afc98d08d31cf4ef6cb6d596f0c90082afd0d Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Fri, 28 Jun 2019 02:49:20 -0700 Subject: [PATCH] fix license link in about --- lib/about.dart | 16 +++++++++++++++- lib/location.dart | 1 - pubspec.yaml | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/about.dart b/lib/about.dart index 8dbbe21..09b9a6d 100644 --- a/lib/about.dart +++ b/lib/about.dart @@ -1,3 +1,4 @@ +import 'package:android_intent/android_intent.dart'; import 'package:flutter/material.dart'; import 'global_helper_functions.dart'; @@ -24,6 +25,13 @@ InkWell aboutApp(BuildContext context) { context: context, builder: (BuildContext context) { final double textHeight = 1.5; + Future _launchLicense() async{ + AndroidIntent intent = AndroidIntent( + action: 'action_view', + data: Uri.encodeFull('https://github.com/TrentSPalmer/libre_gps_parser/blob/master/LICENSE'), + ); + await intent.launch(); + } return AlertDialog( backgroundColor: ivory, shape: RoundedRectangleBorder( @@ -44,6 +52,12 @@ InkWell aboutApp(BuildContext context) { child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ + Text( + 'Version: 0.1.1\n', + style: TextStyle( + color: candyApple, + ), + ), Text( 'The essence of Libre Gps Parser, is to parse gps coordinates from ' 'a map link that you share from the Google Maps Application. ' @@ -109,7 +123,7 @@ InkWell aboutApp(BuildContext context) { ), ), onPressed: () { - Navigator.of(context).pop(); + _launchLicense(); } ), ), diff --git a/lib/location.dart b/lib/location.dart index 3edab2e..2398c9e 100644 --- a/lib/location.dart +++ b/lib/location.dart @@ -45,7 +45,6 @@ class _LocationState extends State { } try { - return Row( children: [ Expanded( diff --git a/pubspec.yaml b/pubspec.yaml index 1853033..2a53e13 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: A new Flutter project. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.1.0+4 +version: 0.1.1+6 environment: sdk: ">=2.1.0 <3.0.0"