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
ede72a80
Commit
ede72a80
authored
May 08, 2017
by
Sarah Zakarias
Committed by
GitHub
May 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Revert plugin use in gallery (#9838)" (#9877)
This reverts commit
4bbf158b
.
parent
f52cbe81
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
3 deletions
+52
-3
MainActivity.java
...c/main/java/io/flutter/examples/gallery/MainActivity.java
+1
-0
PluginRegistry.java
.../app/src/main/java/io/flutter/plugins/PluginRegistry.java
+3
-0
flutter_gallery.iml
examples/flutter_gallery/flutter_gallery.iml
+2
-0
Podfile
examples/flutter_gallery/ios/Podfile
+38
-0
PluginRegistry.h
examples/flutter_gallery/ios/Runner/PluginRegistry.h
+2
-0
PluginRegistry.m
examples/flutter_gallery/ios/Runner/PluginRegistry.m
+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 @
ede72a80
package
io
.
flutter
.
examples
.
gallery
;
import
android.os.Bundle
;
import
io.flutter.app.FlutterActivity
;
import
io.flutter.plugins.PluginRegistry
;
...
...
examples/flutter_gallery/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java
View file @
ede72a80
...
...
@@ -2,13 +2,16 @@ package io.flutter.plugins;
import
io.flutter.app.FlutterActivity
;
import
io.flutter.plugins.url_launcher.UrlLauncherPlugin
;
/**
* Generated file. Do not edit.
*/
public
class
PluginRegistry
{
public
UrlLauncherPlugin
url_launcher
;
public
void
registerAll
(
FlutterActivity
activity
)
{
url_launcher
=
UrlLauncherPlugin
.
register
(
activity
);
}
}
examples/flutter_gallery/flutter_gallery.iml
View file @
ede72a80
...
...
@@ -7,6 +7,8 @@
<excludeFolder
url=
"file://$MODULE_DIR$/.pub"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/packages"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/test/calculator/packages"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/test/packages"
/>
</content>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Dart Packages"
level=
"project"
/>
...
...
examples/flutter_gallery/ios/Podfile
0 → 100644
View file @
ede72a80
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
if
ENV
[
'FLUTTER_FRAMEWORK_DIR'
]
==
nil
abort
(
'Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework'
)
end
target
'Runner'
do
use_frameworks!
# Pods for Runner
# Flutter Pods
pod
'Flutter'
,
:path
=>
ENV
[
'FLUTTER_FRAMEWORK_DIR'
]
if
File
.
exists?
'../.flutter-plugins'
flutter_root
=
File
.
expand_path
(
'..'
)
File
.
foreach
(
'../.flutter-plugins'
)
{
|
line
|
plugin
=
line
.
split
(
pattern
=
'='
)
if
plugin
.
length
==
2
name
=
plugin
[
0
].
strip
()
path
=
plugin
[
1
].
strip
()
resolved_path
=
File
.
expand_path
(
"
#{
path
}
/ios"
,
flutter_root
)
pod
name
,
:path
=>
resolved_path
else
puts
"Invalid plugin specification:
#{
line
}
"
end
}
end
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
end
end
examples/flutter_gallery/ios/Runner/PluginRegistry.h
View file @
ede72a80
...
...
@@ -7,9 +7,11 @@
#import <Flutter/Flutter.h>
#import "UrlLauncherPlugin.h"
@interface
PluginRegistry
:
NSObject
@property
(
readonly
,
nonatomic
)
UrlLauncherPlugin
*
url_launcher
;
-
(
instancetype
)
initWithController
:(
FlutterViewController
*
)
controller
;
...
...
examples/flutter_gallery/ios/Runner/PluginRegistry.m
View file @
ede72a80
...
...
@@ -8,6 +8,7 @@
-
(
instancetype
)
initWithController
:(
FlutterViewController
*
)
controller
{
if
(
self
=
[
super
init
])
{
_url_launcher
=
[[
UrlLauncherPlugin
alloc
]
initWithController
:
controller
];
}
return
self
;
}
...
...
examples/flutter_gallery/lib/gallery/drawer.dart
View file @
ede72a80
...
...
@@ -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 @
ede72a80
...
...
@@ -6,6 +6,7 @@ dependencies:
flutter
:
sdk
:
flutter
url_launcher
:
^0.3.3
# 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