Skip to content

Commit

Permalink
Ran all files through dartfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
orthros committed Jan 26, 2018
1 parent c49a302 commit c6a0cf6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion example/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ main(List<String> args) async {
// All images in the book (file name is the key)
Map<String, EpubByteContentFile> images = bookContent.Images;

EpubByteContentFile firstImage = images.isNotEmpty ? images.values.first : null;
EpubByteContentFile firstImage =
images.isNotEmpty ? images.values.first : null;

// Content type (e.g. EpubContentType.IMAGE_JPEG, EpubContentType.IMAGE_PNG)
EpubContentType contentType = firstImage?.ContentType;
Expand Down
11 changes: 5 additions & 6 deletions lib/src/utils/enum_from_string.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class EnumFromString<T> {
List<T> enumValues;

Expand All @@ -7,12 +6,12 @@ class EnumFromString<T> {
T get(String value) {
value = "$T.$value";
try {
var x = this.enumValues
.firstWhere((f)=>
f.toString().toUpperCase() == value.toUpperCase());
var x = this
.enumValues
.firstWhere((f) => f.toString().toUpperCase() == value.toUpperCase());
return x;
} catch(e) {
} catch (e) {
return null;
}
}
}
}

0 comments on commit c6a0cf6

Please sign in to comment.