flutter_speedometer

Flutter Speedometer widget package.

Getting Started

In order to use this package, do import

import 'package:flutter_speedometer/flutter_speedometer.dart';

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',
      ),
    ),
  );
}

Dart

Example App

You can find more examples from Example App

API

In this table, you can find all attributes provided by this package:

ATTRIBUTEDEFAULT VALUEDESCRIPTIONsize200Min value to be displayedminValue0Min value to be displayedmaxValue100Max value to be displayedcurrentValue0Set the current valuewarningValue80Set the current value

Objects

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;
}

Get This Source Code on GitHub: