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
33ef949e
Commit
33ef949e
authored
Mar 04, 2017
by
Chris Bracken
Committed by
GitHub
Mar 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Declare locals as final where not reassigned (#8576)
Fix a few regressions.
parent
cdeb83cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
main.dart
examples/platform_services/lib/main.dart
+1
-1
devfs_test.dart
packages/flutter_tools/test/devfs_test.dart
+5
-5
No files found.
examples/platform_services/lib/main.dart
View file @
33ef949e
...
...
@@ -19,7 +19,7 @@ class _PlatformServicesState extends State<PlatformServices> {
Future
<
Null
>
_getLocation
()
async
{
String
location
;
try
{
List
<
double
>
result
=
await
platform
.
invokeMethod
(
'getLocation'
,
'network'
);
final
List
<
double
>
result
=
await
platform
.
invokeMethod
(
'getLocation'
,
'network'
);
location
=
'Latitude
${result[0]}
, Longitude
${result[1]}
.'
;
}
on
PlatformException
catch
(
e
)
{
location
=
"Failed to get location: '
${e.message}
'."
;
...
...
packages/flutter_tools/test/devfs_test.dart
View file @
33ef949e
...
...
@@ -145,11 +145,11 @@ void main() {
expect
(
bytes
,
69
);
});
testUsingContext
(
'add new package with double slashes in URI'
,
()
async
{
String
packageName
=
'doubleslashpkg'
;
final
String
packageName
=
'doubleslashpkg'
;
await
_createPackage
(
packageName
,
'somefile.txt'
,
doubleSlash:
true
);
Set
<
String
>
fileFilter
=
new
Set
<
String
>();
List
<
Uri
>
pkgUris
=
<
Uri
>[
fs
.
path
.
toUri
(
basePath
)]..
addAll
(
_packages
.
values
);
final
Set
<
String
>
fileFilter
=
new
Set
<
String
>();
final
List
<
Uri
>
pkgUris
=
<
Uri
>[
fs
.
path
.
toUri
(
basePath
)]..
addAll
(
_packages
.
values
);
for
(
Uri
pkgUri
in
pkgUris
)
{
if
(!
pkgUri
.
isAbsolute
)
{
pkgUri
=
fs
.
path
.
toUri
(
fs
.
path
.
join
(
basePath
,
pkgUri
.
path
));
...
...
@@ -161,7 +161,7 @@ void main() {
.
toList
());
}
int
bytes
=
await
devFS
.
update
(
fileFilter:
fileFilter
);
final
int
bytes
=
await
devFS
.
update
(
fileFilter:
fileFilter
);
devFSOperations
.
expectMessages
(<
String
>[
'writeFile test .packages'
,
'writeFile test packages/doubleslashpkg/somefile.txt'
,
...
...
@@ -364,7 +364,7 @@ Future<Null> _createPackage(String pkgName, String pkgFileName, { bool doubleSla
String
pkgFilePath
=
fs
.
path
.
join
(
pkgTempDir
.
path
,
pkgName
,
'lib'
,
pkgFileName
);
if
(
doubleSlash
)
{
// Force two separators into the path.
String
doubleSlash
=
fs
.
path
.
separator
+
fs
.
path
.
separator
;
final
String
doubleSlash
=
fs
.
path
.
separator
+
fs
.
path
.
separator
;
pkgFilePath
=
pkgTempDir
.
path
+
doubleSlash
+
fs
.
path
.
join
(
pkgName
,
'lib'
,
pkgFileName
);
}
final
File
pkgFile
=
fs
.
file
(
pkgFilePath
);
...
...
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