mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
SP-1658-the-analytics-chart-padding-is-not-aligned-with-the-design.
This commit is contained in:
@ -23,7 +23,6 @@ class EnergyConsumptionPerDeviceChartBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
padding: const EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 20,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
AnalyticsErrorWidget(state.errorMessage),
|
AnalyticsErrorWidget(state.errorMessage),
|
||||||
@ -52,7 +51,9 @@ class EnergyConsumptionPerDeviceChartBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
const Divider(height: 0),
|
const Divider(height: 0),
|
||||||
|
const SizedBox(height: 20),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: EnergyConsumptionPerDeviceChart(chartData: state.chartData),
|
child: EnergyConsumptionPerDeviceChart(chartData: state.chartData),
|
||||||
),
|
),
|
||||||
|
@ -19,7 +19,6 @@ class TotalEnergyConsumptionChartBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
padding: const EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 20,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
AnalyticsErrorWidget(state.errorMessage),
|
AnalyticsErrorWidget(state.errorMessage),
|
||||||
@ -39,7 +38,9 @@ class TotalEnergyConsumptionChartBox extends StatelessWidget {
|
|||||||
const Spacer(flex: 4),
|
const Spacer(flex: 4),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
TotalEnergyConsumptionChart(chartData: state.chartData),
|
TotalEnergyConsumptionChart(chartData: state.chartData),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -22,7 +22,6 @@ class OccupancyChartBox extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
decoration: containerWhiteDecoration,
|
decoration: containerWhiteDecoration,
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 20,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -65,7 +64,9 @@ class OccupancyChartBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Divider(height: 0),
|
const SizedBox(height: 20),
|
||||||
|
const Divider(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
Expanded(child: OccupancyChart(chartData: state.chartData)),
|
Expanded(child: OccupancyChart(chartData: state.chartData)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -22,7 +22,6 @@ class OccupancyHeatMapBox extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
decoration: containerWhiteDecoration,
|
decoration: containerWhiteDecoration,
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 20,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -66,7 +65,9 @@ class OccupancyHeatMapBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Divider(height: 0),
|
const SizedBox(height: 20),
|
||||||
|
const Divider(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: OccupancyHeatMap(
|
child: OccupancyHeatMap(
|
||||||
heatMapData: state.heatMapData.asMap().map(
|
heatMapData: state.heatMapData.asMap().map(
|
||||||
|
@ -11,14 +11,17 @@ class AnalyticsErrorWidget extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Visibility(
|
return Visibility(
|
||||||
visible: errorMessage != null || (errorMessage?.isNotEmpty ?? false),
|
visible: errorMessage != null || (errorMessage?.isNotEmpty ?? false),
|
||||||
child: Text(
|
child: Padding(
|
||||||
errorMessage ?? 'Something went wrong',
|
padding: const EdgeInsetsDirectional.only(bottom: 10),
|
||||||
maxLines: 1,
|
child: Text(
|
||||||
overflow: TextOverflow.ellipsis,
|
errorMessage ?? 'Something went wrong',
|
||||||
style: context.textTheme.bodySmall?.copyWith(
|
maxLines: 1,
|
||||||
color: ColorsManager.red,
|
overflow: TextOverflow.ellipsis,
|
||||||
fontWeight: FontWeight.w400,
|
style: context.textTheme.bodySmall?.copyWith(
|
||||||
fontSize: 8,
|
color: ColorsManager.red,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 8,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user