OLD | NEW |
(Empty) | |
| 1 >>> |
| 2 Future<TextureAtlas> load(String url, BitmapDataLoadOptions bitmapDataLoadOption
s) { |
| 3 HttpRequest.getString(url).then((textureAtlasJson) { |
| 4 ; |
| 5 |
| 6 loader.then(() { |
| 7 ; |
| 8 }).catchError(() { |
| 9 ; |
| 10 }); |
| 11 }); |
| 12 } |
| 13 <<< |
| 14 Future<TextureAtlas> load( |
| 15 String url, BitmapDataLoadOptions bitmapDataLoadOptions) { |
| 16 HttpRequest.getString(url).then((textureAtlasJson) { |
| 17 ; |
| 18 |
| 19 loader.then(() { |
| 20 ; |
| 21 }).catchError(() { |
| 22 ; |
| 23 }); |
| 24 }); |
| 25 } |
| 26 >>> |
| 27 class SoundSprite { |
| 28 static Future<SoundSprite> load(String url, [SoundLoadOptions soundLoadOptions
= null]) { |
| 29 HttpRequest.getString(url).then((soundSpriteJson) { |
| 30 if (segments is Map) { |
| 31 } |
| 32 |
| 33 Sound.load(soundUrl, soundLoadOptions).then((Sound sound) { |
| 34 ; |
| 35 }).catchError((error) { |
| 36 ; |
| 37 }); |
| 38 |
| 39 }); |
| 40 } |
| 41 } |
| 42 <<< |
| 43 class SoundSprite { |
| 44 static Future<SoundSprite> load(String url, |
| 45 [SoundLoadOptions soundLoadOptions = null]) { |
| 46 HttpRequest.getString(url).then((soundSpriteJson) { |
| 47 if (segments is Map) {} |
| 48 |
| 49 Sound.load(soundUrl, soundLoadOptions).then((Sound sound) { |
| 50 ; |
| 51 }).catchError((error) { |
| 52 ; |
| 53 }); |
| 54 }); |
| 55 } |
| 56 } |
| 57 >>> don't split method multisplits too early because of pending line after ";" |
| 58 main() { |
| 59 ; |
| 60 receiver.a(() { |
| 61 ; |
| 62 }).b(() { |
| 63 ; |
| 64 }); |
| 65 } |
| 66 <<< |
| 67 main() { |
| 68 ; |
| 69 receiver.a(() { |
| 70 ; |
| 71 }).b(() { |
| 72 ; |
| 73 }); |
| 74 } |
| 75 >>> don't nest too early because of comment before method chain |
| 76 main() { |
| 77 // |
| 78 receiver.a(() { |
| 79 ; |
| 80 }).b(() { |
| 81 ; |
| 82 }); |
| 83 } |
| 84 <<< |
| 85 main() { |
| 86 // |
| 87 receiver.a(() { |
| 88 ; |
| 89 }).b(() { |
| 90 ; |
| 91 }); |
| 92 } |
OLD | NEW |