【发布时间】:2021-10-27 10:54:04
【问题描述】:
我目前正在使用 SyncFusion Flutter Radial Gauge。我已经分配了 GaugeTitle,它出现在屏幕的顶部。我想知道如何将它向下移动,以便它可以出现在仪表的正上方。这是我的代码:
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
// TODO: implement build
return SafeArea(
child: Scaffold(
appBar: AppBar(
backgroundColor: Colors.green,
title: Text(
'Speedometer',
style: Theme.of(context).textTheme.headline6,
),
),
body: Center(
child: SfRadialGauge(
title: GaugeTitle(
text: 'Speed Level', alignment: GaugeAlignment.center),
enableLoadingAnimation: true,
axes: <RadialAxis>[
RadialAxis(
pointers: <GaugePointer>[
NeedlePointer(value: 90, enableAnimation: true),
],
annotations: <GaugeAnnotation>[
GaugeAnnotation(
widget: Text(
'90.0',
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold),
),
positionFactor: 0.5,
angle: 90),
],
),
]),
),
),
);
}
}
【问题讨论】:
标签: flutter dart syncfusion