Skip to content

nDenerserve/gauge_indicator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Radial gauge

Animated, highly customizable, open-source Flutter gauge indicator widget.


Progress bar and shader support Multiple segments style Gradient support
AnimatedRadialgauge AnimatedRadialgauge AnimatedRadialgauge

Usage

It is as simple as defining a RadialGauge or an AnimatedRadialGauge widget in your widget tree.

Code

/// Build method of your widget.
@override
Widget build(BuildContext context) {
  // Create animated radial gauge.
  // All arguments changes will be automatically animated.
  return AnimatedRadialGauge(
  /// The animation duration.
  duration: const Duration(seconds: 1),
  curve: Curves.elasticOut,

  /// Gauge value.
  value: value,

  progressBar: const GaugeRoundedProgressBar(
    color: Color(0xFFB4C2F8),
  ),

  /// Optionally, you can configure your gauge, providing additional
  /// styles and transformers.
  axis: GaugeAxis(
    /// Provide the [min] and [max] value for the [value] argument.
    min: 0,
    max: 100,
    /// Render the gauge as a 180-degree arc.
    degrees: 180,

    /// Set the background color and axis thickness.
    style: const GaugeAxisStyle(
      thickness: 20,
      background: Color(0xFFDFE2EC),
    ),

    /// Define the pointer that will indicate the progress.
    pointer: GaugePointer.needle(
      size: Size(16, 100),
      borderRadius: 16,
      backgroundColor: Color(0xFF193663),
    ),
    /// You can also, define the child builder.
    /// You will build a value label in the following way, but you can use the widget of your choice.
    ///
    /// For non-value related widgets, take a look at the [child] parameter.
    /// ```
    /// builder: (context, child, value) => RadialGaugeLabel(
    ///  value: value,
    ///  style: const TextStyle(
    ///    color: Colors.black,
    ///    fontSize: 46,
    ///    fontWeight: FontWeight.bold,
    ///  ),
    /// ),
    /// ```
  );
}

Output

example

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 94.9%
  • HTML 4.9%
  • Kotlin 0.2%