speedometer_chart 1.0.8 copy "speedometer_chart: ^1.0.8" to clipboard
speedometer_chart: ^1.0.8 copied to clipboard

A library of velocity gauge charts for Flutter, fully customizable.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:speedometer_chart/speedometer_chart.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    double value = 30;

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Wrap(
            crossAxisAlignment: WrapCrossAlignment.center,
            spacing: 100,
            runSpacing: 50,
            children: [
              SpeedometerChart(
                value: value,
                graphColor: const [Colors.blueAccent, Colors.lightBlueAccent],
              ),
              SpeedometerChart.tick(
                value: value,
              ),
              SpeedometerChart.tick(
                value: value,
                valueWidget: Text(value.toString()),
                hasTickSpace: true,
                hasIconPointer: false,
              ),
              SpeedometerChart(
                value: value,
                valueWidget: Text(value.toString()),
                hasIconPointer: false,
                pointerColor: Colors.tealAccent,
                graphColor: const [Colors.deepPurple, Colors.orange],
                minWidget: const Text("Min value: 0"),
                maxWidget: const Text("Max value: 100"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
19
likes
150
points
635
downloads

Publisher

unverified uploader

Weekly Downloads

A library of velocity gauge charts for Flutter, fully customizable.

Repository (GitLab)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_svg, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on speedometer_chart