kdgaugeview 1.0.2
kdgaugeview: ^1.0.2

Flutter Android iOS web

KDGaugeView is a simple and customizable gauge control for Flutter

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'KdGaugeView Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Container(
              width: 400,
              height: 400,
              padding: EdgeInsets.all(10),
              child: KdGaugeView(
                minSpeed: 0,
                maxSpeed: 180,
                speed: 120,
                animate: true,
                alertSpeedArray: [40, 80, 100],
                alertColorArray: [Colors.orange, Colors.indigo, Colors.red],
                duration: Duration(seconds: 6),
              ),
            )
          ],
        ),
      ),
    );
  }
}
9
likes
100
pub points
57%
popularity

Publisher

unicodelabs.in

KDGaugeView is a simple and customizable gauge control for Flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD (LICENSE)

Dependencies

flutter

More

Packages that depend on kdgaugeview