style(dart): Run dartfmt v0.1.8+2 on all pure Dart code

Update formatting for all pure Dart code in the repo.
This commit is contained in:
Tim Blasi
2015-07-27 17:26:28 -07:00
parent 6fac901151
commit 2c9951273a
63 changed files with 406 additions and 273 deletions

View File

@ -29,7 +29,8 @@ class PromiseWrapper {
return promise.catchError(onError);
}
static PromiseCompleter<dynamic> completer() => new PromiseCompleter(new Completer());
static PromiseCompleter<dynamic> completer() =>
new PromiseCompleter(new Completer());
}
class TimerWrapper {

View File

@ -4,18 +4,12 @@ import 'package:intl/intl.dart';
String _normalizeLocale(String locale) => locale.replaceAll('-', '_');
enum NumberFormatStyle {
DECIMAL,
PERCENT,
CURRENCY
}
enum NumberFormatStyle { DECIMAL, PERCENT, CURRENCY }
class NumberFormatter {
static String format(num number, String locale, NumberFormatStyle style,
{int minimumIntegerDigits: 1,
int minimumFractionDigits: 0,
int maximumFractionDigits: 3,
String currency,
{int minimumIntegerDigits: 1, int minimumFractionDigits: 0,
int maximumFractionDigits: 3, String currency,
bool currencyAsSymbol: false}) {
locale = _normalizeLocale(locale);
NumberFormat formatter;
@ -29,7 +23,8 @@ class NumberFormatter {
case NumberFormatStyle.CURRENCY:
if (currencyAsSymbol) {
// See https://github.com/dart-lang/intl/issues/59.
throw new Exception('Displaying currency as symbol is not supported.');
throw new Exception(
'Displaying currency as symbol is not supported.');
}
formatter = new NumberFormat.currencyPattern(locale, currency);
break;

View File

@ -201,7 +201,8 @@ class BaseException extends Error {
final originalException;
final originalStack;
BaseException([this.message, this.originalException, this.originalStack, this.context]);
BaseException(
[this.message, this.originalException, this.originalStack, this.context]);
String toString() {
return this.message;