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:
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user