Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
02dfd6be
Commit
02dfd6be
authored
May 05, 2017
by
Sarah Zakarias
Committed by
GitHub
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use url_launcher plugin in Flutter Gallery (#9751)
parent
20da5c1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
MainActivity.java
...c/main/java/io/flutter/examples/gallery/MainActivity.java
+1
-0
drawer.dart
examples/flutter_gallery/lib/gallery/drawer.dart
+4
-3
pubspec.yaml
examples/flutter_gallery/pubspec.yaml
+1
-0
No files found.
examples/flutter_gallery/android/app/src/main/java/io/flutter/examples/gallery/MainActivity.java
View file @
02dfd6be
package
io
.
flutter
.
examples
.
gallery
;
import
android.os.Bundle
;
import
io.flutter.app.FlutterActivity
;
import
io.flutter.plugins.PluginRegistry
;
...
...
examples/flutter_gallery/lib/gallery/drawer.dart
View file @
02dfd6be
...
...
@@ -7,14 +7,15 @@ import 'dart:math' as math;
import
'package:flutter/foundation.dart'
show
defaultTargetPlatform
,
required
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
class
LinkTextSpan
extends
TextSpan
{
LinkTextSpan
({
TextStyle
style
,
String
url
,
String
text
})
:
super
(
style:
style
,
text:
text
??
url
,
recognizer:
new
TapGestureRecognizer
()..
onTap
=
()
{
UrlLauncher
.
launch
(
url
);
launch
(
url
);
}
);
}
...
...
@@ -203,7 +204,7 @@ class GalleryDrawer extends StatelessWidget {
leading:
const
Icon
(
Icons
.
report
),
title:
const
Text
(
'Send feedback'
),
onTap:
onSendFeedback
??
()
{
UrlLauncher
.
launch
(
'https://github.com/flutter/flutter/issues/new'
);
launch
(
'https://github.com/flutter/flutter/issues/new'
);
},
);
...
...
examples/flutter_gallery/pubspec.yaml
View file @
02dfd6be
...
...
@@ -6,6 +6,7 @@ dependencies:
flutter
:
sdk
:
flutter
url_launcher
:
^0.3.1
# Also update dev/benchmarks/complex_layout/pubspec.yaml
flutter_gallery_assets
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment