@@ -22,6 +22,7 @@ import 'package:boxbox/classes/article.dart';
2222import 'package:boxbox/classes/driver.dart' ;
2323import 'package:boxbox/classes/event_tracker.dart' ;
2424import 'package:boxbox/classes/race.dart' ;
25+ import 'package:boxbox/helpers/bottom_sheet.dart' ;
2526import 'package:boxbox/helpers/buttons.dart' ;
2627import 'package:boxbox/helpers/divider.dart' ;
2728import 'package:boxbox/helpers/loading_indicator_util.dart' ;
@@ -354,75 +355,74 @@ class SessionItemForCircuit extends StatelessWidget {
354355 ? IconButton (
355356 icon: Icon (Icons .link_outlined),
356357 iconSize: 25 ,
357- onPressed: () async => await showModalBottomSheet (
358- context: context,
359- isScrollControlled: true ,
360- builder: (context) => BottomSheet (
361- shape: RoundedRectangleBorder (
362- borderRadius: BorderRadius .circular (10.0 ),
363- ),
364- onClosing: () {},
365- builder: (context) {
366- return SizedBox (
367- child: ListView .builder (
368- shrinkWrap: true ,
369- itemCount: links! .length + 1 ,
370- itemBuilder: (context, index) => index == 0
371- ? Padding (
372- padding: EdgeInsets .only (top: 5 ),
373- child: ListTile (
374- title: Text (
375- AppLocalizations .of (context)!
376- .links,
377- style: Theme .of (context)
378- .textTheme
379- .headlineMedium,
380- ),
381- ),
382- )
383- : ListTile (
358+ onPressed: () async => await showCustomBottomSheet (
359+ context,
360+ SizedBox (
361+ child: Padding (
362+ padding: EdgeInsets .fromLTRB (
363+ 30 ,
364+ 15 ,
365+ 30 ,
366+ MediaQuery .of (context).viewInsets.bottom,
367+ ),
368+ child: ListView .builder (
369+ shrinkWrap: true ,
370+ itemCount: links! .length + 1 ,
371+ itemBuilder: (context, index) => index == 0
372+ ? Padding (
373+ padding: EdgeInsets .only (top: 5 ),
374+ child: ListTile (
384375 title: Text (
385- links! [index - 1 ].text == 'report'
386- ? 'Report'
387- : links! [index - 1 ].text ==
388- 'highlights'
389- ? 'Highlights'
390- : links! [index - 1 ].text ==
391- 'lapByLap'
392- ? 'Lap-by-lap'
393- : links! [index - 1 ]
394- .text
395- .contains (
396- 'Grid' )
397- ? AppLocalizations
398- .of (
399- context)!
400- .startingGrid
401- : links! [index - 1 ]
402- .text,
376+ AppLocalizations .of (context)! .links,
377+ style: TextStyle (fontSize: 20 ),
403378 ),
404- leading: links! [index - 1 ].text ==
405- 'report'
406- ? Icon (Icons .analytics_outlined)
379+ ),
380+ )
381+ : ListTile (
382+ title: Text (
383+ links! [index - 1 ].text == 'report'
384+ ? 'Report'
407385 : links! [index - 1 ].text ==
408386 'highlights'
409- ? Icon (
410- Icons .play_arrow_outlined,
411- )
412- : Icon (
413- Icons .article_outlined,
414- ),
415- onTap: () =>
416- CircuitUIProvider ().linkTapAction (
417- links! [index - 1 ].type,
418- links! [index - 1 ].url,
419- context,
420- meetingId,
421- ),
387+ ? 'Highlights'
388+ : links! [index - 1 ].text ==
389+ 'lapByLap'
390+ ? 'Lap-by-lap'
391+ : links! [index - 1 ]
392+ .text
393+ .contains ('Grid' )
394+ ? AppLocalizations .of (
395+ context)!
396+ .startingGrid
397+ : links! [index - 1 ]
398+ .text ==
399+ 'driverOfTheDay'
400+ ? 'Driver of the Day'
401+ : links! [
402+ index - 1 ]
403+ .text,
404+ ),
405+ leading: links! [index - 1 ].text ==
406+ 'report'
407+ ? Icon (Icons .analytics_outlined)
408+ : links! [index - 1 ].text ==
409+ 'highlights'
410+ ? Icon (
411+ Icons .play_arrow_outlined,
412+ )
413+ : Icon (
414+ Icons .article_outlined,
415+ ),
416+ onTap: () =>
417+ CircuitUIProvider ().linkTapAction (
418+ links! [index - 1 ].type,
419+ links! [index - 1 ].url,
420+ context,
421+ meetingId,
422422 ),
423- ),
424- );
425- } ,
423+ ),
424+ ),
425+ ) ,
426426 ),
427427 ),
428428 )
0 commit comments