Skip to content
pubscout

primer_progress_bar

0.5.0, released 2 years ago by norelease.dev

A Flutter widget that shows a segmented progress bar with optional legend, following Primer design.

WASM-ready
$ flutter pub add primer_progress_bar
Source repository

What it does

It renders a horizontal bar divided into colored segments based on provided values. A legend below can describe each segment and can be hidden or truncated. The widget is fully customizable via segment definitions and legend style.

AI-written summary of version 0.5.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a multi‑segment progress visualization matching Primer design
  • You want an automatic legend that can be limited or hidden
  • You require simple, declarative configuration without extra code

Skip it when

  • A single‑value linear progress indicator is sufficient
  • You need animated or interactive progress bars
  • You target platforms that require a different design system

Strengths

  • Matches Primer Design System out of the box
  • Built‑in legend with line‑limit and ellipsis support
  • Easy to configure with just a list of Segment objects

Weaknesses

  • Limited to static display, no built‑in animations
  • Only supports the Primer visual style
  • Requires Flutter 3.16+

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
List<Segment> segments=[Segment(value:80,color:Colors.purple,label:Text("Done")),Segment(value:14,color:Colors.deepOrange,label:Text("In progress")),Segment(value:6,color:Colors.green,label:Text("Open"))];
Widget build(BuildContext context){return Scaffold(body:Center(child:Padding(padding:EdgeInsets.all(20),child:PrimerProgressBar(segments:segments))));}

Alternatives

Packages that do the same job and could replace primer_progress_bar.

  • material_ui

    Provides standard Material progress indicators and can be styled to fit custom designs