mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Matched aqi charts title's to have the same size no matter what the window size is.
This commit is contained in:
@ -19,7 +19,7 @@ class AqiDistributionChartTitle extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
ChartsLoadingWidget(isLoading: isLoading),
|
ChartsLoadingWidget(isLoading: isLoading),
|
||||||
const Expanded(
|
const Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: FittedBox(
|
child: FittedBox(
|
||||||
fit: BoxFit.scaleDown,
|
fit: BoxFit.scaleDown,
|
||||||
alignment: AlignmentDirectional.centerStart,
|
alignment: AlignmentDirectional.centerStart,
|
||||||
@ -28,23 +28,26 @@ class AqiDistributionChartTitle extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
FittedBox(
|
Expanded(
|
||||||
alignment: AlignmentDirectional.centerEnd,
|
flex: 2,
|
||||||
fit: BoxFit.scaleDown,
|
child: FittedBox(
|
||||||
child: AqiTypeDropdown(
|
alignment: AlignmentDirectional.centerEnd,
|
||||||
onChanged: (value) {
|
fit: BoxFit.scaleDown,
|
||||||
if (value != null) {
|
child: AqiTypeDropdown(
|
||||||
final bloc = context.read<AirQualityDistributionBloc>();
|
onChanged: (value) {
|
||||||
try {
|
if (value != null) {
|
||||||
final param = _makeLoadAqiDistributionParam(context, value);
|
final bloc = context.read<AirQualityDistributionBloc>();
|
||||||
bloc.add(LoadAirQualityDistribution(param));
|
try {
|
||||||
} catch (_) {
|
final param = _makeLoadAqiDistributionParam(context, value);
|
||||||
return;
|
bloc.add(LoadAirQualityDistribution(param));
|
||||||
} finally {
|
} catch (_) {
|
||||||
bloc.add(UpdateAqiTypeEvent(value));
|
return;
|
||||||
|
} finally {
|
||||||
|
bloc.add(UpdateAqiTypeEvent(value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user