Committed by
GitHub
Merge pull request #979 from eduardoflorence/improve-doc-example-wrong
Remove '=>' unnecessary
Showing
14 changed files
with
42 additions
and
40 deletions
| @@ -81,9 +81,9 @@ It is possible to lazyLoad a dependency so that it will be instantiated only whe | @@ -81,9 +81,9 @@ It is possible to lazyLoad a dependency so that it will be instantiated only whe | ||
| 81 | Get.lazyPut<ApiMock>(() => ApiMock()); | 81 | Get.lazyPut<ApiMock>(() => ApiMock()); |
| 82 | 82 | ||
| 83 | Get.lazyPut<FirebaseAuth>( | 83 | Get.lazyPut<FirebaseAuth>( |
| 84 | - () => { | 84 | + () { |
| 85 | // ... some logic if needed | 85 | // ... some logic if needed |
| 86 | - return FirebaseAuth() | 86 | + return FirebaseAuth(); |
| 87 | }, | 87 | }, |
| 88 | tag: Math.random().toString(), | 88 | tag: Math.random().toString(), |
| 89 | fenix: true | 89 | fenix: true |
| @@ -309,7 +309,7 @@ getPages: [ | @@ -309,7 +309,7 @@ getPages: [ | ||
| 309 | GetPage( | 309 | GetPage( |
| 310 | name: '/', | 310 | name: '/', |
| 311 | page: () => HomeView(), | 311 | page: () => HomeView(), |
| 312 | - binding: BindingsBuilder(() => { | 312 | + binding: BindingsBuilder(() { |
| 313 | Get.lazyPut<ControllerX>(() => ControllerX()); | 313 | Get.lazyPut<ControllerX>(() => ControllerX()); |
| 314 | Get.put<Service>(()=> Api()); | 314 | Get.put<Service>(()=> Api()); |
| 315 | }), | 315 | }), |
| @@ -317,7 +317,7 @@ getPages: [ | @@ -317,7 +317,7 @@ getPages: [ | ||
| 317 | GetPage( | 317 | GetPage( |
| 318 | name: '/details', | 318 | name: '/details', |
| 319 | page: () => DetailsView(), | 319 | page: () => DetailsView(), |
| 320 | - binding: BindingsBuilder(() => { | 320 | + binding: BindingsBuilder(() { |
| 321 | Get.lazyPut<DetailsController>(() => DetailsController()); | 321 | Get.lazyPut<DetailsController>(() => DetailsController()); |
| 322 | }), | 322 | }), |
| 323 | ), | 323 | ), |
| @@ -484,12 +484,12 @@ Get.bottomSheet( | @@ -484,12 +484,12 @@ Get.bottomSheet( | ||
| 484 | ListTile( | 484 | ListTile( |
| 485 | leading: Icon(Icons.music_note), | 485 | leading: Icon(Icons.music_note), |
| 486 | title: Text('Music'), | 486 | title: Text('Music'), |
| 487 | - onTap: () => {} | 487 | + onTap: () {} |
| 488 | ), | 488 | ), |
| 489 | ListTile( | 489 | ListTile( |
| 490 | leading: Icon(Icons.videocam), | 490 | leading: Icon(Icons.videocam), |
| 491 | title: Text('Video'), | 491 | title: Text('Video'), |
| 492 | - onTap: () => {}, | 492 | + onTap: () {}, |
| 493 | ), | 493 | ), |
| 494 | ], | 494 | ], |
| 495 | ), | 495 | ), |
| @@ -484,12 +484,12 @@ Get.bottomSheet( | @@ -484,12 +484,12 @@ Get.bottomSheet( | ||
| 484 | ListTile( | 484 | ListTile( |
| 485 | leading: Icon(Icons.music_note), | 485 | leading: Icon(Icons.music_note), |
| 486 | title: Text('Music'), | 486 | title: Text('Music'), |
| 487 | - onTap: () => {} | 487 | + onTap: () {} |
| 488 | ), | 488 | ), |
| 489 | ListTile( | 489 | ListTile( |
| 490 | leading: Icon(Icons.videocam), | 490 | leading: Icon(Icons.videocam), |
| 491 | title: Text('Video'), | 491 | title: Text('Video'), |
| 492 | - onTap: () => {}, | 492 | + onTap: () {}, |
| 493 | ), | 493 | ), |
| 494 | ], | 494 | ], |
| 495 | ), | 495 | ), |
| @@ -84,9 +84,9 @@ Anda bisa melakukan lazyload terhadap sebuah dependensi supaya dependensi terseb | @@ -84,9 +84,9 @@ Anda bisa melakukan lazyload terhadap sebuah dependensi supaya dependensi terseb | ||
| 84 | Get.lazyPut<ApiMock>(() => ApiMock()); | 84 | Get.lazyPut<ApiMock>(() => ApiMock()); |
| 85 | 85 | ||
| 86 | Get.lazyPut<FirebaseAuth>( | 86 | Get.lazyPut<FirebaseAuth>( |
| 87 | - () => { | 87 | + () { |
| 88 | // ... beberapa logic jika diperlukan.. | 88 | // ... beberapa logic jika diperlukan.. |
| 89 | - return FirebaseAuth() | 89 | + return FirebaseAuth(); |
| 90 | }, | 90 | }, |
| 91 | tag: Math.random().toString(), | 91 | tag: Math.random().toString(), |
| 92 | fenix: true | 92 | fenix: true |
| @@ -322,7 +322,7 @@ getPages: [ | @@ -322,7 +322,7 @@ getPages: [ | ||
| 322 | GetPage( | 322 | GetPage( |
| 323 | name: '/', | 323 | name: '/', |
| 324 | page: () => HomeView(), | 324 | page: () => HomeView(), |
| 325 | - binding: BindingsBuilder(() => { | 325 | + binding: BindingsBuilder(() { |
| 326 | Get.lazyPut<ControllerX>(() => ControllerX()); | 326 | Get.lazyPut<ControllerX>(() => ControllerX()); |
| 327 | Get.put<Service>(()=> Api()); | 327 | Get.put<Service>(()=> Api()); |
| 328 | }), | 328 | }), |
| @@ -330,7 +330,7 @@ getPages: [ | @@ -330,7 +330,7 @@ getPages: [ | ||
| 330 | GetPage( | 330 | GetPage( |
| 331 | name: '/details', | 331 | name: '/details', |
| 332 | page: () => DetailsView(), | 332 | page: () => DetailsView(), |
| 333 | - binding: BindingsBuilder(() => { | 333 | + binding: BindingsBuilder(() { |
| 334 | Get.lazyPut<DetailsController>(() => DetailsController()); | 334 | Get.lazyPut<DetailsController>(() => DetailsController()); |
| 335 | }), | 335 | }), |
| 336 | ), | 336 | ), |
| @@ -486,12 +486,12 @@ Get.bottomSheet( | @@ -486,12 +486,12 @@ Get.bottomSheet( | ||
| 486 | ListTile( | 486 | ListTile( |
| 487 | leading: Icon(Icons.music_note), | 487 | leading: Icon(Icons.music_note), |
| 488 | title: Text('Music'), | 488 | title: Text('Music'), |
| 489 | - onTap: () => {} | 489 | + onTap: () {} |
| 490 | ), | 490 | ), |
| 491 | ListTile( | 491 | ListTile( |
| 492 | leading: Icon(Icons.videocam), | 492 | leading: Icon(Icons.videocam), |
| 493 | title: Text('Video'), | 493 | title: Text('Video'), |
| 494 | - onTap: () => {}, | 494 | + onTap: () {}, |
| 495 | ), | 495 | ), |
| 496 | ], | 496 | ], |
| 497 | ), | 497 | ), |
| @@ -80,9 +80,9 @@ Get.put<S>( | @@ -80,9 +80,9 @@ Get.put<S>( | ||
| 80 | Get.lazyPut<ApiMock>(() => ApiMock()); | 80 | Get.lazyPut<ApiMock>(() => ApiMock()); |
| 81 | 81 | ||
| 82 | Get.lazyPut<FirebaseAuth>( | 82 | Get.lazyPut<FirebaseAuth>( |
| 83 | - () => { | 83 | + () { |
| 84 | // 어떤 로직이 필요하다면 ... | 84 | // 어떤 로직이 필요하다면 ... |
| 85 | - return FirebaseAuth() | 85 | + return FirebaseAuth(); |
| 86 | }, | 86 | }, |
| 87 | tag: Math.random().toString(), | 87 | tag: Math.random().toString(), |
| 88 | fenix: true | 88 | fenix: true |
| @@ -308,7 +308,7 @@ getPages: [ | @@ -308,7 +308,7 @@ getPages: [ | ||
| 308 | GetPage( | 308 | GetPage( |
| 309 | name: '/', | 309 | name: '/', |
| 310 | page: () => HomeView(), | 310 | page: () => HomeView(), |
| 311 | - binding: BindingsBuilder(() => { | 311 | + binding: BindingsBuilder(() { |
| 312 | Get.lazyPut<ControllerX>(() => ControllerX()); | 312 | Get.lazyPut<ControllerX>(() => ControllerX()); |
| 313 | Get.put<Service>(()=> Api()); | 313 | Get.put<Service>(()=> Api()); |
| 314 | }), | 314 | }), |
| @@ -316,7 +316,7 @@ getPages: [ | @@ -316,7 +316,7 @@ getPages: [ | ||
| 316 | GetPage( | 316 | GetPage( |
| 317 | name: '/details', | 317 | name: '/details', |
| 318 | page: () => DetailsView(), | 318 | page: () => DetailsView(), |
| 319 | - binding: BindingsBuilder(() => { | 319 | + binding: BindingsBuilder(() { |
| 320 | Get.lazyPut<DetailsController>(() => DetailsController()); | 320 | Get.lazyPut<DetailsController>(() => DetailsController()); |
| 321 | }), | 321 | }), |
| 322 | ), | 322 | ), |
| @@ -484,12 +484,12 @@ Get.bottomSheet( | @@ -484,12 +484,12 @@ Get.bottomSheet( | ||
| 484 | ListTile( | 484 | ListTile( |
| 485 | leading: Icon(Icons.music_note), | 485 | leading: Icon(Icons.music_note), |
| 486 | title: Text('Music'), | 486 | title: Text('Music'), |
| 487 | - onTap: () => {} | 487 | + onTap: () {} |
| 488 | ), | 488 | ), |
| 489 | ListTile( | 489 | ListTile( |
| 490 | leading: Icon(Icons.videocam), | 490 | leading: Icon(Icons.videocam), |
| 491 | title: Text('Video'), | 491 | title: Text('Video'), |
| 492 | - onTap: () => {}, | 492 | + onTap: () {}, |
| 493 | ), | 493 | ), |
| 494 | ], | 494 | ], |
| 495 | ), | 495 | ), |
| @@ -83,9 +83,9 @@ Nesses casos pode ser usado o lazyPut que só cria a instância no momento que e | @@ -83,9 +83,9 @@ Nesses casos pode ser usado o lazyPut que só cria a instância no momento que e | ||
| 83 | Get.lazyPut<ApiMock>(() => ApiMock()); | 83 | Get.lazyPut<ApiMock>(() => ApiMock()); |
| 84 | 84 | ||
| 85 | Get.lazyPut<FirebaseAuth>( | 85 | Get.lazyPut<FirebaseAuth>( |
| 86 | - () => { | 86 | + () { |
| 87 | // ... alguma lógica se necessário | 87 | // ... alguma lógica se necessário |
| 88 | - return FirebaseAuth() | 88 | + return FirebaseAuth(); |
| 89 | }, | 89 | }, |
| 90 | tag: Math.random().toString(), | 90 | tag: Math.random().toString(), |
| 91 | fenix: true | 91 | fenix: true |
| @@ -313,7 +313,7 @@ getPages: [ | @@ -313,7 +313,7 @@ getPages: [ | ||
| 313 | GetPage( | 313 | GetPage( |
| 314 | name: '/', | 314 | name: '/', |
| 315 | page: () => HomeView(), | 315 | page: () => HomeView(), |
| 316 | - binding: BindingsBuilder(() => { | 316 | + binding: BindingsBuilder(() { |
| 317 | Get.lazyPut<ControllerX>(() => ControllerX()); | 317 | Get.lazyPut<ControllerX>(() => ControllerX()); |
| 318 | Get.put<Service>(()=> Api()); | 318 | Get.put<Service>(()=> Api()); |
| 319 | }), | 319 | }), |
| @@ -321,7 +321,7 @@ getPages: [ | @@ -321,7 +321,7 @@ getPages: [ | ||
| 321 | GetPage( | 321 | GetPage( |
| 322 | name: '/detalhes', | 322 | name: '/detalhes', |
| 323 | page: () => DetalhesView(), | 323 | page: () => DetalhesView(), |
| 324 | - binding: BindingsBuilder(() => { | 324 | + binding: BindingsBuilder(() { |
| 325 | Get.lazyPut<DetalhesController>(() => DetalhesController()); | 325 | Get.lazyPut<DetalhesController>(() => DetalhesController()); |
| 326 | }), | 326 | }), |
| 327 | ), | 327 | ), |
| @@ -195,12 +195,12 @@ Get.bottomSheet( | @@ -195,12 +195,12 @@ Get.bottomSheet( | ||
| 195 | ListTile( | 195 | ListTile( |
| 196 | leading: Icon(Icons.music_note), | 196 | leading: Icon(Icons.music_note), |
| 197 | title: Text('Música'), | 197 | title: Text('Música'), |
| 198 | - onTap: () => {} | 198 | + onTap: () {} |
| 199 | ), | 199 | ), |
| 200 | ListTile( | 200 | ListTile( |
| 201 | leading: Icon(Icons.videocam), | 201 | leading: Icon(Icons.videocam), |
| 202 | title: Text('Vídeo'), | 202 | title: Text('Vídeo'), |
| 203 | - onTap: () => {}, | 203 | + onTap: () {}, |
| 204 | ), | 204 | ), |
| 205 | ], | 205 | ], |
| 206 | ), | 206 | ), |
| @@ -81,9 +81,9 @@ Get.put<S>( | @@ -81,9 +81,9 @@ Get.put<S>( | ||
| 81 | Get.lazyPut<ApiMock>(() => ApiMock()); | 81 | Get.lazyPut<ApiMock>(() => ApiMock()); |
| 82 | 82 | ||
| 83 | Get.lazyPut<FirebaseAuth>( | 83 | Get.lazyPut<FirebaseAuth>( |
| 84 | - () => { | 84 | + () { |
| 85 | // ... some logic if needed | 85 | // ... some logic if needed |
| 86 | - return FirebaseAuth() | 86 | + return FirebaseAuth(); |
| 87 | }, | 87 | }, |
| 88 | tag: Math.random().toString(), | 88 | tag: Math.random().toString(), |
| 89 | fenix: true | 89 | fenix: true |
| @@ -309,7 +309,7 @@ getPages: [ | @@ -309,7 +309,7 @@ getPages: [ | ||
| 309 | GetPage( | 309 | GetPage( |
| 310 | name: '/', | 310 | name: '/', |
| 311 | page: () => HomeView(), | 311 | page: () => HomeView(), |
| 312 | - binding: BindingsBuilder(() => { | 312 | + binding: BindingsBuilder(() { |
| 313 | Get.lazyPut<ControllerX>(() => ControllerX()); | 313 | Get.lazyPut<ControllerX>(() => ControllerX()); |
| 314 | Get.put<Service>(()=> Api()); | 314 | Get.put<Service>(()=> Api()); |
| 315 | }), | 315 | }), |
| @@ -317,7 +317,7 @@ getPages: [ | @@ -317,7 +317,7 @@ getPages: [ | ||
| 317 | GetPage( | 317 | GetPage( |
| 318 | name: '/details', | 318 | name: '/details', |
| 319 | page: () => DetailsView(), | 319 | page: () => DetailsView(), |
| 320 | - binding: BindingsBuilder(() => { | 320 | + binding: BindingsBuilder(() { |
| 321 | Get.lazyPut<DetailsController>(() => DetailsController()); | 321 | Get.lazyPut<DetailsController>(() => DetailsController()); |
| 322 | }), | 322 | }), |
| 323 | ), | 323 | ), |
| @@ -484,12 +484,12 @@ Get.bottomSheet( | @@ -484,12 +484,12 @@ Get.bottomSheet( | ||
| 484 | ListTile( | 484 | ListTile( |
| 485 | leading: Icon(Icons.music_note), | 485 | leading: Icon(Icons.music_note), |
| 486 | title: Text('Music'), | 486 | title: Text('Music'), |
| 487 | - onTap: () => {} | 487 | + onTap: () {} |
| 488 | ), | 488 | ), |
| 489 | ListTile( | 489 | ListTile( |
| 490 | leading: Icon(Icons.videocam), | 490 | leading: Icon(Icons.videocam), |
| 491 | title: Text('Video'), | 491 | title: Text('Video'), |
| 492 | - onTap: () => {}, | 492 | + onTap: () {}, |
| 493 | ), | 493 | ), |
| 494 | ], | 494 | ], |
| 495 | ), | 495 | ), |
| @@ -81,9 +81,9 @@ Get.put<S>( | @@ -81,9 +81,9 @@ Get.put<S>( | ||
| 81 | Get.lazyPut<ApiMock>(() => ApiMock()); | 81 | Get.lazyPut<ApiMock>(() => ApiMock()); |
| 82 | 82 | ||
| 83 | Get.lazyPut<FirebaseAuth>( | 83 | Get.lazyPut<FirebaseAuth>( |
| 84 | - () => { | 84 | + () { |
| 85 | // ... some logic if needed | 85 | // ... some logic if needed |
| 86 | - return FirebaseAuth() | 86 | + return FirebaseAuth(); |
| 87 | }, | 87 | }, |
| 88 | tag: Math.random().toString(), | 88 | tag: Math.random().toString(), |
| 89 | fenix: true | 89 | fenix: true |
| @@ -306,7 +306,7 @@ getPages: [ | @@ -306,7 +306,7 @@ getPages: [ | ||
| 306 | GetPage( | 306 | GetPage( |
| 307 | name: '/', | 307 | name: '/', |
| 308 | page: () => HomeView(), | 308 | page: () => HomeView(), |
| 309 | - binding: BindingsBuilder(() => { | 309 | + binding: BindingsBuilder(() { |
| 310 | Get.lazyPut<ControllerX>(() => ControllerX()); | 310 | Get.lazyPut<ControllerX>(() => ControllerX()); |
| 311 | Get.put<Service>(()=> Api()); | 311 | Get.put<Service>(()=> Api()); |
| 312 | }), | 312 | }), |
| @@ -314,7 +314,7 @@ getPages: [ | @@ -314,7 +314,7 @@ getPages: [ | ||
| 314 | GetPage( | 314 | GetPage( |
| 315 | name: '/details', | 315 | name: '/details', |
| 316 | page: () => DetailsView(), | 316 | page: () => DetailsView(), |
| 317 | - binding: BindingsBuilder(() => { | 317 | + binding: BindingsBuilder(() { |
| 318 | Get.lazyPut<DetailsController>(() => DetailsController()); | 318 | Get.lazyPut<DetailsController>(() => DetailsController()); |
| 319 | }), | 319 | }), |
| 320 | ), | 320 | ), |
| @@ -478,12 +478,12 @@ Get.bottomSheet( | @@ -478,12 +478,12 @@ Get.bottomSheet( | ||
| 478 | ListTile( | 478 | ListTile( |
| 479 | leading: Icon(Icons.music_note), | 479 | leading: Icon(Icons.music_note), |
| 480 | title: Text('Music'), | 480 | title: Text('Music'), |
| 481 | - onTap: () => {} | 481 | + onTap: () {} |
| 482 | ), | 482 | ), |
| 483 | ListTile( | 483 | ListTile( |
| 484 | leading: Icon(Icons.videocam), | 484 | leading: Icon(Icons.videocam), |
| 485 | title: Text('Video'), | 485 | title: Text('Video'), |
| 486 | - onTap: () => {}, | 486 | + onTap: () {}, |
| 487 | ), | 487 | ), |
| 488 | ], | 488 | ], |
| 489 | ), | 489 | ), |
| @@ -15,7 +15,8 @@ void main() { | @@ -15,7 +15,8 @@ void main() { | ||
| 15 | ListTile( | 15 | ListTile( |
| 16 | leading: Icon(Icons.music_note), | 16 | leading: Icon(Icons.music_note), |
| 17 | title: Text('Music'), | 17 | title: Text('Music'), |
| 18 | - onTap: () => {}), | 18 | + onTap: () {}, |
| 19 | + ), | ||
| 19 | ], | 20 | ], |
| 20 | ), | 21 | ), |
| 21 | )); | 22 | )); |
| @@ -36,7 +37,8 @@ void main() { | @@ -36,7 +37,8 @@ void main() { | ||
| 36 | ListTile( | 37 | ListTile( |
| 37 | leading: Icon(Icons.music_note), | 38 | leading: Icon(Icons.music_note), |
| 38 | title: Text('Music'), | 39 | title: Text('Music'), |
| 39 | - onTap: () => {}), | 40 | + onTap: () {}, |
| 41 | + ), | ||
| 40 | ], | 42 | ], |
| 41 | ), | 43 | ), |
| 42 | )); | 44 | )); |
-
Please register or login to post a comment