Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ltdangkhoa/flutter-speedometer
Flutter Speedometer widget package
https://github.com/ltdangkhoa/flutter-speedometer
dart flutter flutter-package
Last synced: 6 days ago
JSON representation
Flutter Speedometer widget package
- Host: GitHub
- URL: https://github.com/ltdangkhoa/flutter-speedometer
- Owner: ltdangkhoa
- License: bsd-3-clause
- Created: 2019-07-09T11:51:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T23:56:43.000Z (almost 3 years ago)
- Last Synced: 2023-08-20T22:06:57.446Z (about 1 year ago)
- Topics: dart, flutter, flutter-package
- Language: Dart
- Homepage:
- Size: 505 KB
- Stars: 14
- Watchers: 0
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_speedometer
[Flutter](https://flutter.io) Speedometer widget package
![](flutter_speedometer_2.png)
### Getting Started
In order to use this package, do import
```dart
import 'package:flutter_speedometer/flutter_speedometer.dart';
```Basic implementation can be done like below code:
```dart
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',
),
),
);
}
```### Example App
You can find more examples from [Example App](example)### API
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 |### Objects
```dart
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;
}
```### Feedback
Feel free to [leave any feedback](https://github.com/ltdangkhoa/Flutter-Speedometer/issues) for helping support this package 🍻