Skip to content

LinearProgressIndicator track gap remains when value is 0 and year2023 is false #173153

Description

@bggRGjQaUbCoE

Steps to reproduce

run the code sample

Expected results

NO track gap

Actual results

track gap remains

Code sample

Code sample
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  Widget _indicator(double value) {
    return Column(
      spacing: 2,
      mainAxisSize: MainAxisSize.min,
      children: [
        Text(
          'value: $value',
          style: const TextStyle(fontSize: 16),
        ),
        LinearProgressIndicator(
          value: value,
          year2023: false,
        ),
      ],
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: SizedBox(
          width: 255,
          child: Column(
            spacing: 10,
            mainAxisSize: MainAxisSize.min,
            children: [
              _indicator(0.5),
              _indicator(0.0),
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Image

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Activity

  1. tirth-patel-nc commented on Aug 4, 2025

    @tirth-patel-nc
    Member

    hi @bggRGjQaUbCoE, thanks for the report.

    Thanks for the report. Seeing the same behaviour with latest SDK versions.

    stable : 3.32.8
    master : 3.33.0-1.0.pre-1255
    

    #173096 is a similar issue but slightly different, that one affects values near 1.0, while yours affects value 0 with unintended left padding. recording from the Compose where this issue is not present. Had a chat with Kostia.

    compose_linear_progress_indicator.mov
  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    team-designOwned by Design Languages team
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed
    in triagePresently being triaged by the triage team
    on Aug 4, 2025
  3. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Aug 6, 2025
  4. moved this from To do to PR submitted in Nevercodeon Aug 22, 2025
  5. moved this from PR submitted to Done (PR merged) in Nevercodeon Sep 3, 2025
  6. added
    r: fixedIssue is closed as already fixed in a newer version
    on Sep 4, 2025
  7. github-actions commented on Sep 18, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listfound in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

  • Status
    Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions