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
3c379aaf
Unverified
Commit
3c379aaf
authored
Feb 05, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Feb 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace cleanup (#14458)
parent
f5dea932
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
44 additions
and
44 deletions
+44
-44
test.dart
dev/bots/test.dart
+1
-1
run.dart
dev/devicelab/bin/run.dart
+1
-1
gradle_plugin_test.dart
dev/devicelab/bin/tasks/gradle_plugin_test.dart
+1
-1
adb.dart
dev/devicelab/lib/framework/adb.dart
+1
-1
utils.dart
dev/devicelab/lib/framework/utils.dart
+1
-1
manifest_test.dart
dev/devicelab/test/manifest_test.dart
+1
-1
gen_localizations.dart
dev/tools/gen_localizations.dart
+8
-8
stock_data.dart
examples/stocks/lib/stock_data.dart
+2
-2
widget_inspector.dart
packages/flutter/lib/src/widgets/widget_inspector.dart
+1
-1
platform_channel_test.dart
packages/flutter/test/services/platform_channel_test.dart
+6
-6
driver.dart
packages/flutter_driver/lib/src/driver/driver.dart
+4
-4
flutter_driver_test.dart
packages/flutter_driver/test/flutter_driver_test.dart
+2
-2
localizations.dart
...ges/flutter_localizations/lib/src/l10n/localizations.dart
+7
-7
widget_tester_test.dart
packages/flutter_test/test/widget_tester_test.dart
+5
-5
update_packages.dart
packages/flutter_tools/lib/src/commands/update_packages.dart
+1
-1
plugins.dart
packages/flutter_tools/lib/src/plugins.dart
+1
-1
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+1
-1
No files found.
dev/bots/test.dart
View file @
3c379aaf
...
...
@@ -544,7 +544,7 @@ Future<Null> _verifyGeneratedPluginRegistrants(String flutterRoot) async {
for
(
String
package
in
packageToRegistrants
.
keys
)
{
final
Map
<
File
,
String
>
fileToContent
=
<
File
,
String
>{};
for
(
File
f
in
packageToRegistrants
[
package
])
{
for
(
File
f
in
packageToRegistrants
[
package
])
{
fileToContent
[
f
]
=
f
.
readAsStringSync
();
}
await
_runCommand
(
flutter
,
<
String
>[
'inject-plugins'
],
...
...
dev/devicelab/bin/run.dart
View file @
3c379aaf
...
...
@@ -23,7 +23,7 @@ Future<Null> main(List<String> rawArgs) async {
ArgResults
args
;
try
{
args
=
_argParser
.
parse
(
rawArgs
);
}
on
FormatException
catch
(
error
)
{
}
on
FormatException
catch
(
error
)
{
stderr
.
writeln
(
'
${error.message}
\n
'
);
stderr
.
writeln
(
'Usage:
\n
'
);
stderr
.
writeln
(
_argParser
.
usage
);
...
...
dev/devicelab/bin/tasks/gradle_plugin_test.dart
View file @
3c379aaf
...
...
@@ -77,7 +77,7 @@ void main() {
return
new
TaskResult
.
failure
(
'Gradle did not produce an apk file at the expected place'
);
return
new
TaskResult
.
success
(
null
);
}
catch
(
e
)
{
}
catch
(
e
)
{
return
new
TaskResult
.
failure
(
e
.
toString
());
}
finally
{
project
.
parent
.
deleteSync
(
recursive:
true
);
...
...
dev/devicelab/lib/framework/adb.dart
View file @
3c379aaf
...
...
@@ -170,7 +170,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
// TODO(yjbanov): check battery level
await
device
.
_getWakefulness
();
results
[
'android-device-
$deviceId
'
]
=
new
HealthCheckResult
.
success
();
}
catch
(
e
,
s
)
{
}
catch
(
e
,
s
)
{
results
[
'android-device-
$deviceId
'
]
=
new
HealthCheckResult
.
error
(
e
,
s
);
}
}
...
...
dev/devicelab/lib/framework/utils.dart
View file @
3c379aaf
...
...
@@ -476,7 +476,7 @@ String extractCloudAuthTokenArg(List<String> rawArgs) {
ArgResults
args
;
try
{
args
=
argParser
.
parse
(
rawArgs
);
}
on
FormatException
catch
(
error
)
{
}
on
FormatException
catch
(
error
)
{
stderr
.
writeln
(
'
${error.message}
\n
'
);
stderr
.
writeln
(
'Usage:
\n
'
);
stderr
.
writeln
(
argParser
.
usage
);
...
...
dev/devicelab/test/manifest_test.dart
View file @
3c379aaf
...
...
@@ -36,7 +36,7 @@ void main() {
test
(
testDescription
,
()
{
try
{
loadTaskManifest
(
yaml
);
}
on
ManifestError
catch
(
error
)
{
}
on
ManifestError
catch
(
error
)
{
expect
(
error
.
message
,
errorMessage
);
}
});
...
...
dev/tools/gen_localizations.dart
View file @
3c379aaf
...
...
@@ -96,7 +96,7 @@ String generateTranslationBundles() {
final
Map
<
String
,
List
<
String
>>
languageToLocales
=
<
String
,
List
<
String
>>{};
final
Set
<
String
>
allResourceIdentifiers
=
new
Set
<
String
>();
for
(
String
locale
in
localeToResources
.
keys
.
toList
()..
sort
())
{
for
(
String
locale
in
localeToResources
.
keys
.
toList
()..
sort
())
{
final
List
<
String
>
codes
=
locale
.
split
(
'_'
);
// [language, country]
assert
(
codes
.
length
==
1
||
codes
.
length
==
2
);
languageToLocales
[
codes
[
0
]]
??=
<
String
>[];
...
...
@@ -142,7 +142,7 @@ class TranslationBundle {
// @override String get scriptCategory => r'English-like';
// ...
// }
for
(
String
language
in
languageToLocales
.
keys
)
{
for
(
String
language
in
languageToLocales
.
keys
)
{
final
Map
<
String
,
String
>
resources
=
localeToResources
[
language
];
output
.
writeln
(
'''
...
...
@@ -170,9 +170,9 @@ class _Bundle_$language extends TranslationBundle {
// @override String get licensesPageTitle => r'Licences';
// ...
// }
for
(
String
language
in
languageToLocales
.
keys
)
{
for
(
String
language
in
languageToLocales
.
keys
)
{
final
Map
<
String
,
String
>
languageResources
=
localeToResources
[
language
];
for
(
String
localeName
in
languageToLocales
[
language
])
{
for
(
String
localeName
in
languageToLocales
[
language
])
{
if
(
localeName
==
language
)
continue
;
final
Map
<
String
,
String
>
localeResources
=
localeToResources
[
localeName
];
...
...
@@ -198,8 +198,8 @@ class _Bundle_$localeName extends TranslationBundle {
output
.
writeln
(
'''
TranslationBundle translationBundleForLocale(Locale locale) {
switch(locale.languageCode) {'''
);
for
(
String
language
in
languageToLocales
.
keys
)
{
switch
(locale.languageCode) {'''
);
for
(
String
language
in
languageToLocales
.
keys
)
{
if
(
languageToLocales
[
language
].
length
==
1
)
{
output
.
writeln
(
'''
case
\'
$language
\'
:
...
...
@@ -207,8 +207,8 @@ TranslationBundle translationBundleForLocale(Locale locale) {
}
else
{
output
.
writeln
(
'''
case
\'
$language
\'
: {
switch(locale.toString()) {'''
);
for
(
String
localeName
in
languageToLocales
[
language
])
{
switch
(locale.toString()) {'''
);
for
(
String
localeName
in
languageToLocales
[
language
])
{
if
(
localeName
==
language
)
continue
;
output
.
writeln
(
'''
...
...
examples/stocks/lib/stock_data.dart
View file @
3c379aaf
...
...
@@ -29,9 +29,9 @@ class Stock {
// FIXME: This class should only have static data, not lastSale, etc.
// "Symbol","Name","LastSale","MarketCap","IPOyear","Sector","industry","Summary Quote",
lastSale
=
0.0
;
try
{
try
{
lastSale
=
double
.
parse
(
fields
[
2
]);
}
catch
(
_
)
{}
}
catch
(
_
)
{}
symbol
=
fields
[
0
];
name
=
fields
[
1
];
marketCap
=
fields
[
4
];
...
...
packages/flutter/lib/src/widgets/widget_inspector.dart
View file @
3c379aaf
...
...
@@ -340,7 +340,7 @@ class WidgetInspectorService {
List
<
_DiagnosticsPathNode
>
_getRenderObjectParentChain
(
RenderObject
renderObject
,
String
groupName
)
{
final
List
<
RenderObject
>
chain
=
<
RenderObject
>[];
while
(
renderObject
!=
null
)
{
while
(
renderObject
!=
null
)
{
chain
.
add
(
renderObject
);
renderObject
=
renderObject
.
parent
;
}
...
...
packages/flutter/test/services/platform_channel_test.dart
View file @
3c379aaf
...
...
@@ -66,11 +66,11 @@ void main() {
try
{
await
channel
.
invokeMethod
(
'sayHello'
,
'hello'
);
fail
(
'Exception expected'
);
}
on
PlatformException
catch
(
e
)
{
}
on
PlatformException
catch
(
e
)
{
expect
(
e
.
code
,
equals
(
'bad'
));
expect
(
e
.
message
,
equals
(
'Something happened'
));
expect
(
e
.
details
,
equals
(<
String
,
dynamic
>{
'a'
:
42
,
'b'
:
3.14
}));
}
catch
(
e
)
{
}
catch
(
e
)
{
fail
(
'PlatformException expected'
);
}
});
...
...
@@ -82,10 +82,10 @@ void main() {
try
{
await
channel
.
invokeMethod
(
'sayHello'
,
'hello'
);
fail
(
'Exception expected'
);
}
on
MissingPluginException
catch
(
e
)
{
}
on
MissingPluginException
catch
(
e
)
{
expect
(
e
.
message
,
contains
(
'sayHello'
));
expect
(
e
.
message
,
contains
(
'ch7'
));
}
catch
(
e
)
{
}
catch
(
e
)
{
fail
(
'MissingPluginException expected'
);
}
});
...
...
@@ -130,7 +130,7 @@ void main() {
try
{
jsonMethod
.
decodeEnvelope
(
envelope
);
fail
(
'Exception expected'
);
}
on
PlatformException
catch
(
e
)
{
}
on
PlatformException
catch
(
e
)
{
expect
(
e
.
code
,
equals
(
'bad'
));
expect
(
e
.
message
,
equals
(
'sayHello failed'
));
}
catch
(
e
)
{
...
...
@@ -149,7 +149,7 @@ void main() {
try
{
jsonMethod
.
decodeEnvelope
(
envelope
);
fail
(
'Exception expected'
);
}
on
PlatformException
catch
(
e
)
{
}
on
PlatformException
catch
(
e
)
{
expect
(
e
.
code
,
equals
(
'error'
));
expect
(
e
.
message
,
equals
(
'Invalid argument(s): bad'
));
}
catch
(
e
)
{
...
...
packages/flutter_driver/lib/src/driver/driver.dart
View file @
3c379aaf
...
...
@@ -568,7 +568,7 @@ class FlutterDriver {
'recordedStreams'
:
_timelineStreamsToString
(
streams
)
}).
timeout
(
timeout
);
return
null
;
}
catch
(
error
,
stackTrace
)
{
}
catch
(
error
,
stackTrace
)
{
throw
new
DriverError
(
'Failed to start tracing due to remote error'
,
error
,
...
...
@@ -584,7 +584,7 @@ class FlutterDriver {
.
sendRequest
(
_kSetVMTimelineFlagsMethod
,
<
String
,
String
>{
'recordedStreams'
:
'[]'
})
.
timeout
(
timeout
);
return
new
Timeline
.
fromJson
(
await
_peer
.
sendRequest
(
_kGetVMTimelineMethod
));
}
catch
(
error
,
stackTrace
)
{
}
catch
(
error
,
stackTrace
)
{
throw
new
DriverError
(
'Failed to stop tracing due to remote error'
,
error
,
...
...
@@ -626,7 +626,7 @@ class FlutterDriver {
await
_peer
.
sendRequest
(
_kClearVMTimelineMethod
,
<
String
,
String
>{})
.
timeout
(
timeout
);
}
catch
(
error
,
stackTrace
)
{
}
catch
(
error
,
stackTrace
)
{
throw
new
DriverError
(
'Failed to clear event timeline due to remote error'
,
error
,
...
...
@@ -723,7 +723,7 @@ Future<VMServiceClientConnection> _waitAndConnect(String url) async {
new
VMServiceClient
(
new
IOWebSocketChannel
(
ws1
).
cast
()),
new
rpc
.
Peer
(
new
IOWebSocketChannel
(
ws2
).
cast
())..
listen
()
);
}
catch
(
e
)
{
}
catch
(
e
)
{
await
ws1
?.
close
();
await
ws2
?.
close
();
...
...
packages/flutter_driver/test/flutter_driver_test.dart
View file @
3c379aaf
...
...
@@ -363,7 +363,7 @@ void main() {
try
{
await
driver
.
waitFor
(
find
.
byTooltip
(
'foo'
),
timeout:
const
Duration
(
milliseconds:
100
));
fail
(
'expected an exception'
);
}
catch
(
error
)
{
}
catch
(
error
)
{
expect
(
error
is
DriverError
,
isTrue
);
expect
(
error
.
message
,
'Failed to fulfill WaitFor: Flutter application not responding'
);
}
...
...
@@ -378,7 +378,7 @@ void main() {
try
{
await
driver
.
waitFor
(
find
.
byTooltip
(
'foo'
));
fail
(
'expected an exception'
);
}
catch
(
error
)
{
}
catch
(
error
)
{
expect
(
error
is
DriverError
,
isTrue
);
expect
(
error
.
message
,
'Error in Flutter application: {message: This is a failure}'
);
}
...
...
packages/flutter_localizations/lib/src/l10n/localizations.dart
View file @
3c379aaf
...
...
@@ -1397,18 +1397,18 @@ class _Bundle_zh_TW extends TranslationBundle {
}
TranslationBundle
translationBundleForLocale
(
Locale
locale
)
{
switch
(
locale
.
languageCode
)
{
switch
(
locale
.
languageCode
)
{
case
'ar'
:
return
const
_Bundle_ar
();
case
'de'
:
{
switch
(
locale
.
toString
())
{
switch
(
locale
.
toString
())
{
case
'de_CH'
:
return
const
_Bundle_de_CH
();
}
return
const
_Bundle_de
();
}
case
'en'
:
{
switch
(
locale
.
toString
())
{
switch
(
locale
.
toString
())
{
case
'en_AU'
:
return
const
_Bundle_en_AU
();
case
'en_CA'
:
...
...
@@ -1427,7 +1427,7 @@ TranslationBundle translationBundleForLocale(Locale locale) {
return
const
_Bundle_en
();
}
case
'es'
:
{
switch
(
locale
.
toString
())
{
switch
(
locale
.
toString
())
{
case
'es_419'
:
return
const
_Bundle_es_419
();
case
'es_AR'
:
...
...
@@ -1474,7 +1474,7 @@ TranslationBundle translationBundleForLocale(Locale locale) {
case
'fa'
:
return
const
_Bundle_fa
();
case
'fr'
:
{
switch
(
locale
.
toString
())
{
switch
(
locale
.
toString
())
{
case
'fr_CA'
:
return
const
_Bundle_fr_CA
();
}
...
...
@@ -1497,7 +1497,7 @@ TranslationBundle translationBundleForLocale(Locale locale) {
case
'ps'
:
return
const
_Bundle_ps
();
case
'pt'
:
{
switch
(
locale
.
toString
())
{
switch
(
locale
.
toString
())
{
case
'pt_PT'
:
return
const
_Bundle_pt_PT
();
}
...
...
@@ -1514,7 +1514,7 @@ TranslationBundle translationBundleForLocale(Locale locale) {
case
'ur'
:
return
const
_Bundle_ur
();
case
'zh'
:
{
switch
(
locale
.
toString
())
{
switch
(
locale
.
toString
())
{
case
'zh_HK'
:
return
const
_Bundle_zh_HK
();
case
'zh_TW'
:
...
...
packages/flutter_test/test/widget_tester_test.dart
View file @
3c379aaf
...
...
@@ -21,7 +21,7 @@ void main() {
TestFailure
failure
;
try
{
expect
(
find
.
text
(
'foo'
,
skipOffstage:
false
),
findsOneWidget
);
}
catch
(
e
)
{
}
catch
(
e
)
{
failure
=
e
;
}
...
...
@@ -44,7 +44,7 @@ void main() {
TestFailure
failure
;
try
{
expect
(
find
.
text
(
'foo'
,
skipOffstage:
false
),
findsNothing
);
}
catch
(
e
)
{
}
catch
(
e
)
{
failure
=
e
;
}
...
...
@@ -62,7 +62,7 @@ void main() {
TestFailure
failure
;
try
{
expect
(
find
.
text
(
'foo'
),
findsNothing
);
}
catch
(
e
)
{
}
catch
(
e
)
{
failure
=
e
;
}
...
...
@@ -117,7 +117,7 @@ void main() {
TestFailure
failure
;
try
{
expect
(
find
.
byElementPredicate
((
_
)
=>
false
,
description:
customDescription
),
findsOneWidget
);
}
catch
(
e
)
{
}
catch
(
e
)
{
failure
=
e
;
}
...
...
@@ -134,7 +134,7 @@ void main() {
TestFailure
failure
;
try
{
expect
(
find
.
byWidgetPredicate
((
_
)
=>
false
,
description:
customDescription
),
findsOneWidget
);
}
catch
(
e
)
{
}
catch
(
e
)
{
failure
=
e
;
}
...
...
packages/flutter_tools/lib/src/commands/update_packages.dart
View file @
3c379aaf
...
...
@@ -238,7 +238,7 @@ class UpdatePackagesCommand extends FlutterCommand {
final
List
<
_DependencyLink
>
paths
=
<
_DependencyLink
>[];
traversalQueue
.
addFirst
(
new
_DependencyLink
(
from:
null
,
to:
from
));
while
(
traversalQueue
.
isNotEmpty
)
{
while
(
traversalQueue
.
isNotEmpty
)
{
final
_DependencyLink
link
=
traversalQueue
.
removeLast
();
if
(
link
.
to
==
to
)
paths
.
add
(
link
);
...
...
packages/flutter_tools/lib/src/plugins.dart
View file @
3c379aaf
...
...
@@ -65,7 +65,7 @@ List<Plugin> _findPlugins(String directory) {
try
{
final
String
packagesFile
=
fs
.
path
.
join
(
directory
,
PackageMap
.
globalPackagesPath
);
packages
=
new
PackageMap
(
packagesFile
).
map
;
}
on
FormatException
catch
(
e
)
{
}
on
FormatException
catch
(
e
)
{
printTrace
(
'Invalid .packages file:
$e
'
);
return
plugins
;
}
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
3c379aaf
...
...
@@ -1045,7 +1045,7 @@ class Isolate extends ServiceObjectOwner {
}
final
Map
<
String
,
dynamic
>
response
=
await
invokeRpcRaw
(
'_reloadSources'
,
params:
arguments
);
return
response
;
}
on
rpc
.
RpcException
catch
(
e
)
{
}
on
rpc
.
RpcException
catch
(
e
)
{
return
new
Future
<
Map
<
String
,
dynamic
>>.
error
(<
String
,
dynamic
>{
'code'
:
e
.
code
,
'message'
:
e
.
message
,
...
...
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