| 1 | import 'dart:ui'; |
| 2 | |
| 3 | import 'package:cached_network_image/cached_network_image.dart'; |
| 4 | import 'package:flutter_svg/svg.dart'; |
| 5 | import 'package:latlong2/latlong.dart'; |
| 6 | import 'package:openapi/openapi.dart'; |
| 7 | import 'package:aero/screens/home/home_controller.dart'; |
| 8 | import 'package:aero/screens/home/widgets/animated_flight_info_bar.dart'; |
| 9 | import 'package:aero/screens/home/widgets/date_selection_list.dart'; |
| 10 | import 'package:aero/screens/home/widgets/booking_details_sheet.dart'; |
| 11 | import 'package:aero/screens/home/widgets/flight_info.dart'; |
| 12 | import 'package:aero/screens/home/widgets/flight_map.dart'; |
| 13 | import 'package:aero/screens/home/widgets/flight_search_bar.dart'; |
| 14 | import 'package:aero/screens/home/widgets/flight_selection_list.dart'; |
| 15 | import 'package:aero/screens/home/widgets/flights_list.dart'; |
| 16 | import 'package:aero/screens/home/widgets/refresh_countdown_timer.dart'; |
| 17 | import 'package:aero/screens/home/widgets/search_header.dart'; |
| 18 | import 'package:aero/screens/home/widgets/search_results_list.dart'; |
| 19 | import 'package:aero/screens/home/widgets/selected_filters.dart'; |
| 20 | import 'package:aero/screens/home/widgets/tracked_flights_list.dart'; |
| 21 | import 'package:flutter/material.dart'; |
| 22 | import 'package:flutter/services.dart'; |
| 23 | import 'package:flutter_map_animations/flutter_map_animations.dart'; |
| 24 | import 'package:gap/gap.dart'; |
| 25 | |
| 26 | class HomeScreen extends StatefulWidget |
| 27 | const HomeScreen({ |
| 28 | super.key, |
| 29 | }); |
| 30 | |
| 31 | @override |
| 32 | State<HomeScreen> createState |
| 33 | } |
| 34 | |
| 35 | class _HomeScreenState extends State |
| 36 | with WidgetsBindingObserver, TickerProviderStateMixin |
| 37 | late final HomeController |
| 38 | late final AnimatedMapController |
| 39 | vsync: this, |
| 40 | duration: const Duration(milliseconds |
| 41 | curve: Curves.easeInOut, |
| 42 | cancelPreviousAnimations: true, |
| 43 | ); |
| 44 | final DraggableScrollableController _bottomSheetController = |
| 45 | DraggableScrollableController(); |
| 46 | LatLng? _lastAnimatedPosition; |
| 47 | FlightResponseEntity? _lastFlightInfo; |
| 48 | |
| 49 | @override |
| 50 | void initState() { |
| 51 | super.initState(); |
| 52 | _homeController = HomeController(); |
| 53 | _homeController.addListener(_handleControllerUpdate); |
| 54 | WidgetsBinding.instance.addObserver( |
| 55 | SystemChrome.setSystemUIOverlayStyle( |
| 56 | const SystemUiOverlayStyle( |
| 57 | statusBarColor: Colors.transparent, |
| 58 | statusBarIconBrightness: Brightness.dark, |
| 59 | systemNavigationBarColor: Colors.transparent, |
| 60 | systemNavigationBarIconBrightness: Brightness.dark, |
| 61 | ), |
| 62 | ); |
| 63 | _homeController.initialize(); |
| 64 | } |
| 65 | |
| 66 | @override |
| 67 | void didChangeMetrics() { |
| 68 | final bottomInset = WidgetsBinding. |
| 69 | if (bottomInset > 0) { |
| 70 | _bottomSheetController.animateTo( |
| 71 | 0.75, |
| 72 | duration: const Duration( |
| 73 | milliseconds: 150, |
| 74 | ), |
| 75 | curve: Curves.easeInOut, |
| 76 | ); |
| 77 | } else {} |
| 78 | } |
| 79 | |
| 80 | @override |
| 81 | void dispose() { |
| 82 | WidgetsBinding.instance.removeObserver( |
| 83 | _bottomSheetController.dispose(); |
| 84 | _homeController.removeListener(_handleControllerUpdate); |
| 85 | _homeController.dispose(); |
| 86 | _mapController.dispose(); |
| 87 | super.dispose(); |
| 88 | } |
| 89 | |
| 90 | void _handleControllerUpdate() { |
| 91 | final hasNewFlight = |
| 92 | _homeController.flightInfo?.id != _lastFlightInfo?. |
| 93 | _homeController.flightInfo != null; |
| 94 | setState(() {}); |
| 95 | _maybeAnimateMap(hasNewFlight); |
| 96 | if (hasNewFlight) { |
| 97 | _expandBottomSheet(); |
| 98 | _lastFlightInfo = _homeController.flightInfo; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | void _expandBottomSheet() { |
| 103 | _bottomSheetController.animateTo( |
| 104 | 0.75, |
| 105 | duration: const Duration(milliseconds |
| 106 | curve: Curves.easeInOut, |
| 107 | ); |
| 108 | } |
| 109 | |
| 110 | void _maybeAnimateMap(bool |
| 111 | final position = _homeController.currentPosition; |
| 112 | if (position != null) { |
| 113 | final target = LatLng( |
| 114 | position.latitude.toDouble(), |
| 115 | position.longitude.toDouble(), |
| 116 | ); |
| 117 | final shouldAnimate = _lastAnimatedPosition == null |
| 118 | _lastAnimatedPosition!.latitude != target.latitude || |
| 119 | _lastAnimatedPosition!.longitude != target.longitude; |
| 120 | if (shouldAnimate) { |
| 121 | _mapController.animateTo(dest: target); |
| 122 | _lastAnimatedPosition = target; |
| 123 | } |
| 124 | return; |
| 125 | } |
| 126 | |
| 127 | if (flightChanged && |
| 128 | _homeController.coordinates.length == 2 && |
| 129 | _homeController.coordinates[1] != _lastAnimatedPosition) { |
| 130 | final destination = _homeController.coordinates[1 |
| 131 | _mapController.animateTo(dest: destination); |
| 132 | _lastAnimatedPosition = destination; |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | void _showBookingDetailsSheet() { |
| 137 | final info = _homeController.flightInfo; |
| 138 | if (info == null) return |
| 139 | |
| 140 | // Get the first booking if it exists |
| 141 | final existingBooking = info.bookings != |
| 142 | ? info.bookings!.first |
| 143 | : null; |
| 144 | |
| 145 | showModalBottomSheet( |
| 146 | context: context, |
| 147 | isScrollControlled: true, |
| 148 | backgroundColor: Colors.transparent, |
| 149 | builder: (context) => BookingDetailsSheet( |
| 150 | flightId: info.id, |
| 151 | existingBooking: existingBooking, |
| 152 | onSaved: () { |
| 153 | // Refresh flight data to get updated booking |
| 154 | _homeController.loadFlightInfo( |
| 155 | info.flightNo, |
| 156 | info.flightNo, |
| 157 | info.date.toLocal(), |
| 158 | forceUpdate: true, |
| 159 | ); |
| 160 | }, |
| 161 | onDeleted: () { |
| 162 | // Refresh flight data after deletion |
| 163 | _homeController.loadFlightInfo( |
| 164 | info.flightNo, |
| 165 | info.flightNo, |
| 166 | info.date.toLocal(), |
| 167 | forceUpdate: true, |
| 168 | ); |
| 169 | }, |
| 170 | ), |
| 171 | ); |
| 172 | } |
| 173 | |
| 174 | @override |
| 175 | Widget build(BuildContext |
| 176 | final controller = _homeController; |
| 177 | final isSelectingFlight = |
| 178 | controller.panelState == FlightPanelState.selectingFlight |
| 179 | controller.flightSearchResults != null; |
| 180 | final isShowingFlight = |
| 181 | controller.panelState == FlightPanelState.showingFlight |
| 182 | controller.flightInfo != null; |
| 183 | final isLoadingFlight = |
| 184 | controller.panelState == FlightPanelState.loadingFlight |
| 185 | |
| 186 | return Scaffold( |
| 187 | body: Stack( |
| 188 | children: [ |
| 189 | Positioned.fill( |
| 190 | bottom: MediaQuery.of(context) |
| 191 | child: FlightMap( |
| 192 | mapController: _mapController, |
| 193 | arrivalAirport: controller.arrivalAirport, |
| 194 | departureAirport: controller.departureAirport, |
| 195 | coordinates: controller.coordinates, |
| 196 | flightTrackPoints: controller.flightTrackPoints, |
| 197 | currentHeading: controller.currentPosition?.heading?. |
| 198 | onAircraftSelected: controller.onAircraftSelected, |
| 199 | isFlightInAir: controller.isInAir, |
| 200 | ), |
| 201 | ), |
| 202 | if (controller.isTrackingActive) |
| 203 | Positioned( |
| 204 | top: MediaQuery.of(context) |
| 205 | right: 10, |
| 206 | child: RefreshCountdownTimer( |
| 207 | secondsRemaining: controller.secondsUntilNextUpdate, |
| 208 | ), |
| 209 | ), |
| 210 | if (controller.isInAir && controller.currentPosition != |
| 211 | Positioned( |
| 212 | top: MediaQuery.of(context) |
| 213 | left: 20, |
| 214 | right: 20, |
| 215 | child: Center( |
| 216 | child: AnimatedFlightInfoBar( |
| 217 | altitude: |
| 218 | (controller.currentPosition!.altitude * 100) |
| 219 | speed: controller.currentPosition!.groundspeed.toInt |
| 220 | heading: controller.currentPosition!.heading?. |
| 221 | ), |
| 222 | ), |
| 223 | ), |
| 224 | DraggableScrollableSheet( |
| 225 | initialChildSize: .25, |
| 226 | controller: _bottomSheetController, |
| 227 | minChildSize: .25, |
| 228 | builder: (context, scrollController) { |
| 229 | return SafeArea( |
| 230 | child: Container( |
| 231 | decoration: BoxDecoration( |
| 232 | color: Colors.white, |
| 233 | borderRadius: BorderRadius.circular( |
| 234 | ), |
| 235 | child: SingleChildScrollView( |
| 236 | controller: scrollController, |
| 237 | child: Padding( |
| 238 | padding: const EdgeInsets. |
| 239 | child: isSelectingFlight |
| 240 | ? _buildFlightSelection(controller) |
| 241 | : isShowingFlight |
| 242 | ? _buildFlightInfoCard(controller, context) |
| 243 | : isLoadingFlight |
| 244 | ? _buildFlightInfoSkeleton() |
| 245 | : _buildSearchContent( |
| 246 | controller, |
| 247 | context, |
| 248 | ), |
| 249 | ), |
| 250 | ), |
| 251 | ), |
| 252 | ); |
| 253 | }, |
| 254 | ), |
| 255 | ], |
| 256 | ), |
| 257 | ); |
| 258 | } |
| 259 | |
| 260 | Widget _buildFlightSelection(HomeController |
| 261 | return FlightSelectionList( |
| 262 | flights: controller.flightSearchResults!.flights, |
| 263 | onFlightSelected: controller.handleFlightSelection, |
| 264 | onClose: controller.closeFlightSelection, |
| 265 | ); |
| 266 | } |
| 267 | |
| 268 | Widget _buildFlightInfoCard( |
| 269 | HomeController controller, |
| 270 | BuildContext context, |
| 271 | ) { |
| 272 | final info = controller.flightInfo! |
| 273 | return FlightInfoWidget( |
| 274 | info: info, |
| 275 | flightPositions: controller.flightPositions, |
| 276 | onRefreshFlightData: () { |
| 277 | controller.loadFlightInfo( |
| 278 | info.flightNo, |
| 279 | info.flightNo, |
| 280 | info.date.toLocal(), |
| 281 | forceUpdate: true, |
| 282 | ); |
| 283 | }, |
| 284 | onClose: controller.clearFlightContext, |
| 285 | onRefreshTracking: () { |
| 286 | controller.refreshTracking(); |
| 287 | ScaffoldMessenger.of(context).showSnackBar |
| 288 | const SnackBar( |
| 289 | content: Text('Tracking refreshed'), |
| 290 | duration: Duration(seconds: 2 |
| 291 | ), |
| 292 | ); |
| 293 | }, |
| 294 | onBookingDetails: _showBookingDetailsSheet, |
| 295 | ); |
| 296 | } |
| 297 | |
| 298 | Widget _buildSearchContent( |
| 299 | HomeController controller, |
| 300 | BuildContext context, |
| 301 | ) { |
| 302 | final selectedAirline = controller.selectedAirline; |
| 303 | final selectedFlightNumber = controller.selectedFlightNumber; |
| 304 | final departureAirport = controller.departureAirport; |
| 305 | final arrivalAirport = controller.arrivalAirport; |
| 306 | final selectedDate = controller.selectedDate; |
| 307 | final error = controller.error; |
| 308 | final searchEnabled = |
| 309 | !(departureAirport != null && arrivalAirport != |
| 310 | !(selectedAirline != null && selectedFlightNumber != |
| 311 | final showDateSelector = |
| 312 | ((departureAirport != null && arrivalAirport != null |
| 313 | (selectedAirline != null && selectedFlightNumber != null |
| 314 | (selectedDate == null || error != null |
| 315 | final flightController = controller.flightController; |
| 316 | |
| 317 | return Column( |
| 318 | crossAxisAlignment: CrossAxisAlignment.start, |
| 319 | children: [ |
| 320 | SearchHeader(), |
| 321 | Row( |
| 322 | children: [ |
| 323 | SelectedFilters( |
| 324 | onAirlineClear: controller.clearAirline, |
| 325 | onFlightNumberClear: controller.clearFlightNumber, |
| 326 | onAirportsClear: controller.clearAirports, |
| 327 | onDepartureAirportClear: controller.clearDepartureAirport, |
| 328 | selectedAirline: selectedAirline, |
| 329 | arrivalAirport: arrivalAirport, |
| 330 | departureAirport: departureAirport, |
| 331 | selectedFlightNumber: selectedFlightNumber, |
| 332 | ), |
| 333 | Expanded( |
| 334 | child: FlightSearchBar( |
| 335 | searchController: flightController, |
| 336 | isSearchEnabled: searchEnabled, |
| 337 | hintText: _buildSearchHint(controller), |
| 338 | onSearchChanged: (value) { |
| 339 | if (departureAirport != null && arrivalAirport != |
| 340 | return; |
| 341 | } |
| 342 | controller.clearError(); |
| 343 | controller.debounceSearch(value); |
| 344 | }, |
| 345 | ), |
| 346 | ), |
| 347 | ], |
| 348 | ), |
| 349 | const Gap(16) |
| 350 | if (arrivalAirport == null && |
| 351 | departureAirport == null && |
| 352 | selectedAirline != null && |
| 353 | selectedFlightNumber == null) |
| 354 | Padding( |
| 355 | padding: const EdgeInsets. |
| 356 | child: Text( |
| 357 | "Tip: For flight numbers like 6E1045, just enter 1045", |
| 358 | style: TextStyle( |
| 359 | fontSize: 12, |
| 360 | color: Colors.grey[600] |
| 361 | fontStyle: FontStyle.italic, |
| 362 | ), |
| 363 | ), |
| 364 | ), |
| 365 | if (error != null) _buildErrorBanner |
| 366 | if (showDateSelector) |
| 367 | DateSelectionList( |
| 368 | onDateSelected: (date) => controller.loadFlightsForSelection(date) |
| 369 | ), |
| 370 | if (selectedAirline != null && |
| 371 | flightController.text.isNotEmpty && |
| 372 | selectedFlightNumber == null) |
| 373 | ListTile( |
| 374 | title: Text(selectedAirline.name), |
| 375 | subtitle: Text( |
| 376 | "${selectedAirline.iata}${ |
| 377 | ), |
| 378 | leading: selectedAirline.image != null && |
| 379 | selectedAirline.image!.isNotEmpty |
| 380 | ? SvgPicture.network( |
| 381 | selectedAirline.image!, |
| 382 | width: 24, |
| 383 | height: 18, |
| 384 | ) |
| 385 | : CachedNetworkImage( |
| 386 | imageUrl: |
| 387 | "https://www.flightaware.com/images/airline_logos/180px/${selectedAirline.icao} |
| 388 | width: 24, |
| 389 | height: 18, |
| 390 | errorWidget: (context, url, error) => const |
| 391 | ), |
| 392 | onTap: () { |
| 393 | controller.selectFlightNumber(flightController.text); |
| 394 | FocusScope.of(context).unfocus |
| 395 | }, |
| 396 | ), |
| 397 | SearchResultsList( |
| 398 | results: controller.results, |
| 399 | loading: controller.searchState == SearchState |
| 400 | selectedAirline: selectedAirline, |
| 401 | selectedFlightNumber: selectedFlightNumber, |
| 402 | flightController: flightController, |
| 403 | onAirportSelected: (airport) { |
| 404 | controller.selectAirport(airport); |
| 405 | }, |
| 406 | onAirlineSelected: (airline) { |
| 407 | controller.selectAirline( |
| 408 | airline, |
| 409 | currentInput: flightController.text, |
| 410 | ); |
| 411 | }, |
| 412 | onFlightNumberSelected: (flightNumber) { |
| 413 | controller.selectFlightNumber(flightNumber); |
| 414 | FocusScope.of(context).unfocus |
| 415 | }, |
| 416 | ), |
| 417 | if (selectedAirline == null && |
| 418 | arrivalAirport == null && |
| 419 | departureAirport == null && |
| 420 | selectedFlightNumber == null && |
| 421 | controller.results.isEmpty && |
| 422 | controller.searchState == SearchState.idle |
| 423 | !controller.loadingTrackedFlights && |
| 424 | controller.trackedFlights.isNotEmpty) |
| 425 | TrackedFlightsList( |
| 426 | trackedFlights: controller.trackedFlights, |
| 427 | onFlightTap: (iata, icao, date, forceUpdate) => |
| 428 | controller.loadFlightInfo( |
| 429 | iata, |
| 430 | icao, |
| 431 | date, |
| 432 | forceUpdate: forceUpdate, |
| 433 | ), |
| 434 | ), |
| 435 | FlightsList( |
| 436 | flights: controller.flights, |
| 437 | selectedDate: controller.selectedDate, |
| 438 | onFlightTap: controller.loadFlightInfo, |
| 439 | ), |
| 440 | ], |
| 441 | ); |
| 442 | } |
| 443 | |
| 444 | Widget _buildErrorBanner(String |
| 445 | return Padding( |
| 446 | padding: const EdgeInsets. |
| 447 | child: Container( |
| 448 | padding: const EdgeInsets. |
| 449 | decoration: BoxDecoration( |
| 450 | color: Colors.red[50] |
| 451 | borderRadius: BorderRadius.circular( |
| 452 | border: Border.all( |
| 453 | color: Colors.red[200] |
| 454 | width: 1, |
| 455 | ), |
| 456 | ), |
| 457 | child: Row( |
| 458 | children: [ |
| 459 | Expanded( |
| 460 | child: Text( |
| 461 | message, |
| 462 | style: TextStyle( |
| 463 | color: Colors.red[900] |
| 464 | fontSize: 14, |
| 465 | ), |
| 466 | ), |
| 467 | ), |
| 468 | IconButton( |
| 469 | icon: Icon( |
| 470 | Icons.close, |
| 471 | size: 20, |
| 472 | color: Colors.red[900] |
| 473 | ), |
| 474 | onPressed: () { |
| 475 | _homeController.clearError(); |
| 476 | }, |
| 477 | padding: EdgeInsets.zero, |
| 478 | constraints: const BoxConstraints() |
| 479 | ), |
| 480 | ], |
| 481 | ), |
| 482 | ), |
| 483 | ); |
| 484 | } |
| 485 | |
| 486 | String _buildSearchHint(HomeController |
| 487 | if (controller.selectedFlightNumber != null) { |
| 488 | return "Select date"; |
| 489 | } |
| 490 | if (controller.selectedAirline != null && |
| 491 | controller.arrivalAirport == null && |
| 492 | controller.departureAirport == null) { |
| 493 | return "Flight No"; |
| 494 | } |
| 495 | if (controller.departureAirport == null) { |
| 496 | return "Search airline, flight or airport"; |
| 497 | } |
| 498 | if (controller.arrivalAirport == null) { |
| 499 | return "Search arrival airport"; |
| 500 | } |
| 501 | return "Select date"; |
| 502 | } |
| 503 | |
| 504 | Widget _buildFlightInfoSkeleton() { |
| 505 | return Padding( |
| 506 | padding: const EdgeInsets. |
| 507 | child: Column( |
| 508 | crossAxisAlignment: CrossAxisAlignment.start, |
| 509 | spacing: 4, |
| 510 | children: [ |
| 511 | // Header skeleton |
| 512 | Row( |
| 513 | spacing: 8, |
| 514 | crossAxisAlignment: CrossAxisAlignment.center, |
| 515 | children: [ |
| 516 | Container( |
| 517 | width: 30, |
| 518 | height: 30, |
| 519 | decoration: BoxDecoration( |
| 520 | color: Colors.grey[300] |
| 521 | borderRadius: BorderRadius.circular( |
| 522 | ), |
| 523 | ), |
| 524 | Column( |
| 525 | spacing: 2, |
| 526 | crossAxisAlignment: CrossAxisAlignment.start, |
| 527 | children: [ |
| 528 | Container( |
| 529 | width: 200, |
| 530 | height: 18, |
| 531 | decoration: BoxDecoration( |
| 532 | color: Colors.grey[300] |
| 533 | borderRadius: BorderRadius.circular( |
| 534 | ), |
| 535 | ), |
| 536 | const Gap(4) |
| 537 | Container( |
| 538 | width: 150, |
| 539 | height: 14, |
| 540 | decoration: BoxDecoration( |
| 541 | color: Colors.grey[300] |
| 542 | borderRadius: BorderRadius.circular( |
| 543 | ), |
| 544 | ), |
| 545 | ], |
| 546 | ), |
| 547 | Spacer(), |
| 548 | Container( |
| 549 | width: 24, |
| 550 | height: 24, |
| 551 | decoration: BoxDecoration( |
| 552 | color: Colors.grey[300] |
| 553 | borderRadius: BorderRadius.circular( |
| 554 | ), |
| 555 | ), |
| 556 | Container( |
| 557 | width: 24, |
| 558 | height: 24, |
| 559 | decoration: BoxDecoration( |
| 560 | color: Colors.grey[300] |
| 561 | borderRadius: BorderRadius.circular( |
| 562 | ), |
| 563 | ), |
| 564 | ], |
| 565 | ), |
| 566 | Divider(), |
| 567 | // Time message skeleton |
| 568 | Container( |
| 569 | width: 180, |
| 570 | height: 20, |
| 571 | decoration: BoxDecoration( |
| 572 | color: Colors.grey[300] |
| 573 | borderRadius: BorderRadius.circular( |
| 574 | ), |
| 575 | ), |
| 576 | const Gap(8) |
| 577 | // Route info skeleton |
| 578 | Container( |
| 579 | height: 120, |
| 580 | decoration: BoxDecoration( |
| 581 | color: Colors.grey[200] |
| 582 | borderRadius: BorderRadius.circular( |
| 583 | ), |
| 584 | child: Padding( |
| 585 | padding: const EdgeInsets. |
| 586 | child: Column( |
| 587 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 588 | children: [ |
| 589 | Row( |
| 590 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 591 | children: [ |
| 592 | Column( |
| 593 | crossAxisAlignment: CrossAxisAlignment.start, |
| 594 | children: [ |
| 595 | Container( |
| 596 | width: 60, |
| 597 | height: 12, |
| 598 | decoration: BoxDecoration( |
| 599 | color: Colors.grey[300] |
| 600 | borderRadius: BorderRadius.circular( |
| 601 | ), |
| 602 | ), |
| 603 | const Gap(8) |
| 604 | Container( |
| 605 | width: 80, |
| 606 | height: 24, |
| 607 | decoration: BoxDecoration( |
| 608 | color: Colors.grey[300] |
| 609 | borderRadius: BorderRadius.circular( |
| 610 | ), |
| 611 | ), |
| 612 | const Gap(4) |
| 613 | Container( |
| 614 | width: 100, |
| 615 | height: 14, |
| 616 | decoration: BoxDecoration( |
| 617 | color: Colors.grey[300] |
| 618 | borderRadius: BorderRadius.circular( |
| 619 | ), |
| 620 | ), |
| 621 | const Gap(4) |
| 622 | Container( |
| 623 | width: 70, |
| 624 | height: 16, |
| 625 | decoration: BoxDecoration( |
| 626 | color: Colors.grey[300] |
| 627 | borderRadius: BorderRadius.circular( |
| 628 | ), |
| 629 | ), |
| 630 | ], |
| 631 | ), |
| 632 | Column( |
| 633 | crossAxisAlignment: CrossAxisAlignment.end, |
| 634 | children: [ |
| 635 | Container( |
| 636 | width: 60, |
| 637 | height: 12, |
| 638 | decoration: BoxDecoration( |
| 639 | color: Colors.grey[300] |
| 640 | borderRadius: BorderRadius.circular( |
| 641 | ), |
| 642 | ), |
| 643 | const Gap(8) |
| 644 | Container( |
| 645 | width: 80, |
| 646 | height: 24, |
| 647 | decoration: BoxDecoration( |
| 648 | color: Colors.grey[300] |
| 649 | borderRadius: BorderRadius.circular( |
| 650 | ), |
| 651 | ), |
| 652 | const Gap(4) |
| 653 | Container( |
| 654 | width: 100, |
| 655 | height: 14, |
| 656 | decoration: BoxDecoration( |
| 657 | color: Colors.grey[300] |
| 658 | borderRadius: BorderRadius.circular( |
| 659 | ), |
| 660 | ), |
| 661 | const Gap(4) |
| 662 | Container( |
| 663 | width: 70, |
| 664 | height: 16, |
| 665 | decoration: BoxDecoration( |
| 666 | color: Colors.grey[300] |
| 667 | borderRadius: BorderRadius.circular( |
| 668 | ), |
| 669 | ), |
| 670 | ], |
| 671 | ), |
| 672 | ], |
| 673 | ), |
| 674 | ], |
| 675 | ), |
| 676 | ), |
| 677 | ), |
| 678 | const Gap(8) |
| 679 | // "Worth Noting" section skeleton |
| 680 | Container( |
| 681 | width: 100, |
| 682 | height: 18, |
| 683 | decoration: BoxDecoration( |
| 684 | color: Colors.grey[300] |
| 685 | borderRadius: BorderRadius.circular( |
| 686 | ), |
| 687 | ), |
| 688 | const Gap(8) |
| 689 | Container( |
| 690 | height: 60, |
| 691 | decoration: BoxDecoration( |
| 692 | color: Colors.grey[200] |
| 693 | borderRadius: BorderRadius.circular( |
| 694 | ), |
| 695 | ), |
| 696 | ], |
| 697 | ), |
| 698 | ); |
| 699 | } |
| 700 | } |