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,31 +140,45 @@ 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,
widthFactor: 0.4, child: FractionallySizedBox(
heightFactor: 0.95, widthFactor: 0.4,
alignment: Alignment.bottomCenter, child: FittedBox(
child: FittedBox( fit: BoxFit.contain,
fit: BoxFit.fitWidth, alignment: Alignment.bottomCenter,
alignment: Alignment.bottomCenter, child: SimpleEntityState(
child: SimpleEntityState( padding: EdgeInsets.all(0),
padding: EdgeInsets.all(0), expanded: false,
expanded: false, maxLines: 1,
maxLines: 1, 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
),
)
),
],
)
], ],
) )
), ),