From 24f58b2b2785990c16b843922f1d104a705ff78c Mon Sep 17 00:00:00 2001
From: Anup Kumar Panwar <1anuppanwar@gmail.com>
Date: Mon, 2 Nov 2020 21:09:38 +0530
Subject: [PATCH 01/11] updated http url regexp
---
CHANGELOG.md | 4 ++++
README.md | 2 +-
example/pubspec.lock | 15 +++++++++++----
lib/httpParser.dart | 2 +-
pubspec.lock | 21 ++++++++++++++-------
pubspec.yaml | 2 +-
6 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3a86dc3..bfa43a6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,3 +17,7 @@
## [1.0.5] - 3 July 2020.
* Changed http url regexp.
+
+## [1.0.6] - 2 November 2020.
+
+* Changed http url regexp.
diff --git a/README.md b/README.md
index e333459..8139ec9 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Note: You don't need to specify the URL scheme (mailto, tel etc). The widget wil
To install the package, add the following dependency to your `pubspec.yaml`
```
dependencies:
- linkable: ^1.0.5
+ linkable: ^1.0.6
url_launcher: ^5.4.10
```
## Usage
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 9e16646..78aebb0 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -1,13 +1,20 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.0.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
- version: "1.14.12"
+ version: "1.14.13"
flutter:
dependency: "direct main"
description: flutter
@@ -24,7 +31,7 @@ packages:
path: ".."
relative: true
source: path
- version: "1.0.3"
+ version: "1.0.5"
meta:
dependency: transitive
description:
@@ -64,7 +71,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.6"
+ version: "1.2.0"
url_launcher:
dependency: "direct main"
description:
@@ -101,5 +108,5 @@ packages:
source: hosted
version: "2.0.8"
sdks:
- dart: ">=2.7.0 <3.0.0"
+ dart: ">=2.9.0-14.0.dev <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
diff --git a/lib/httpParser.dart b/lib/httpParser.dart
index 85dda7c..bad3a23 100644
--- a/lib/httpParser.dart
+++ b/lib/httpParser.dart
@@ -9,7 +9,7 @@ class HttpParser implements Parser {
parse() {
String pattern =
- r"(http(s)?:\/\/)?(www.)?[a-zA-Z0-9]{2,256}\.[a-zA-Z0-9]{2,256}(\.[a-zA-Z0-9]{2,256})?([-a-zA-Z0-9@:%_\+~#?&//=]*)";
+ r"(http(s)?:\/\/)?(www.)?[a-zA-Z0-9]{2,256}\.[a-zA-Z0-9]{2,256}(\.[a-zA-Z0-9]{2,256})?([-a-zA-Z0-9@:%_\+~#?&//=.]*)([-a-zA-Z0-9@:%_\+~#?&//=]+)";
RegExp regExp = RegExp(pattern, caseSensitive: false);
diff --git a/pubspec.lock b/pubspec.lock
index f0ec67e..a9dc3b9 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.4.1"
+ version: "2.4.2"
boolean_selector:
dependency: transitive
description:
@@ -15,6 +15,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.0.0"
charcode:
dependency: transitive
description:
@@ -35,7 +42,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
- version: "1.14.12"
+ version: "1.14.13"
fake_async:
dependency: transitive
description:
@@ -64,7 +71,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.6"
+ version: "0.12.8"
meta:
dependency: transitive
description:
@@ -118,7 +125,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
- version: "1.9.3"
+ version: "1.9.5"
stream_channel:
dependency: transitive
description:
@@ -146,14 +153,14 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.15"
+ version: "0.2.17"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.6"
+ version: "1.2.0"
url_launcher:
dependency: "direct main"
description:
@@ -190,5 +197,5 @@ packages:
source: hosted
version: "2.0.8"
sdks:
- dart: ">=2.7.0 <3.0.0"
+ dart: ">=2.9.0-14.0.dev <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index ef250e6..3c953a3 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: linkable
description: A Flutter widget to add links to your text. Linkable widget is a wrapper over RichText which allows you to render links that can be clicked to redirect to the URL.
-version: 1.0.5
+version: 1.0.6
homepage: https://github.com/AnupKumarPanwar/Linkable
environment:
From 4b7fd4c81bb133780b9e469ca413678c2a0ff030 Mon Sep 17 00:00:00 2001
From: Anup Kumar Panwar <1anuppanwar@gmail.com>
Date: Mon, 2 Nov 2020 22:02:13 +0530
Subject: [PATCH 02/11] added LICENSE file
---
LICENSE | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/LICENSE b/LICENSE
index ba75c69..4c8a5f6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1 +1,21 @@
-TODO: Add your license here.
+MIT License
+
+Copyright (c) 2020 Anup Kumar Panwar
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
From d6fb584b04a2b2a55954d6e06c32c1638c5beacf Mon Sep 17 00:00:00 2001
From: Anup Kumar Panwar <1anuppanwar@gmail.com>
Date: Wed, 24 Feb 2021 02:00:48 +0530
Subject: [PATCH 03/11] Updated url_launcher version
---
CHANGELOG.md | 4 ++++
README.md | 2 +-
example/pubspec.yaml | 2 +-
pubspec.yaml | 4 ++--
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bfa43a6..0d40d55 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,3 +21,7 @@
## [1.0.6] - 2 November 2020.
* Changed http url regexp.
+
+## [1.0.7] - 24 February 2021.
+
+* Updated url_launcher version.
diff --git a/README.md b/README.md
index 8139ec9..d5eb21c 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Note: You don't need to specify the URL scheme (mailto, tel etc). The widget wil
To install the package, add the following dependency to your `pubspec.yaml`
```
dependencies:
- linkable: ^1.0.6
+ linkable: ^1.0.7
url_launcher: ^5.4.10
```
## Usage
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 5530607..4920dc0 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
- url_launcher: ^5.0.1
+ url_launcher: ^5.4.10
linkable:
path: ..
diff --git a/pubspec.yaml b/pubspec.yaml
index 3c953a3..9045413 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: linkable
description: A Flutter widget to add links to your text. Linkable widget is a wrapper over RichText which allows you to render links that can be clicked to redirect to the URL.
-version: 1.0.6
+version: 1.0.7
homepage: https://github.com/AnupKumarPanwar/Linkable
environment:
@@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
- url_launcher: ^5.4.10
+ url_launcher: ^5.7.10
dev_dependencies:
flutter_test:
From 0f9dfded3f7023b04d9558fda28c3b49d8b9bdf9 Mon Sep 17 00:00:00 2001
From: Anup Kumar Panwar <1anuppanwar@gmail.com>
Date: Fri, 12 Mar 2021 16:11:37 +0530
Subject: [PATCH 04/11] update url_launcher version
---
CHANGELOG.md | 4 +
README.md | 4 +-
example/lib/generated_plugin_registrant.dart | 12 ++-
example/pubspec.lock | 61 +++++++-------
example/pubspec.yaml | 2 +-
pubspec.lock | 85 +++++++++++---------
pubspec.yaml | 4 +-
7 files changed, 94 insertions(+), 78 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d40d55..a74432f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,3 +25,7 @@
## [1.0.7] - 24 February 2021.
* Updated url_launcher version.
+
+## [1.0.8] - 12 March 2021.
+
+* Updated url_launcher version.
diff --git a/README.md b/README.md
index d5eb21c..12fe5f2 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,8 @@ Note: You don't need to specify the URL scheme (mailto, tel etc). The widget wil
To install the package, add the following dependency to your `pubspec.yaml`
```
dependencies:
- linkable: ^1.0.7
- url_launcher: ^5.4.10
+ linkable: ^1.0.8
+ url_launcher: ^6.0.2
```
## Usage
### Basic
diff --git a/example/lib/generated_plugin_registrant.dart b/example/lib/generated_plugin_registrant.dart
index 2973833..0996199 100644
--- a/example/lib/generated_plugin_registrant.dart
+++ b/example/lib/generated_plugin_registrant.dart
@@ -2,15 +2,13 @@
// Generated file. Do not edit.
//
-// ignore: unused_import
-import 'dart:ui';
+import 'package:flutter_web_plugins/flutter_web_plugins.dart';
+// ignore_for_file: lines_longer_than_80_chars
import 'package:url_launcher_web/url_launcher_web.dart';
-import 'package:flutter_web_plugins/flutter_web_plugins.dart';
-
// ignore: public_member_api_docs
-void registerPlugins(PluginRegistry registry) {
- UrlLauncherPlugin.registerWith(registry.registrarFor(UrlLauncherPlugin));
- registry.registerMessageHandler();
+void registerPlugins(Registrar registrar) {
+ UrlLauncherPlugin.registerWith(registrar);
+ registrar.registerMessageHandler();
}
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 78aebb0..a10e54e 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -7,14 +7,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.0"
+ version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
- version: "1.14.13"
+ version: "1.15.0"
flutter:
dependency: "direct main"
description: flutter
@@ -25,41 +25,34 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "0.6.3"
linkable:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
- version: "1.0.5"
+ version: "1.0.8"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.8"
- platform_detect:
- dependency: transitive
- description:
- name: platform_detect
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.4.0"
+ version: "1.3.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.2"
- pub_semver:
- dependency: transitive
- description:
- name: pub_semver
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.4.4"
+ version: "2.0.0"
sky_engine:
dependency: transitive
description: flutter
@@ -71,42 +64,56 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.3.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
- version: "5.4.10"
+ version: "6.0.2"
+ url_launcher_linux:
+ dependency: transitive
+ description:
+ name: url_launcher_linux
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.0.0"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
- version: "0.0.1+7"
+ version: "2.0.0"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.7"
+ version: "2.0.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
- version: "0.1.1+6"
+ version: "2.0.0"
+ url_launcher_windows:
+ dependency: transitive
+ description:
+ name: url_launcher_windows
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.0.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.8"
+ version: "2.1.0"
sdks:
- dart: ">=2.9.0-14.0.dev <3.0.0"
- flutter: ">=1.12.13+hotfix.5 <2.0.0"
+ dart: ">=2.12.0-259.9.beta <3.0.0"
+ flutter: ">=1.22.0"
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 4920dc0..9b5b222 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
- url_launcher: ^5.4.10
+ url_launcher: ^6.0.2
linkable:
path: ..
diff --git a/pubspec.lock b/pubspec.lock
index a9dc3b9..8cd1c58 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -7,49 +7,49 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.4.2"
+ version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.0"
+ version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.0"
+ version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.3"
+ version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.1"
+ version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
- version: "1.14.13"
+ version: "1.15.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
@@ -65,48 +65,41 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "0.6.3"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.8"
+ version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.8"
+ version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.7.0"
- platform_detect:
- dependency: transitive
- description:
- name: platform_detect
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.4.0"
+ version: "1.8.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.2"
- pub_semver:
- dependency: transitive
- description:
- name: pub_semver
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.4.4"
+ version: "2.0.0"
sky_engine:
dependency: transitive
description: flutter
@@ -118,84 +111,98 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
- version: "1.7.0"
+ version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
- version: "1.9.5"
+ version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.0"
+ version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.5"
+ version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.17"
+ version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.3.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
- version: "5.4.10"
+ version: "6.0.2"
+ url_launcher_linux:
+ dependency: transitive
+ description:
+ name: url_launcher_linux
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.0.0"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
- version: "0.0.1+7"
+ version: "2.0.0"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.7"
+ version: "2.0.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
- version: "0.1.1+6"
+ version: "2.0.0"
+ url_launcher_windows:
+ dependency: transitive
+ description:
+ name: url_launcher_windows
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.0.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.8"
+ version: "2.1.0"
sdks:
- dart: ">=2.9.0-14.0.dev <3.0.0"
- flutter: ">=1.12.13+hotfix.5 <2.0.0"
+ dart: ">=2.12.0-259.9.beta <3.0.0"
+ flutter: ">=1.22.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 9045413..8733a6f 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: linkable
description: A Flutter widget to add links to your text. Linkable widget is a wrapper over RichText which allows you to render links that can be clicked to redirect to the URL.
-version: 1.0.7
+version: 1.0.8
homepage: https://github.com/AnupKumarPanwar/Linkable
environment:
@@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
- url_launcher: ^5.7.10
+ url_launcher: ^6.0.2
dev_dependencies:
flutter_test:
From d89141787b2e8499139131c2a5d3f422922d8dc7 Mon Sep 17 00:00:00 2001
From: Anup Kumar Panwar <1anuppanwar@gmail.com>
Date: Sun, 11 Apr 2021 14:20:47 +0530
Subject: [PATCH 05/11] v1.0.9 | Regenerated Podfile to fix failing build in
iOS
---
CHANGELOG.md | 4 +
README.md | 2 +-
example/ios/Podfile | 76 ++++---------------
example/ios/Podfile.lock | 18 +----
example/ios/Runner.xcodeproj/project.pbxproj | 11 +--
.../contents.xcworkspacedata | 2 +-
example/pubspec.lock | 2 +-
pubspec.yaml | 2 +-
8 files changed, 30 insertions(+), 87 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a74432f..dfc6bf8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,3 +29,7 @@
## [1.0.8] - 12 March 2021.
* Updated url_launcher version.
+
+## [1.0.9] - 11 April 2021.
+
+* Regenerated Podfile to fix failing build in iOS.
diff --git a/README.md b/README.md
index 12fe5f2..b44f741 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Note: You don't need to specify the URL scheme (mailto, tel etc). The widget wil
To install the package, add the following dependency to your `pubspec.yaml`
```
dependencies:
- linkable: ^1.0.8
+ linkable: ^1.0.9
url_launcher: ^6.0.2
```
## Usage
diff --git a/example/ios/Podfile b/example/ios/Podfile
index 6697f0a..1e8c3c9 100644
--- a/example/ios/Podfile
+++ b/example/ios/Podfile
@@ -10,78 +10,32 @@ project 'Runner', {
'Release' => :release,
}
-def parse_KV_file(file, separator='=')
- file_abs_path = File.expand_path(file)
- if !File.exists? file_abs_path
- return [];
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
- generated_key_values = {}
- skip_line_start_symbols = ["#", "/"]
- File.foreach(file_abs_path) do |line|
- next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
- plugin = line.split(pattern=separator)
- if plugin.length == 2
- podname = plugin[0].strip()
- path = plugin[1].strip()
- podpath = File.expand_path("#{path}", file_abs_path)
- generated_key_values[podname] = podpath
- else
- puts "Invalid plugin specification: #{line}"
- end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
end
- generated_key_values
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
target 'Runner' do
use_frameworks!
use_modular_headers!
- # Flutter Pod
-
- copied_flutter_dir = File.join(__dir__, 'Flutter')
- copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
- copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
- unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
- # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
- # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
- # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
-
- generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
- unless File.exist?(generated_xcode_build_settings_path)
- raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
- end
- generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
- cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
-
- unless File.exist?(copied_framework_path)
- FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
- end
- unless File.exist?(copied_podspec_path)
- FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
- end
- end
-
- # Keep pod path relative so it can be checked into Podfile.lock.
- pod 'Flutter', :path => 'Flutter'
-
- # Plugin Pods
-
- # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
- # referring to absolute paths on developers' machines.
- system('rm -rf .symlinks')
- system('mkdir -p .symlinks/plugins')
- plugin_pods = parse_KV_file('../.flutter-plugins')
- plugin_pods.each do |name, path|
- symlink = File.join('.symlinks', 'plugins', name)
- File.symlink(path, symlink)
- pod name, :path => File.join(symlink, 'ios')
- end
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
- target.build_configurations.each do |config|
- config.build_settings['ENABLE_BITCODE'] = 'NO'
- end
+ flutter_additional_ios_build_settings(target)
end
end
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock
index 9496339..d736005 100644
--- a/example/ios/Podfile.lock
+++ b/example/ios/Podfile.lock
@@ -2,33 +2,21 @@ PODS:
- Flutter (1.0.0)
- url_launcher (0.0.1):
- Flutter
- - url_launcher_macos (0.0.1):
- - Flutter
- - url_launcher_web (0.0.1):
- - Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
- - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
EXTERNAL SOURCES:
Flutter:
:path: Flutter
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
- url_launcher_macos:
- :path: ".symlinks/plugins/url_launcher_macos/ios"
- url_launcher_web:
- :path: ".symlinks/plugins/url_launcher_web/ios"
SPEC CHECKSUMS:
- Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
+ Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
- url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
- url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
-PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a
+PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
-COCOAPODS: 1.8.4
+COCOAPODS: 1.10.1
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 5d593bf..ba76732 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -225,15 +225,12 @@
buildActionMask = 2147483647;
files = (
);
- inputPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
- "${PODS_ROOT}/../Flutter/Flutter.framework",
- "${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
- outputPaths = (
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
index 1d526a1..919434a 100644
--- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -2,6 +2,6 @@
+ location = "self:">
diff --git a/example/pubspec.lock b/example/pubspec.lock
index a10e54e..776bb59 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -38,7 +38,7 @@ packages:
path: ".."
relative: true
source: path
- version: "1.0.8"
+ version: "1.0.9"
meta:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index 8733a6f..9e9ebac 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: linkable
description: A Flutter widget to add links to your text. Linkable widget is a wrapper over RichText which allows you to render links that can be clicked to redirect to the URL.
-version: 1.0.8
+version: 1.0.9
homepage: https://github.com/AnupKumarPanwar/Linkable
environment:
From 49266be069acba32425c5fe7ce01bd6c9387668c Mon Sep 17 00:00:00 2001
From: Anup Kumar Panwar <1anuppanwar@gmail.com>
Date: Sun, 13 Jun 2021 15:06:01 +0530
Subject: [PATCH 06/11] v2.0.0 | Migrated to null-safety
---
CHANGELOG.md | 4 ++++
README.md | 4 ++--
example/pubspec.lock | 10 +++++-----
lib/constants.dart | 1 -
lib/emailParser.dart | 2 +-
lib/httpParser.dart | 2 +-
lib/link.dart | 2 +-
lib/linkable.dart | 15 +++++++--------
lib/parser.dart | 2 +-
lib/telParser.dart | 2 +-
pubspec.lock | 10 +++++-----
pubspec.yaml | 6 +++---
12 files changed, 31 insertions(+), 29 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dfc6bf8..06f4ef0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,3 +33,7 @@
## [1.0.9] - 11 April 2021.
* Regenerated Podfile to fix failing build in iOS.
+
+## [2.0.0] - 13 June 2021.
+
+* Migrated to null-Safety.
diff --git a/README.md b/README.md
index b44f741..3abd4ca 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,8 @@ Note: You don't need to specify the URL scheme (mailto, tel etc). The widget wil
To install the package, add the following dependency to your `pubspec.yaml`
```
dependencies:
- linkable: ^1.0.9
- url_launcher: ^6.0.2
+ linkable: ^2.0.0
+ url_launcher: ^6.0.6
```
## Usage
### Basic
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 776bb59..4e463b4 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -38,7 +38,7 @@ packages:
path: ".."
relative: true
source: path
- version: "1.0.9"
+ version: "2.0.0"
meta:
dependency: transitive
description:
@@ -71,7 +71,7 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
- version: "6.0.2"
+ version: "6.0.6"
url_launcher_linux:
dependency: transitive
description:
@@ -92,7 +92,7 @@ packages:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.2"
+ version: "2.0.3"
url_launcher_web:
dependency: transitive
description:
@@ -115,5 +115,5 @@ packages:
source: hosted
version: "2.1.0"
sdks:
- dart: ">=2.12.0-259.9.beta <3.0.0"
- flutter: ">=1.22.0"
+ dart: ">=2.12.0 <3.0.0"
+ flutter: ">=2.0.0"
diff --git a/lib/constants.dart b/lib/constants.dart
index 7b50225..958b697 100644
--- a/lib/constants.dart
+++ b/lib/constants.dart
@@ -1,4 +1,3 @@
-//Types
const http = 'http';
const email = 'email';
const tel = 'tel';
diff --git a/lib/emailParser.dart b/lib/emailParser.dart
index 262e107..c3a27bf 100644
--- a/lib/emailParser.dart
+++ b/lib/emailParser.dart
@@ -13,7 +13,7 @@ class EmailParser implements Parser {
RegExp regExp = RegExp(pattern);
Iterable _allMatches = regExp.allMatches(text);
- List _links = List();
+ List _links = [];
for (RegExpMatch match in _allMatches) {
_links.add(Link(regExpMatch: match, type: email));
}
diff --git a/lib/httpParser.dart b/lib/httpParser.dart
index bad3a23..9dc57af 100644
--- a/lib/httpParser.dart
+++ b/lib/httpParser.dart
@@ -14,7 +14,7 @@ class HttpParser implements Parser {
RegExp regExp = RegExp(pattern, caseSensitive: false);
Iterable _allMatches = regExp.allMatches(text);
- List _links = List();
+ List _links = [];
for (RegExpMatch match in _allMatches) {
_links.add(Link(regExpMatch: match, type: http));
}
diff --git a/lib/link.dart b/lib/link.dart
index c6ae2ff..7bd1039 100644
--- a/lib/link.dart
+++ b/lib/link.dart
@@ -2,5 +2,5 @@ class Link {
RegExpMatch regExpMatch;
String type;
- Link({this.regExpMatch, this.type});
+ Link({required this.regExpMatch, required this.type});
}
diff --git a/lib/linkable.dart b/lib/linkable.dart
index 4b3cdc9..e7395ea 100644
--- a/lib/linkable.dart
+++ b/lib/linkable.dart
@@ -39,12 +39,12 @@ class Linkable extends StatelessWidget {
final textHeightBehavior;
- List _parsers = List();
- List _links = List();
+ List _parsers = [];
+ List _links = [];
Linkable({
- Key key,
- @required this.text,
+ Key? key,
+ required this.text,
this.textColor = Colors.black,
this.linkColor = Colors.blue,
this.style,
@@ -83,7 +83,7 @@ class Linkable extends StatelessWidget {
}
_getTextSpans() {
- List _textSpans = List();
+ List _textSpans = [];
int i = 0;
int pos = 0;
while (i < text.length) {
@@ -161,10 +161,9 @@ class Linkable extends StatelessWidget {
_filterLinks() {
_links.sort(
- (Link a, Link b) =>
- a.regExpMatch.start.compareTo(b.regExpMatch.start));
+ (Link a, Link b) => a.regExpMatch.start.compareTo(b.regExpMatch.start));
- List _filteredLinks = List();
+ List _filteredLinks = [];
if (_links.length > 0) {
_filteredLinks.add(_links[0]);
}
diff --git a/lib/parser.dart b/lib/parser.dart
index 6a7fdcc..d6c2606 100644
--- a/lib/parser.dart
+++ b/lib/parser.dart
@@ -2,6 +2,6 @@ import 'package:linkable/link.dart';
class Parser {
List parse() {
- return List();
+ return [];
}
}
diff --git a/lib/telParser.dart b/lib/telParser.dart
index bb8fd74..fc3f5e5 100644
--- a/lib/telParser.dart
+++ b/lib/telParser.dart
@@ -13,7 +13,7 @@ class TelParser implements Parser {
RegExp regExp = RegExp(pattern);
Iterable _allMatches = regExp.allMatches(text);
- List _links = List();
+ List _links = [];
for (RegExpMatch match in _allMatches) {
_links.add(Link(regExpMatch: match, type: tel));
}
diff --git a/pubspec.lock b/pubspec.lock
index 8cd1c58..271ae99 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -160,7 +160,7 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
- version: "6.0.2"
+ version: "6.0.6"
url_launcher_linux:
dependency: transitive
description:
@@ -181,14 +181,14 @@ packages:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.2"
+ version: "2.0.3"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.0"
+ version: "2.0.1"
url_launcher_windows:
dependency: transitive
description:
@@ -204,5 +204,5 @@ packages:
source: hosted
version: "2.1.0"
sdks:
- dart: ">=2.12.0-259.9.beta <3.0.0"
- flutter: ">=1.22.0"
+ dart: ">=2.12.0 <3.0.0"
+ flutter: ">=2.0.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 9e9ebac..90cf8bd 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,15 +1,15 @@
name: linkable
description: A Flutter widget to add links to your text. Linkable widget is a wrapper over RichText which allows you to render links that can be clicked to redirect to the URL.
-version: 1.0.9
+version: 2.0.0
homepage: https://github.com/AnupKumarPanwar/Linkable
environment:
- sdk: ">=2.7.0 <3.0.0"
+ sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
- url_launcher: ^6.0.2
+ url_launcher: ^6.0.6
dev_dependencies:
flutter_test:
From 781fe9735666b10ff93aaa0ed1379b482b7d98e8 Mon Sep 17 00:00:00 2001
From: Anup Kumar Panwar <1anuppanwar@gmail.com>
Date: Thu, 29 Jul 2021 15:43:20 +0530
Subject: [PATCH 07/11] v3.0.0 | Added SelectableText
---
CHANGELOG.md | 4 ++++
README.md | 4 ++--
example/pubspec.lock | 2 +-
example/pubspec.yaml | 2 +-
lib/linkable.dart | 24 ++++++------------------
pubspec.yaml | 2 +-
6 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 06f4ef0..b5f61d7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,3 +37,7 @@
## [2.0.0] - 13 June 2021.
* Migrated to null-Safety.
+
+## [3.0.0] - 29 July 2021.
+
+* Added SelectableText.
diff --git a/README.md b/README.md
index 3abd4ca..2f51fec 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,8 @@ Note: You don't need to specify the URL scheme (mailto, tel etc). The widget wil
To install the package, add the following dependency to your `pubspec.yaml`
```
dependencies:
- linkable: ^2.0.0
- url_launcher: ^6.0.6
+ linkable: ^3.0.0
+ url_launcher: ^6.0.9
```
## Usage
### Basic
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 4e463b4..90abf22 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -71,7 +71,7 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
- version: "6.0.6"
+ version: "6.0.9"
url_launcher_linux:
dependency: transitive
description:
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 9b5b222..4bae5e4 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
- url_launcher: ^6.0.2
+ url_launcher: ^6.0.9
linkable:
path: ..
diff --git a/lib/linkable.dart b/lib/linkable.dart
index e7395ea..679d619 100644
--- a/lib/linkable.dart
+++ b/lib/linkable.dart
@@ -25,16 +25,10 @@ class Linkable extends StatelessWidget {
final maxLines;
- final overflow;
-
final textScaleFactor;
- final softWrap;
-
final strutStyle;
- final locale;
-
final textWidthBasis;
final textHeightBehavior;
@@ -50,11 +44,8 @@ class Linkable extends StatelessWidget {
this.style,
this.textAlign = TextAlign.start,
this.textDirection,
- this.softWrap = true,
- this.overflow = TextOverflow.clip,
this.textScaleFactor = 1.0,
this.maxLines,
- this.locale,
this.strutStyle,
this.textWidthBasis = TextWidthBasis.parent,
this.textHeightBehavior,
@@ -63,22 +54,19 @@ class Linkable extends StatelessWidget {
@override
Widget build(BuildContext context) {
init();
- return RichText(
+ return SelectableText.rich(
+ TextSpan(
+ text: '',
+ style: style,
+ children: _getTextSpans(),
+ ),
textAlign: textAlign,
textDirection: textDirection,
- softWrap: softWrap,
- overflow: overflow,
textScaleFactor: textScaleFactor,
maxLines: maxLines,
- locale: locale,
strutStyle: strutStyle,
textWidthBasis: textWidthBasis,
textHeightBehavior: textHeightBehavior,
- text: TextSpan(
- text: '',
- style: style,
- children: _getTextSpans(),
- ),
);
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 90cf8bd..2abc405 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: linkable
description: A Flutter widget to add links to your text. Linkable widget is a wrapper over RichText which allows you to render links that can be clicked to redirect to the URL.
-version: 2.0.0
+version: 3.0.0
homepage: https://github.com/AnupKumarPanwar/Linkable
environment:
From 97bf0172be9bc2aba598478bb0a89d3f63be95d3 Mon Sep 17 00:00:00 2001
From: Anup Kumar Panwar <1anuppanwar@gmail.com>
Date: Thu, 29 Jul 2021 16:39:05 +0530
Subject: [PATCH 08/11] v3.0.1 | Removed undefined properties
---
CHANGELOG.md | 4 ++++
README.md | 4 +---
pubspec.yaml | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b5f61d7..9574081 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -41,3 +41,7 @@
## [3.0.0] - 29 July 2021.
* Added SelectableText.
+
+## [3.0.1] - 29 July 2021.
+
+* Removed undefined properties.
diff --git a/README.md b/README.md
index 2f51fec..d3616d5 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Note: You don't need to specify the URL scheme (mailto, tel etc). The widget wil
To install the package, add the following dependency to your `pubspec.yaml`
```
dependencies:
- linkable: ^3.0.0
+ linkable: ^3.0.1
url_launcher: ^6.0.9
```
## Usage
@@ -37,9 +37,7 @@ Linkable(
| `textAlign` | TextAlign value. (default: TextAlign.start) |
| `textDirection` | Determines the order to lay children out horizontally. |
| `maxLines` | Maximum number of lines to be displayed. |
-| `overflow` | Handles text that crosses maxLines. (default: TextOverflow.clip) |
| `textScaleFactor` | The number of font pixels for each logical pixel. |
-| `locale` | Sets text locale. |
## Screenshot
![Screenshot](./example/screenshot.png)
diff --git a/pubspec.yaml b/pubspec.yaml
index 2abc405..eede9b1 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: linkable
description: A Flutter widget to add links to your text. Linkable widget is a wrapper over RichText which allows you to render links that can be clicked to redirect to the URL.
-version: 3.0.0
+version: 3.0.1
homepage: https://github.com/AnupKumarPanwar/Linkable
environment:
From 951076ad96af78af2c14c685895b402aa4c51d2f Mon Sep 17 00:00:00 2001
From: Rob Evans
Date: Fri, 10 Dec 2021 10:21:54 +0000
Subject: [PATCH 09/11] Adds android specific installation instructions
---
README.md | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/README.md b/README.md
index d3616d5..3dc6571 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,37 @@ dependencies:
linkable: ^3.0.1
url_launcher: ^6.0.9
```
+### Android
+
+Starting from API30 (Android 11), your Android app has to list all apps it interacts with.
+
+The following is required in AndroidManifest.xml or links will fail to launch.
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ....
+
+
+```
+
## Usage
### Basic
```
From e6bdaed46ad2262921e890c40983135946b3b9dd Mon Sep 17 00:00:00 2001
From: monfadev
Date: Wed, 9 Feb 2022 02:35:08 +0700
Subject: [PATCH 10/11] Add underline text link
---
example/lib/generated_plugin_registrant.dart | 4 +++-
example/pubspec.lock | 17 +++++++++----
lib/linkable.dart | 2 +-
pubspec.lock | 25 +++++++++++++-------
4 files changed, 32 insertions(+), 16 deletions(-)
diff --git a/example/lib/generated_plugin_registrant.dart b/example/lib/generated_plugin_registrant.dart
index 0996199..438d9d4 100644
--- a/example/lib/generated_plugin_registrant.dart
+++ b/example/lib/generated_plugin_registrant.dart
@@ -2,11 +2,13 @@
// Generated file. Do not edit.
//
-import 'package:flutter_web_plugins/flutter_web_plugins.dart';
+// ignore_for_file: directives_ordering
// ignore_for_file: lines_longer_than_80_chars
import 'package:url_launcher_web/url_launcher_web.dart';
+import 'package:flutter_web_plugins/flutter_web_plugins.dart';
+
// ignore: public_member_api_docs
void registerPlugins(Registrar registrar) {
UrlLauncherPlugin.registerWith(registrar);
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 90abf22..92bfcfe 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -7,7 +7,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
collection:
dependency: transitive
description:
@@ -38,14 +38,21 @@ packages:
path: ".."
relative: true
source: path
- version: "2.0.0"
+ version: "3.0.1"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "0.1.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.0"
+ version: "1.7.0"
plugin_platform_interface:
dependency: transitive
description:
@@ -113,7 +120,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
sdks:
- dart: ">=2.12.0 <3.0.0"
+ dart: ">=2.14.0 <3.0.0"
flutter: ">=2.0.0"
diff --git a/lib/linkable.dart b/lib/linkable.dart
index 679d619..36f1cd0 100644
--- a/lib/linkable.dart
+++ b/lib/linkable.dart
@@ -101,7 +101,7 @@ class Linkable extends StatelessWidget {
_link(String text, String type) {
return TextSpan(
text: text,
- style: TextStyle(color: linkColor),
+ style: TextStyle(color: linkColor, decoration: TextDecoration.underline),
recognizer: TapGestureRecognizer()
..onTap = () {
_launch(_getUrl(text, type));
diff --git a/pubspec.lock b/pubspec.lock
index 271ae99..f8b6cba 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.5.0"
+ version: "2.8.2"
boolean_selector:
dependency: transitive
description:
@@ -21,14 +21,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.3.1"
clock:
dependency: transitive
description:
@@ -78,14 +78,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.10"
+ version: "0.12.11"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "0.1.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.0"
+ version: "1.7.0"
path:
dependency: transitive
description:
@@ -111,7 +118,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
- version: "1.8.0"
+ version: "1.8.1"
stack_trace:
dependency: transitive
description:
@@ -146,7 +153,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.19"
+ version: "0.4.8"
typed_data:
dependency: transitive
description:
@@ -202,7 +209,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
sdks:
- dart: ">=2.12.0 <3.0.0"
+ dart: ">=2.14.0 <3.0.0"
flutter: ">=2.0.0"
From cac2f0a8e3324a69cf4f443ba6a943fa568642ef Mon Sep 17 00:00:00 2001
From: monfadev
Date: Wed, 9 Feb 2022 10:31:09 +0700
Subject: [PATCH 11/11] Update underline params
---
example/lib/main.dart | 6 ++++++
lib/linkable.dart | 13 ++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 7dd6f6f..d376216 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -19,6 +19,12 @@ class LinkableExample extends StatelessWidget {
"Hi!\nI'm Anup.\n\nYou can email me at 1anuppanwar@gmail.com.\nOr just whatsapp me @ +91-8968894728.\n\nFor more info visit: \ngithub.com/anupkumarpanwar \nor\nhttps://www.linkedin.com/in/anupkumarpanwar/",
),
),
+ Center(
+ child: Linkable(
+ text: "mfaauzii@gmail.com",
+ underline: TextDecoration.underline,
+ ),
+ ),
],
),
),
diff --git a/lib/linkable.dart b/lib/linkable.dart
index 36f1cd0..3ef5f8b 100644
--- a/lib/linkable.dart
+++ b/lib/linkable.dart
@@ -33,6 +33,8 @@ class Linkable extends StatelessWidget {
final textHeightBehavior;
+ final underline;
+
List _parsers = [];
List _links = [];
@@ -49,6 +51,7 @@ class Linkable extends StatelessWidget {
this.strutStyle,
this.textWidthBasis = TextWidthBasis.parent,
this.textHeightBehavior,
+ this.underline,
}) : super(key: key);
@override
@@ -58,7 +61,7 @@ class Linkable extends StatelessWidget {
TextSpan(
text: '',
style: style,
- children: _getTextSpans(),
+ children: _getTextSpans(underline),
),
textAlign: textAlign,
textDirection: textDirection,
@@ -70,7 +73,7 @@ class Linkable extends StatelessWidget {
);
}
- _getTextSpans() {
+ _getTextSpans(TextDecoration underline) {
List _textSpans = [];
int i = 0;
int pos = 0;
@@ -84,7 +87,7 @@ class Linkable extends StatelessWidget {
_textSpans.add(_link(
text.substring(
_links[pos].regExpMatch.start, _links[pos].regExpMatch.end),
- _links[pos].type));
+ _links[pos].type, underline));
i = _links[pos].regExpMatch.end;
pos++;
} else {
@@ -98,10 +101,10 @@ class Linkable extends StatelessWidget {
return TextSpan(text: text, style: TextStyle(color: textColor));
}
- _link(String text, String type) {
+ _link(String text, String type, TextDecoration underline) {
return TextSpan(
text: text,
- style: TextStyle(color: linkColor, decoration: TextDecoration.underline),
+ style: TextStyle(color: linkColor, decoration: underline),
recognizer: TapGestureRecognizer()
..onTap = () {
_launch(_getUrl(text, type));