@@ -55,9 +55,9 @@ class _OpenContainerTransformDemoState
5555
5656 void _showMarkedAsDoneSnackbar (bool ? isMarkedAsDone) {
5757 if (isMarkedAsDone ?? false ) {
58- ScaffoldMessenger .of (context). showSnackBar ( const SnackBar (
59- content : Text ( 'Marked as done!' ) ,
60- ));
58+ ScaffoldMessenger .of (
59+ context ,
60+ ). showSnackBar ( const SnackBar (content : Text ( 'Marked as done!' )) );
6161 }
6262 }
6363
@@ -84,9 +84,10 @@ class _OpenContainerTransformDemoState
8484 onPressed: (int index) {
8585 setModalState (() {
8686 setState (() {
87- _transitionType = index == 0
88- ? ContainerTransitionType .fade
89- : ContainerTransitionType .fadeThrough;
87+ _transitionType =
88+ index == 0
89+ ? ContainerTransitionType .fade
90+ : ContainerTransitionType .fadeThrough;
9091 });
9192 });
9293 },
@@ -229,10 +230,7 @@ class _OpenContainerTransformDemoState
229230 closedElevation: 0.0 ,
230231 closedBuilder: (BuildContext _, VoidCallback openContainer) {
231232 return ListTile (
232- leading: Image .asset (
233- 'assets/avatar_logo.png' ,
234- width: 40 ,
235- ),
233+ leading: Image .asset ('assets/avatar_logo.png' , width: 40 ),
236234 onTap: openContainer,
237235 title: Text ('List item ${index + 1 }' ),
238236 subtitle: const Text ('Secondary text' ),
@@ -245,15 +243,11 @@ class _OpenContainerTransformDemoState
245243 floatingActionButton: OpenContainer (
246244 transitionType: _transitionType,
247245 openBuilder: (BuildContext context, VoidCallback _) {
248- return const _DetailsPage (
249- includeMarkAsDoneButton: false ,
250- );
246+ return const _DetailsPage (includeMarkAsDoneButton: false );
251247 },
252248 closedElevation: 6.0 ,
253249 closedShape: const RoundedRectangleBorder (
254- borderRadius: BorderRadius .all (
255- Radius .circular (_fabDimension / 2 ),
256- ),
250+ borderRadius: BorderRadius .all (Radius .circular (_fabDimension / 2 )),
257251 ),
258252 closedColor: Theme .of (context).colorScheme.secondary,
259253 closedBuilder: (BuildContext context, VoidCallback openContainer) {
@@ -315,10 +309,7 @@ class _ExampleCard extends StatelessWidget {
315309 child: ColoredBox (
316310 color: Colors .black38,
317311 child: Center (
318- child: Image .asset (
319- 'assets/placeholder_image.png' ,
320- width: 100 ,
321- ),
312+ child: Image .asset ('assets/placeholder_image.png' , width: 100 ),
322313 ),
323314 ),
324315 ),
@@ -335,10 +326,9 @@ class _ExampleCard extends StatelessWidget {
335326 child: Text (
336327 'Lorem ipsum dolor sit amet, consectetur '
337328 'adipiscing elit, sed do eiusmod tempor.' ,
338- style: Theme .of (context)
339- .textTheme
340- .bodyMedium!
341- .copyWith (color: Colors .black54),
329+ style: Theme .of (
330+ context,
331+ ).textTheme.bodyMedium! .copyWith (color: Colors .black54),
342332 ),
343333 ),
344334 ],
@@ -348,10 +338,7 @@ class _ExampleCard extends StatelessWidget {
348338}
349339
350340class _SmallerCard extends StatelessWidget {
351- const _SmallerCard ({
352- required this .openContainer,
353- required this .subtitle,
354- });
341+ const _SmallerCard ({required this .openContainer, required this .subtitle});
355342
356343 final VoidCallback openContainer;
357344 final String subtitle;
@@ -368,10 +355,7 @@ class _SmallerCard extends StatelessWidget {
368355 color: Colors .black38,
369356 height: 150 ,
370357 child: Center (
371- child: Image .asset (
372- 'assets/placeholder_image.png' ,
373- width: 80 ,
374- ),
358+ child: Image .asset ('assets/placeholder_image.png' , width: 80 ),
375359 ),
376360 ),
377361 Expanded (
@@ -381,15 +365,9 @@ class _SmallerCard extends StatelessWidget {
381365 mainAxisAlignment: MainAxisAlignment .center,
382366 crossAxisAlignment: CrossAxisAlignment .start,
383367 children: < Widget > [
384- Text (
385- 'Title' ,
386- style: Theme .of (context).textTheme.titleLarge,
387- ),
368+ Text ('Title' , style: Theme .of (context).textTheme.titleLarge),
388369 const SizedBox (height: 4 ),
389- Text (
390- subtitle,
391- style: Theme .of (context).textTheme.bodySmall,
392- ),
370+ Text (subtitle, style: Theme .of (context).textTheme.bodySmall),
393371 ],
394372 ),
395373 ),
@@ -419,10 +397,7 @@ class _ExampleSingleTile extends StatelessWidget {
419397 height: height,
420398 width: height,
421399 child: Center (
422- child: Image .asset (
423- 'assets/placeholder_image.png' ,
424- width: 60 ,
425- ),
400+ child: Image .asset ('assets/placeholder_image.png' , width: 60 ),
426401 ),
427402 ),
428403 Expanded (
@@ -431,15 +406,13 @@ class _ExampleSingleTile extends StatelessWidget {
431406 child: Column (
432407 crossAxisAlignment: CrossAxisAlignment .start,
433408 children: < Widget > [
434- Text (
435- 'Title' ,
436- style: Theme .of (context).textTheme.titleMedium,
437- ),
409+ Text ('Title' , style: Theme .of (context).textTheme.titleMedium),
438410 const SizedBox (height: 8 ),
439411 Text (
440- 'Lorem ipsum dolor sit amet, consectetur '
441- 'adipiscing elit,' ,
442- style: Theme .of (context).textTheme.bodySmall),
412+ 'Lorem ipsum dolor sit amet, consectetur '
413+ 'adipiscing elit,' ,
414+ style: Theme .of (context).textTheme.bodySmall,
415+ ),
443416 ],
444417 ),
445418 ),
@@ -451,11 +424,7 @@ class _ExampleSingleTile extends StatelessWidget {
451424}
452425
453426class _InkWellOverlay extends StatelessWidget {
454- const _InkWellOverlay ({
455- this .openContainer,
456- this .height,
457- this .child,
458- });
427+ const _InkWellOverlay ({this .openContainer, this .height, this .child});
459428
460429 final VoidCallback ? openContainer;
461430 final double ? height;
@@ -465,10 +434,7 @@ class _InkWellOverlay extends StatelessWidget {
465434 Widget build (BuildContext context) {
466435 return SizedBox (
467436 height: height,
468- child: InkWell (
469- onTap: openContainer,
470- child: child,
471- ),
437+ child: InkWell (onTap: openContainer, child: child),
472438 );
473439 }
474440}
@@ -489,7 +455,7 @@ class _DetailsPage extends StatelessWidget {
489455 icon: const Icon (Icons .done),
490456 onPressed: () => Navigator .pop (context, true ),
491457 tooltip: 'Mark as done' ,
492- )
458+ ),
493459 ],
494460 ),
495461 body: ListView (
@@ -499,9 +465,7 @@ class _DetailsPage extends StatelessWidget {
499465 height: 250 ,
500466 child: Padding (
501467 padding: const EdgeInsets .all (70.0 ),
502- child: Image .asset (
503- 'assets/placeholder_image.png' ,
504- ),
468+ child: Image .asset ('assets/placeholder_image.png' ),
505469 ),
506470 ),
507471 Padding (
@@ -512,18 +476,18 @@ class _DetailsPage extends StatelessWidget {
512476 Text (
513477 'Title' ,
514478 style: Theme .of (context).textTheme.headlineSmall! .copyWith (
515- color: Colors .black54,
516- fontSize: 30.0 ,
517- ),
479+ color: Colors .black54,
480+ fontSize: 30.0 ,
481+ ),
518482 ),
519483 const SizedBox (height: 10 ),
520484 Text (
521485 _loremIpsumParagraph,
522486 style: Theme .of (context).textTheme.bodyMedium! .copyWith (
523- color: Colors .black54,
524- height: 1.5 ,
525- fontSize: 16.0 ,
526- ),
487+ color: Colors .black54,
488+ height: 1.5 ,
489+ fontSize: 16.0 ,
490+ ),
527491 ),
528492 ],
529493 ),
0 commit comments