Skip to content

Commit

Permalink
fix: meteor
Browse files Browse the repository at this point in the history
  • Loading branch information
whes1015 committed Sep 5, 2024
1 parent 8f920c1 commit 4d5c3db
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions lib/app/page/map/meteor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,22 @@ class _AdvancedWeatherChartState extends State<AdvancedWeatherChart> {
leading: IconButton(
icon: const Icon(Icons.arrow_back),
onPressed: widget.onClose,
tooltip: 'Back',
),
automaticallyImplyLeading: false,
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'${data?.station.county ?? ""}${data?.station.name ?? ""}',
style: context.theme.textTheme.titleLarge,
style: context.theme.textTheme.titleLarge?.copyWith(
fontWeight: FontWeight.bold,
),
),
Text(
stationId!,
style: context.theme.textTheme.bodyMedium?.copyWith(
color: context.colors.onSurface.withOpacity(0.7),
color: context.colors.onSurface.withOpacity(0.6),
),
),
],
Expand All @@ -154,22 +157,28 @@ class _AdvancedWeatherChartState extends State<AdvancedWeatherChart> {
_buildDataTypeSelector(),
const SizedBox(width: 16),
],
elevation: 0,
backgroundColor: context.colors.surface,
foregroundColor: context.colors.onSurface,
),
if (isLoading)
const CircularProgressIndicator()
else
Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildHeader(),
const SizedBox(height: 8),
_buildChart(),
],
padding: const EdgeInsets.all(16),
child: Center(
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(context.colors.primary),
),
),
)
else
Flexible(
child: SingleChildScrollView(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildHeader(),
const SizedBox(height: 16),
_buildChart(),
],
),
),
),
],
Expand Down

0 comments on commit 4d5c3db

Please sign in to comment.