Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 🍻