Gauge scale fixes

This commit is contained in:
Yegor Vialov 2020-04-28 20:36:11 +00:00
parent d715aaf5e5
commit b029146bf3

View File

@ -108,7 +108,7 @@ class GaugeCard extends StatelessWidget {
child: AspectRatio( child: AspectRatio(
aspectRatio: 1.8, aspectRatio: 1.8,
child: Stack( child: Stack(
alignment: Alignment.topCenter, alignment: Alignment.bottomCenter,
children: <Widget>[ children: <Widget>[
SfRadialGauge( SfRadialGauge(
axes: <RadialAxis>[ axes: <RadialAxis>[
@ -140,22 +140,22 @@ class GaugeCard extends StatelessWidget {
) )
], ],
), ),
FractionallySizedBox( Column(
heightFactor: 0.2, mainAxisSize: MainAxisSize.max,
widthFactor: 1, crossAxisAlignment: CrossAxisAlignment.center,
child: FittedBox( children: <Widget>[
fit: BoxFit.fitHeight, Flexible(
child: EntityName( flex: 8,
textStyle: Theme.of(context).textTheme.subhead fit: FlexFit.tight,
child: Container()
), ),
) Flexible(
), flex: 6,
FractionallySizedBox( fit: FlexFit.tight,
child: FractionallySizedBox(
widthFactor: 0.4, widthFactor: 0.4,
heightFactor: 0.95,
alignment: Alignment.bottomCenter,
child: FittedBox( child: FittedBox(
fit: BoxFit.fitWidth, fit: BoxFit.contain,
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: SimpleEntityState( child: SimpleEntityState(
padding: EdgeInsets.all(0), padding: EdgeInsets.all(0),
@ -164,7 +164,21 @@ class GaugeCard extends StatelessWidget {
textAlign: TextAlign.center textAlign: TextAlign.center
), ),
) )
)
), ),
Flexible(
flex: 3,
fit: FlexFit.tight,
child: FittedBox(
fit: BoxFit.contain,
child: EntityName(
padding: EdgeInsets.all(0),
textStyle: Theme.of(context).textTheme.subhead
),
)
),
],
)
], ],
) )
), ),