Skip to content

[Stepper]Circle size and connecting lines between icons are not customizable #103124

Closed

Description

@aakashawalkar

I want to customize the size of stepper icon and connecting lines between them but I am unable to achieve it.

Expected results:

Capture1

Actual results:

Screenshot 2022-05-05 at 5 30 47 PM

Details

[✓] Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-x64, locale
en-IN)
• Flutter version 2.10.5 at /Volumes/data/development/sdks/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5464c5b (2 weeks ago), 2022-04-18 09:55:37 -0700
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version
32.0.0-rc1)
• Android SDK at /Users/akashav/Library/Android/sdk
• Platform android-32, build-tools 32.0.0-rc1
• ANDROID_HOME = /Users/akashav/Library/Android/sdk
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.10.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.66.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.40.0

[✓] Connected device (4 available)
• iPhone SE (2nd generation) (mobile) • 91FF2EA7-7194-4CC1-9456-B3C27165748D
• ios • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
• iPhone 13 (mobile) • 4141610B-4FA4-4F02-828E-E5DFB375989B
• ios • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
• macOS (desktop) • macos
• darwin-x64 • macOS 12.3.1 21E258 darwin-x64
• Chrome (web) • chrome
• web-javascript • Google Chrome 100.0.4896.127

[✓] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

Activity

  1. maheshj01 commented on May 5, 2022

    @maheshj01
    Member

    Hi @aakashawalkar, Have you tried wrapping the Stepper in a theme and changing primary Color and iconsize? Also regarding the connecting lines is it about the spacing?

    import 'package:flutter/material.dart';
    
    void main() => runApp(const MyApp());
    
    class MyApp extends StatelessWidget {
      const MyApp({Key? key}) : super(key: key);
    
      static const String _title = 'Flutter Code Sample';
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: _title,
          home: Scaffold(
            appBar: AppBar(title: const Text(_title)),
            body: const Center(
              child: MyStatefulWidget(),
            ),
          ),
        );
      }
    }
    
    class MyStatefulWidget extends StatefulWidget {
      const MyStatefulWidget({Key? key}) : super(key: key);
    
      @override
      State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
    }
    
    class _MyStatefulWidgetState extends State<MyStatefulWidget> {
      int _index = 0;
    
      @override
      Widget build(BuildContext context) {
        return Theme(
          data: Theme.of(context).copyWith(
              colorScheme:
                  Theme.of(context).colorScheme.copyWith(primary: Colors.green),
              iconTheme: Theme.of(context).iconTheme.copyWith(size: 32.0)),
          child: Stepper(
            currentStep: _index,
            onStepCancel: () {
              if (_index > 0) {
                setState(() {
                  _index -= 1;
                });
              }
            },
            onStepContinue: () {
              if (_index <= 0) {
                setState(() {
                  _index += 1;
                });
              }
            },
            onStepTapped: (int index) {
              setState(() {
                _index = index;
              });
            },
            steps: <Step>[
              Step(
                isActive: true,
                title: const Text('Step 1 title'),
                content: Container(
                    alignment: Alignment.centerLeft,
                    child: const Text('Content for Step 1')),
              ),
              const Step(
                title: Text('Step 2 title'),
                content: Text('Content for Step 2'),
              ),
            ],
          ),
        );
      }
    }
    
  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 5, 2022
  3. aakashawalkar commented on May 5, 2022

    @aakashawalkar
    Author

    Hi @maheshmnj - Yes, I tried changing size of icon by wrapping Stepper widget into Theme() but it didn't changed size of stepper icon.

    Actually, I went to look the code inside the package (source code) and I noticed that the icon size is hardcoded to 24.0 and for connecting lines there is predefined margin from start of 12.0 which is also hardcoded for horizontal stepper type.

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 5, 2022
  5. maheshj01 commented on May 6, 2022

    @maheshj01
    Member

    Thanks for the confirmation @aakashawalkar, I can reproduce the issue the circle size and the lines are not customizable, Labeling this issue as a new feature request.

  6. added
    c: new featureNothing broken; request for a new capability
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on May 6, 2022
  7. changed the title [-]Stepper Widget : Stepper icon size and connecting lines between icons are not customizable[/-] [+][Stepper]Circle size and connecting lines between icons are not customizable[/+] on May 6, 2022
  8. AyushBherwani1998 commented on Mar 31, 2023

    @AyushBherwani1998
    Member

    @HansMuller would it make sense to provide a way to override the kStepSize to allow customization of Circle size and a param to override the default size of line? Happy to raise a PR, if it sounds good.

  9. AhmadFalahian commented on Apr 18, 2023

    @AhmadFalahian

    Has this feature not been added yet?

  10. fuadreza commented on Jun 24, 2023

    @fuadreza

    It's not available yet.. 🥲

  11. 4 remaining items

  12. dheerajv099 commented on Sep 11, 2023

    @dheerajv099

    @AyushBherwani1998 have you raised pull request??

  13. AyushBherwani1998 commented on Sep 11, 2023

    @AyushBherwani1998
    Member

    Ah, it skipped from my head. I'll raise it by tomorrow, adding it in my TODOs.

  14. vytautas-pranskunas- commented on Sep 21, 2023

    @vytautas-pranskunas-

    cannot imagine this issue still not resolved. On tabs this looks crazy...
    Screenshot 2023-09-21 at 23 09 03

  15. lidissonhugo commented on Oct 4, 2023

    @lidissonhugo

    Tem previsão de quando vão implementar o kStepSize personalizável e o tamanho da barra dos steps personalizável também?

  16. added
    P2Important issues not at the top of the work list
    on Jan 10, 2024
  17. Mairramer commented on Oct 24, 2024

    @Mairramer
    Contributor

    @aakashawalkar Did this PR solve your problem?

  18. Mairramer commented on Nov 1, 2024

    @Mairramer
    Contributor

    Fixed by #140825

  19. tirth-patel-nc commented on May 30, 2025

    @tirth-patel-nc
    Member

    I can confirm that issue has been fixed by #140825. Requested customisation is possible using these props: stepIconHeight, stepIconWidth, stepIconMargin. Closing as Fixed!

  20. github-actions commented on Jun 13, 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.p: 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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions