Skip to content

Commit

Permalink
upgrade to 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaGao committed Aug 18, 2020
1 parent 2f74317 commit 37084dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.0.2] - 2020-08-18
* upgrade version of url_launcher to 5.5.0
* add some api doc.

## [1.0.1] - 2019-12-15

* Add Example Project
Expand Down
11 changes: 9 additions & 2 deletions lib/url_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

/// Url & Text mix Widget
class UrlText extends StatelessWidget {
/// The Url and Text mix String
final String text;

/// The Text style
final TextStyle style;

/// The Url style
final TextStyle urlStyle;

/// Create a UrlText widget.
UrlText({this.text, this.style, this.urlStyle});

List<InlineSpan> getTextSpans() {
List<InlineSpan> _getTextSpans() {
List<InlineSpan> widgets = List<InlineSpan>();
RegExp reg = RegExp(
r"(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]*");
Expand Down Expand Up @@ -58,7 +65,7 @@ class UrlText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return RichText(
text: TextSpan(children: getTextSpans()),
text: TextSpan(children: _getTextSpans()),
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: url_text
description: Url Test. Identify web links in text and make them clickable.
version: 1.0.1
version: 1.0.2
homepage: https://github.com/LunaGao/Url_Text

environment:
Expand All @@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
url_launcher: ^5.4.1
url_launcher: ^5.5.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 37084dd

Please sign in to comment.