| 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 | final hasFlightFilters = (controller.arrivalAirport != |
| 186 | controller.departureAirport != null) || |
| 187 | (controller.selectedAirline != null && |
| 188 | controller.selectedFlightNumber != null); |
| 189 | |
| 190 | return Scaffold( |
| 191 | body: Stack( |
| 192 | children: [ |
| 193 | Positioned.fill( |
| 194 | bottom: MediaQuery.of(context) |
| 195 | child: FlightMap( |
| 196 | mapController: _mapController, |
| 197 | arrivalAirport: controller.arrivalAirport, |
| 198 | departureAirport: controller.departureAirport, |
| 199 | coordinates: controller.coordinates, |
| 200 | flightTrackPoints: controller.flightTrackPoints, |
| 201 | currentHeading: controller.currentPosition?.heading?. |
| 202 | onAircraftSelected: controller.onAircraftSelected, |
| 203 | isFlightInAir: controller.isInAir, |
| 204 | ), |
| 205 | ), |
| 206 | if (controller.isTrackingActive) |
| 207 | Positioned( |
| 208 | top: MediaQuery.of(context) |
| 209 | right: 10, |
| 210 | child: RefreshCountdownTimer( |
| 211 | secondsRemaining: controller.secondsUntilNextUpdate, |
| 212 | ), |
| 213 | ), |
| 214 | if (controller.isInAir && controller.currentPosition != |
| 215 | Positioned( |
| 216 | top: MediaQuery.of(context) |
| 217 | left: 20, |
| 218 | right: 20, |
| 219 | child: Center( |
| 220 | child: AnimatedFlightInfoBar( |
| 221 | altitude: |
| 222 | (controller.currentPosition!.altitude * 100) |
| 223 | speed: controller.currentPosition!.groundspeed.toInt |
| 224 | heading: controller.currentPosition!.heading?. |
| 225 | ), |
| 226 | ), |
| 227 | ), |
| 228 | DraggableScrollableSheet( |
| 229 | initialChildSize: .25, |
| 230 | controller: _bottomSheetController, |
| 231 | minChildSize: .25, |
| 232 | builder: (context, scrollController) { |
| 233 | return SafeArea( |
| 234 | child: Container( |
| 235 | decoration: BoxDecoration( |
| 236 | color: Colors.white, |
| 237 | borderRadius: BorderRadius.circular( |
| 238 | ), |
| 239 | child: SingleChildScrollView( |
| 240 | controller: scrollController, |
| 241 | child: Padding( |
| 242 | padding: const EdgeInsets. |
| 243 | child: isSelectingFlight |
| 244 | ? _buildFlightSelection(controller) |
| 245 | : isShowingFlight |
| 246 | ? _buildFlightInfoCard(controller, context) |
| 247 | : isLoadingFlight && hasFlightFilters |
| 248 | ? _buildFlightInfoSkeleton() |
| 249 | : _buildSearchContent( |
| 250 | controller, |
| 251 | context, |
| 252 | ), |
| 253 | ), |
| 254 | ), |
| 255 | ), |
| 256 | ); |
| 257 | }, |
| 258 | ), |
| 259 | ], |
| 260 | ), |
| 261 | ); |
| 262 | } |
| 263 | |
| 264 | Widget _buildFlightSelection(HomeController |
| 265 | return FlightSelectionList( |
| 266 | flights: controller.flightSearchResults!.flights, |
| 267 | onFlightSelected: controller.handleFlightSelection, |
| 268 | onClose: controller.closeFlightSelection, |
| 269 | ); |
| 270 | } |
| 271 | |
| 272 | Widget _buildFlightInfoCard( |
| 273 | HomeController controller, |
| 274 | BuildContext context, |
| 275 | ) { |
| 276 | final info = controller.flightInfo! |
| 277 | return FlightInfoWidget( |
| 278 | info: info, |
| 279 | flightPositions: controller.flightPositions, |
| 280 | onRefreshFlightData: () { |
| 281 | controller.loadFlightInfo( |
| 282 | info.flightNo, |
| 283 | info.flightNo, |
| 284 | info.date.toLocal(), |
| 285 | forceUpdate: true, |
| 286 | ); |
| 287 | }, |
| 288 | onClose: controller.clearFlightContext, |
| 289 | onRefreshTracking: () { |
| 290 | controller.refreshTracking(); |
| 291 | ScaffoldMessenger.of(context).showSnackBar |
| 292 | const SnackBar( |
| 293 | content: Text('Tracking refreshed'), |
| 294 | duration: Duration(seconds: 2 |
| 295 | ), |
| 296 | ); |
| 297 | }, |
| 298 | onBookingDetails: _showBookingDetailsSheet, |
| 299 | ); |
| 300 | } |
| 301 | |
| 302 | Widget _buildSearchContent( |
| 303 | HomeController controller, |
| 304 | BuildContext context, |
| 305 | ) { |
| 306 | final selectedAirline = controller.selectedAirline; |
| 307 | final selectedFlightNumber = controller.selectedFlightNumber; |
| 308 | final departureAirport = controller.departureAirport; |
| 309 | final arrivalAirport = controller.arrivalAirport; |
| 310 | final selectedDate = controller.selectedDate; |
| 311 | final error = controller.error; |
| 312 | final searchEnabled = |
| 313 | !(departureAirport != null && arrivalAirport != |
| 314 | !(selectedAirline != null && selectedFlightNumber != |
| 315 | final showDateSelector = |
| 316 | ((departureAirport != null && arrivalAirport != null |
| 317 | (selectedAirline != null && selectedFlightNumber != null |
| 318 | (selectedDate == null || error != null |
| 319 | final flightController = controller.flightController; |
| 320 | |
| 321 | return Column( |
| 322 | crossAxisAlignment: CrossAxisAlignment.start, |
| 323 | children: [ |
| 324 | SearchHeader(), |
| 325 | Row( |
| 326 | children: [ |
| 327 | SelectedFilters( |
| 328 | onAirlineClear: controller.clearAirline, |
| 329 | onFlightNumberClear: controller.clearFlightNumber, |
| 330 | onAirportsClear: controller.clearAirports, |
| 331 | onDepartureAirportClear: controller.clearDepartureAirport, |
| 332 | selectedAirline: selectedAirline, |
| 333 | arrivalAirport: arrivalAirport, |
| 334 | departureAirport: departureAirport, |
| 335 | selectedFlightNumber: selectedFlightNumber, |
| 336 | ), |
| 337 | Expanded( |
| 338 | child: FlightSearchBar( |
| 339 | searchController: flightController, |
| 340 | isSearchEnabled: searchEnabled, |
| 341 | hintText: _buildSearchHint(controller), |
| 342 | onSearchChanged: (value) { |
| 343 | if (departureAirport != null && arrivalAirport != |
| 344 | return; |
| 345 | } |
| 346 | controller.clearError(); |
| 347 | controller.debounceSearch(value); |
| 348 | }, |
| 349 | ), |
| 350 | ), |
| 351 | ], |
| 352 | ), |
| 353 | const Gap(16) |
| 354 | if (arrivalAirport == null && |
| 355 | departureAirport == null && |
| 356 | selectedAirline != null && |
| 357 | selectedFlightNumber == null) |
| 358 | Padding( |
| 359 | padding: const EdgeInsets. |
| 360 | child: Text( |
| 361 | "Tip: For flight numbers like 6E1045, just enter 1045", |
| 362 | style: TextStyle( |
| 363 | fontSize: 12, |
| 364 | color: Colors.grey[600] |
| 365 | fontStyle: FontStyle.italic, |
| 366 | ), |
| 367 | ), |
| 368 | ), |
| 369 | if (error != null) _buildErrorBanner |
| 370 | if (showDateSelector) |
| 371 | DateSelectionList( |
| 372 | onDateSelected: (date) => controller.loadFlightsForSelection(date) |
| 373 | ), |
| 374 | if (selectedAirline != null && |
| 375 | flightController.text.isNotEmpty && |
| 376 | selectedFlightNumber == null) |
| 377 | ListTile( |
| 378 | title: Text(selectedAirline.name), |
| 379 | subtitle: Text( |
| 380 | "${selectedAirline.iata}${ |
| 381 | ), |
| 382 | leading: selectedAirline.image != null && |
| 383 | selectedAirline.image!.isNotEmpty |
| 384 | ? SvgPicture.network( |
| 385 | selectedAirline.image!, |
| 386 | width: 24, |
| 387 | height: 18, |
| 388 | ) |
| 389 | : CachedNetworkImage( |
| 390 | imageUrl: |
| 391 | "https://airlabs.co/img/airline/m/${selectedAirline.iata} |
| 392 | width: 24, |
| 393 | height: 18, |
| 394 | errorWidget: (context, url, error) => const |
| 395 | ), |
| 396 | onTap: () { |
| 397 | controller.selectFlightNumber(flightController.text); |
| 398 | FocusScope.of(context).unfocus |
| 399 | }, |
| 400 | ), |
| 401 | SearchResultsList( |
| 402 | results: controller.results, |
| 403 | loading: controller.searchState == SearchState |
| 404 | selectedAirline: selectedAirline, |
| 405 | selectedFlightNumber: selectedFlightNumber, |
| 406 | flightController: flightController, |
| 407 | onAirportSelected: (airport) { |
| 408 | controller.selectAirport(airport); |
| 409 | }, |
| 410 | onAirlineSelected: (airline) { |
| 411 | controller.selectAirline( |
| 412 | airline, |
| 413 | currentInput: flightController.text, |
| 414 | ); |
| 415 | }, |
| 416 | onFlightNumberSelected: (flightNumber) { |
| 417 | controller.selectFlightNumber(flightNumber); |
| 418 | FocusScope.of(context).unfocus |
| 419 | }, |
| 420 | ), |
| 421 | if (selectedAirline == null && |
| 422 | arrivalAirport == null && |
| 423 | departureAirport == null && |
| 424 | selectedFlightNumber == null && |
| 425 | controller.results.isEmpty && |
| 426 | controller.searchState == SearchState.idle |
| 427 | !controller.loadingTrackedFlights && |
| 428 | controller.trackedFlights.isNotEmpty) |
| 429 | TrackedFlightsList( |
| 430 | trackedFlights: controller.trackedFlights, |
| 431 | onFlightTap: (iata, icao, date, forceUpdate) => |
| 432 | controller.loadFlightInfo( |
| 433 | iata, |
| 434 | icao, |
| 435 | date, |
| 436 | forceUpdate: forceUpdate, |
| 437 | ), |
| 438 | ), |
| 439 | FlightsList( |
| 440 | flights: controller.flights, |
| 441 | selectedDate: controller.selectedDate, |
| 442 | onFlightTap: controller.loadFlightInfo, |
| 443 | ), |
| 444 | ], |
| 445 | ); |
| 446 | } |
| 447 | |
| 448 | Widget _buildErrorBanner(String |
| 449 | return Padding( |
| 450 | padding: const EdgeInsets. |
| 451 | child: Container( |
| 452 | padding: const EdgeInsets. |
| 453 | decoration: BoxDecoration( |
| 454 | color: Colors.red[50] |
| 455 | borderRadius: BorderRadius.circular( |
| 456 | border: Border.all( |
| 457 | color: Colors.red[200] |
| 458 | width: 1, |
| 459 | ), |
| 460 | ), |
| 461 | child: Row( |
| 462 | children: [ |
| 463 | Expanded( |
| 464 | child: Text( |
| 465 | message, |
| 466 | style: TextStyle( |
| 467 | color: Colors.red[900] |
| 468 | fontSize: 14, |
| 469 | ), |
| 470 | ), |
| 471 | ), |
| 472 | IconButton( |
| 473 | icon: Icon( |
| 474 | Icons.close, |
| 475 | size: 20, |
| 476 | color: Colors.red[900] |
| 477 | ), |
| 478 | onPressed: () { |
| 479 | _homeController.clearError(); |
| 480 | }, |
| 481 | padding: EdgeInsets.zero, |
| 482 | constraints: const BoxConstraints() |
| 483 | ), |
| 484 | ], |
| 485 | ), |
| 486 | ), |
| 487 | ); |
| 488 | } |
| 489 | |
| 490 | String _buildSearchHint(HomeController |
| 491 | if (controller.selectedFlightNumber != null) { |
| 492 | return "Select date"; |
| 493 | } |
| 494 | if (controller.selectedAirline != null && |
| 495 | controller.arrivalAirport == null && |
| 496 | controller.departureAirport == null) { |
| 497 | return "Flight No"; |
| 498 | } |
| 499 | if (controller.departureAirport == null) { |
| 500 | return "Search airline, flight or airport"; |
| 501 | } |
| 502 | if (controller.arrivalAirport == null) { |
| 503 | return "Search arrival airport"; |
| 504 | } |
| 505 | return "Select date"; |
| 506 | } |
| 507 | |
| 508 | Widget _buildFlightInfoSkeleton() { |
| 509 | return Padding( |
| 510 | padding: const EdgeInsets. |
| 511 | child: Column( |
| 512 | crossAxisAlignment: CrossAxisAlignment.start, |
| 513 | spacing: 4, |
| 514 | children: [ |
| 515 | // Header skeleton |
| 516 | Row( |
| 517 | spacing: 8, |
| 518 | crossAxisAlignment: CrossAxisAlignment.center, |
| 519 | children: [ |
| 520 | Container( |
| 521 | width: 30, |
| 522 | height: 30, |
| 523 | decoration: BoxDecoration( |
| 524 | color: Colors.grey[300] |
| 525 | borderRadius: BorderRadius.circular( |
| 526 | ), |
| 527 | ), |
| 528 | Column( |
| 529 | spacing: 2, |
| 530 | crossAxisAlignment: CrossAxisAlignment.start, |
| 531 | children: [ |
| 532 | Container( |
| 533 | width: 200, |
| 534 | height: 18, |
| 535 | decoration: BoxDecoration( |
| 536 | color: Colors.grey[300] |
| 537 | borderRadius: BorderRadius.circular( |
| 538 | ), |
| 539 | ), |
| 540 | const Gap(4) |
| 541 | Container( |
| 542 | width: 150, |
| 543 | height: 14, |
| 544 | decoration: BoxDecoration( |
| 545 | color: Colors.grey[300] |
| 546 | borderRadius: BorderRadius.circular( |
| 547 | ), |
| 548 | ), |
| 549 | ], |
| 550 | ), |
| 551 | Spacer(), |
| 552 | Container( |
| 553 | width: 24, |
| 554 | height: 24, |
| 555 | decoration: BoxDecoration( |
| 556 | color: Colors.grey[300] |
| 557 | borderRadius: BorderRadius.circular( |
| 558 | ), |
| 559 | ), |
| 560 | Container( |
| 561 | width: 24, |
| 562 | height: 24, |
| 563 | decoration: BoxDecoration( |
| 564 | color: Colors.grey[300] |
| 565 | borderRadius: BorderRadius.circular( |
| 566 | ), |
| 567 | ), |
| 568 | ], |
| 569 | ), |
| 570 | Divider(), |
| 571 | // Time message skeleton |
| 572 | Container( |
| 573 | width: 180, |
| 574 | height: 20, |
| 575 | decoration: BoxDecoration( |
| 576 | color: Colors.grey[300] |
| 577 | borderRadius: BorderRadius.circular( |
| 578 | ), |
| 579 | ), |
| 580 | const Gap(8) |
| 581 | // Route info skeleton |
| 582 | Container( |
| 583 | height: 120, |
| 584 | decoration: BoxDecoration( |
| 585 | color: Colors.grey[200] |
| 586 | borderRadius: BorderRadius.circular( |
| 587 | ), |
| 588 | child: Padding( |
| 589 | padding: const EdgeInsets. |
| 590 | child: Column( |
| 591 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 592 | children: [ |
| 593 | Row( |
| 594 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 595 | children: [ |
| 596 | Column( |
| 597 | crossAxisAlignment: CrossAxisAlignment.start, |
| 598 | children: [ |
| 599 | Container( |
| 600 | width: 60, |
| 601 | height: 12, |
| 602 | decoration: BoxDecoration( |
| 603 | color: Colors.grey[300] |
| 604 | borderRadius: BorderRadius.circular( |
| 605 | ), |
| 606 | ), |
| 607 | const Gap(8) |
| 608 | Container( |
| 609 | width: 80, |
| 610 | height: 24, |
| 611 | decoration: BoxDecoration( |
| 612 | color: Colors.grey[300] |
| 613 | borderRadius: BorderRadius.circular( |
| 614 | ), |
| 615 | ), |
| 616 | const Gap(4) |
| 617 | Container( |
| 618 | width: 100, |
| 619 | height: 14, |
| 620 | decoration: BoxDecoration( |
| 621 | color: Colors.grey[300] |
| 622 | borderRadius: BorderRadius.circular( |
| 623 | ), |
| 624 | ), |
| 625 | const Gap(4) |
| 626 | Container( |
| 627 | width: 70, |
| 628 | height: 16, |
| 629 | decoration: BoxDecoration( |
| 630 | color: Colors.grey[300] |
| 631 | borderRadius: BorderRadius.circular( |
| 632 | ), |
| 633 | ), |
| 634 | ], |
| 635 | ), |
| 636 | Column( |
| 637 | crossAxisAlignment: CrossAxisAlignment.end, |
| 638 | children: [ |
| 639 | Container( |
| 640 | width: 60, |
| 641 | height: 12, |
| 642 | decoration: BoxDecoration( |
| 643 | color: Colors.grey[300] |
| 644 | borderRadius: BorderRadius.circular( |
| 645 | ), |
| 646 | ), |
| 647 | const Gap(8) |
| 648 | Container( |
| 649 | width: 80, |
| 650 | height: 24, |
| 651 | decoration: BoxDecoration( |
| 652 | color: Colors.grey[300] |
| 653 | borderRadius: BorderRadius.circular( |
| 654 | ), |
| 655 | ), |
| 656 | const Gap(4) |
| 657 | Container( |
| 658 | width: 100, |
| 659 | height: 14, |
| 660 | decoration: BoxDecoration( |
| 661 | color: Colors.grey[300] |
| 662 | borderRadius: BorderRadius.circular( |
| 663 | ), |
| 664 | ), |
| 665 | const Gap(4) |
| 666 | Container( |
| 667 | width: 70, |
| 668 | height: 16, |
| 669 | decoration: BoxDecoration( |
| 670 | color: Colors.grey[300] |
| 671 | borderRadius: BorderRadius.circular( |
| 672 | ), |
| 673 | ), |
| 674 | ], |
| 675 | ), |
| 676 | ], |
| 677 | ), |
| 678 | ], |
| 679 | ), |
| 680 | ), |
| 681 | ), |
| 682 | const Gap(8) |
| 683 | // "Worth Noting" section skeleton |
| 684 | Container( |
| 685 | width: 100, |
| 686 | height: 18, |
| 687 | decoration: BoxDecoration( |
| 688 | color: Colors.grey[300] |
| 689 | borderRadius: BorderRadius.circular( |
| 690 | ), |
| 691 | ), |
| 692 | const Gap(8) |
| 693 | Container( |
| 694 | height: 60, |
| 695 | decoration: BoxDecoration( |
| 696 | color: Colors.grey[200] |
| 697 | borderRadius: BorderRadius.circular( |
| 698 | ), |
| 699 | ), |
| 700 | ], |
| 701 | ), |
| 702 | ); |
| 703 | } |
| 704 | } |