v1.0.2
flutter_speedometer
一個簡單的 widget,讓 Flutter 開發者可以輕鬆將速度計整合到他們的應用程式中,並提供可自訂的選項
15喜歡 29近 30 天下載40Pub 分數
平台暫無資料
Flutter 速度表小部件套件
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
Flutter Speedometer widget package
https://raw.githubusercontent.com/ltdangkhoa/Flutter-Speedometer/HEAD/flutter_speedometer_2.png
In order to use this package, do import
import 'package:flutter_speedometer/flutter_speedometer.dart';
Basic implementation can be done like below code:
import 'package:flutter/material.dart';
import 'package:flutter_speedometer/flutter_speedometer.dart';
void main() {
runApp(
Center(
child: Speedometer(
size: 250,
minValue: 0,
maxValue: 180,
currentValue: 76,
warningValue: 150,
displayText: 'mph',
),
),
);
}
You can find more examples from Example App
In this table, you can find all attributes provided by this package:
| Attribute | Default value | Description |
|---|---|---|
| size | 200 | Min value to be displayed |
| minValue | 0 | Min value to be displayed |
| maxValue | 100 | Max value to be displayed |
| currentValue | 0 | Set the current value |
| warningValue | 80 | Set the current value |
class Speedometer {
final double size;
final int minValue;
final int maxValue;
final int currentValue;
final int warningValue;
final Color backgroundColor;
final Color meterColor;
final Color warningColor;
final Color kimColor;
final TextStyle displayNumericStyle;
final String displayText;
final TextStyle displayTextStyle;
}
Feel free to leave any feedback for helping support this package 🍻