Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
780edd2d3b |
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.5.7] - 2026-01-08
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Environment widget alignment** - Consistent card heights across all environment widgets
|
||||||
|
- Added `ConstrainedBox(minHeight: 170)` to Weather, Air Quality, and Forecast widgets
|
||||||
|
- All cards now match Sun Position widget height when displaying data
|
||||||
|
|
||||||
|
- **Sun position night labels** - Swap sunrise/sunset labels at night
|
||||||
|
- During day: Sunrise on left, Sunset on right (day arc)
|
||||||
|
- At night: Sunset on left, Sunrise on right (night arc)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Weather widget header** - Changed from location name to "Weather" for consistency
|
||||||
|
- Location now displayed in content area below temperature
|
||||||
|
|
||||||
## [1.5.6] - 2026-01-07
|
## [1.5.6] - 2026-01-07
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -67,77 +67,93 @@ class AirQualityWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
// AQI Display
|
// Content area with minimum height to match other widgets
|
||||||
Row(
|
ConstrainedBox(
|
||||||
children: [
|
constraints: const BoxConstraints(minHeight: 170),
|
||||||
// AQI number with colored background
|
child: Column(
|
||||||
Container(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
width: 64,
|
mainAxisSize: MainAxisSize.min,
|
||||||
height: 64,
|
children: [
|
||||||
decoration: BoxDecoration(
|
const SizedBox(height: 8),
|
||||||
color: aqi.level.color.withValues(alpha: 0.15),
|
// AQI Display
|
||||||
borderRadius: BorderRadius.circular(12),
|
Row(
|
||||||
border: Border.all(
|
|
||||||
color: aqi.level.color.withValues(alpha: 0.3),
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'${aqi.index}',
|
|
||||||
style:
|
|
||||||
Theme.of(context).textTheme.headlineMedium?.copyWith(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: aqi.level.color,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 16),
|
|
||||||
|
|
||||||
// Level info
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
// AQI number with colored background
|
||||||
aqi.level.label,
|
Container(
|
||||||
style:
|
width: 64,
|
||||||
Theme.of(context).textTheme.titleMedium?.copyWith(
|
height: 64,
|
||||||
fontWeight: FontWeight.w600,
|
decoration: BoxDecoration(
|
||||||
|
color: aqi.level.color.withValues(alpha: 0.15),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(
|
||||||
|
color: aqi.level.color.withValues(alpha: 0.3),
|
||||||
|
width: 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'${aqi.index}',
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.headlineMedium
|
||||||
|
?.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
color: aqi.level.color,
|
color: aqi.level.color,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(width: 16),
|
||||||
Text(
|
|
||||||
aqi.level.description,
|
// Level info
|
||||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
Expanded(
|
||||||
color: colorScheme.onSurfaceVariant,
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
aqi.level.label,
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.titleMedium
|
||||||
|
?.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: aqi.level.color,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
maxLines: 2,
|
const SizedBox(height: 4),
|
||||||
overflow: TextOverflow.ellipsis,
|
Text(
|
||||||
|
aqi.level.description,
|
||||||
|
style:
|
||||||
|
Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||||
|
color: colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
// Pollutants
|
// Pollutants
|
||||||
if (aqi.pollutants.isNotEmpty) ...[
|
if (aqi.pollutants.isNotEmpty) ...[
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
const Divider(height: 1),
|
const Divider(height: 1),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
Wrap(
|
Wrap(
|
||||||
spacing: 16,
|
spacing: 16,
|
||||||
runSpacing: 8,
|
runSpacing: 8,
|
||||||
children: aqi.pollutants
|
children: aqi.pollutants
|
||||||
.map((p) => _PollutantChip(pollutant: p))
|
.map((p) => _PollutantChip(pollutant: p))
|
||||||
.toList(),
|
.toList(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -106,18 +106,23 @@ class ForecastWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
// Forecast days - horizontal scroll
|
// Content area with minimum height to match other widgets
|
||||||
SizedBox(
|
ConstrainedBox(
|
||||||
height: 100,
|
constraints: const BoxConstraints(minHeight: 170),
|
||||||
child: ListView.separated(
|
child: Center(
|
||||||
scrollDirection: Axis.horizontal,
|
child: SizedBox(
|
||||||
itemCount: forecast!.length,
|
height: 110,
|
||||||
separatorBuilder: (_, i) => const SizedBox(width: 12),
|
child: ListView.separated(
|
||||||
itemBuilder: (context, index) {
|
scrollDirection: Axis.horizontal,
|
||||||
return _ForecastDayCard(day: forecast![index]);
|
itemCount: forecast!.length,
|
||||||
},
|
separatorBuilder: (_, i) => const SizedBox(width: 12),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return _ForecastDayCard(day: forecast![index]);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -122,6 +122,8 @@ class _SunPositionWidgetState extends State<SunPositionWidget> {
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
// Arc with integrated horizon labels
|
// Arc with integrated horizon labels
|
||||||
|
// At night: sunset on left (night start), sunrise on right (night end)
|
||||||
|
// During day: sunrise on left (day start), sunset on right (day end)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 170,
|
height: 170,
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
@@ -138,15 +140,15 @@ class _SunPositionWidgetState extends State<SunPositionWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Sunrise widget at left horizon (10px up for balance)
|
// Left horizon: Sunrise during day, Sunset at night
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
bottom: 10,
|
bottom: 10,
|
||||||
child: _HorizonTimeDisplay(
|
child: _HorizonTimeDisplay(
|
||||||
icon: Icons.wb_twilight,
|
icon: _isDaytime ? Icons.wb_twilight : Icons.nights_stay,
|
||||||
label: 'Sunrise',
|
label: _isDaytime ? 'Sunrise' : 'Sunset',
|
||||||
time: _sunrise,
|
time: _isDaytime ? _sunrise : _sunset,
|
||||||
iconColor: Colors.orange,
|
iconColor: _isDaytime ? Colors.orange : Colors.deepOrange,
|
||||||
alignment: CrossAxisAlignment.start,
|
alignment: CrossAxisAlignment.start,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -159,15 +161,15 @@ class _SunPositionWidgetState extends State<SunPositionWidget> {
|
|||||||
child: _DaylightDisplay(minutes: _daylightMinutes),
|
child: _DaylightDisplay(minutes: _daylightMinutes),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Sunset widget at right horizon (10px up for balance)
|
// Right horizon: Sunset during day, Sunrise at night
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 10,
|
bottom: 10,
|
||||||
child: _HorizonTimeDisplay(
|
child: _HorizonTimeDisplay(
|
||||||
icon: Icons.nights_stay,
|
icon: _isDaytime ? Icons.nights_stay : Icons.wb_twilight,
|
||||||
label: 'Sunset',
|
label: _isDaytime ? 'Sunset' : 'Sunrise',
|
||||||
time: _sunset,
|
time: _isDaytime ? _sunset : _sunrise,
|
||||||
iconColor: Colors.deepOrange,
|
iconColor: _isDaytime ? Colors.deepOrange : Colors.orange,
|
||||||
alignment: CrossAxisAlignment.end,
|
alignment: CrossAxisAlignment.end,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class WeatherWidget extends StatelessWidget {
|
|||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
weather.location,
|
'Weather',
|
||||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||||
color: colorScheme.onSurfaceVariant,
|
color: colorScheme.onSurfaceVariant,
|
||||||
),
|
),
|
||||||
@@ -69,89 +69,119 @@ class WeatherWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
// Main weather display (matching AQI layout)
|
// Content area with minimum height to match other widgets
|
||||||
Row(
|
ConstrainedBox(
|
||||||
children: [
|
constraints: const BoxConstraints(minHeight: 170),
|
||||||
// Weather icon in box (like AQI number box)
|
child: Column(
|
||||||
Container(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
width: 64,
|
mainAxisSize: MainAxisSize.min,
|
||||||
height: 64,
|
children: [
|
||||||
decoration: BoxDecoration(
|
const SizedBox(height: 8),
|
||||||
color: (weather.iconColor ?? colorScheme.primary)
|
// Main weather display (matching AQI layout)
|
||||||
.withValues(alpha: 0.15),
|
Row(
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
border: Border.all(
|
|
||||||
color: (weather.iconColor ?? colorScheme.primary)
|
|
||||||
.withValues(alpha: 0.3),
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Icon(
|
|
||||||
weather.icon,
|
|
||||||
size: 32,
|
|
||||||
color: weather.iconColor ?? colorScheme.primary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 16),
|
|
||||||
|
|
||||||
// Temperature and condition
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
// Weather icon in box (like AQI number box)
|
||||||
'${weather.temperature.round()}°${weather.unit.symbol}',
|
Container(
|
||||||
style:
|
width: 64,
|
||||||
Theme.of(context).textTheme.titleMedium?.copyWith(
|
height: 64,
|
||||||
fontWeight: FontWeight.w600,
|
decoration: BoxDecoration(
|
||||||
),
|
color: (weather.iconColor ?? colorScheme.primary)
|
||||||
|
.withValues(alpha: 0.15),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(
|
||||||
|
color: (weather.iconColor ?? colorScheme.primary)
|
||||||
|
.withValues(alpha: 0.3),
|
||||||
|
width: 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Icon(
|
||||||
|
weather.icon,
|
||||||
|
size: 32,
|
||||||
|
color: weather.iconColor ?? colorScheme.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(width: 16),
|
||||||
Text(
|
|
||||||
weather.condition,
|
// Temperature and condition
|
||||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
Expanded(
|
||||||
color: colorScheme.onSurfaceVariant,
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'${weather.temperature.round()}°${weather.unit.symbol}',
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.titleMedium
|
||||||
|
?.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
maxLines: 2,
|
const SizedBox(height: 4),
|
||||||
overflow: TextOverflow.ellipsis,
|
Text(
|
||||||
|
weather.condition,
|
||||||
|
style:
|
||||||
|
Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||||
|
color: colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
if (weather.location.isNotEmpty) ...[
|
||||||
|
const SizedBox(height: 2),
|
||||||
|
Text(
|
||||||
|
weather.location,
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelSmall
|
||||||
|
?.copyWith(
|
||||||
|
color: colorScheme.outline,
|
||||||
|
),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
// Details
|
// Details
|
||||||
if (weather.humidity != null || weather.windSpeed != null) ...[
|
if (weather.humidity != null || weather.windSpeed != null) ...[
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
const Divider(height: 1),
|
const Divider(height: 1),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
Wrap(
|
Wrap(
|
||||||
spacing: 16,
|
spacing: 16,
|
||||||
runSpacing: 8,
|
runSpacing: 8,
|
||||||
children: [
|
children: [
|
||||||
if (weather.humidity != null)
|
if (weather.humidity != null)
|
||||||
_DetailChip(
|
_DetailChip(
|
||||||
label: 'Humidity',
|
label: 'Humidity',
|
||||||
value: '${weather.humidity}%',
|
value: '${weather.humidity}%',
|
||||||
),
|
),
|
||||||
if (weather.windSpeed != null)
|
if (weather.windSpeed != null)
|
||||||
_DetailChip(
|
_DetailChip(
|
||||||
label: 'Wind',
|
label: 'Wind',
|
||||||
value: '${weather.windSpeed!.round()} ${weather.windUnit}',
|
value:
|
||||||
),
|
'${weather.windSpeed!.round()} ${weather.windUnit}',
|
||||||
if (weather.feelsLike != null)
|
),
|
||||||
_DetailChip(
|
if (weather.feelsLike != null)
|
||||||
label: 'Feels',
|
_DetailChip(
|
||||||
value: '${weather.feelsLike!.round()}°${weather.unit.symbol}',
|
label: 'Feels',
|
||||||
|
value:
|
||||||
|
'${weather.feelsLike!.round()}°${weather.unit.symbol}',
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.5.6+1
|
version: 1.5.7+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.10.4
|
sdk: ^3.10.4
|
||||||
|
|||||||
Reference in New Issue
Block a user