-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation request for Stepper Class #11789
Comments
It looks like we have some minimal docs: But no example or sample: It's possible @nisrulz already has one: https://github.com/nisrulz/flutter-examples |
@chrislondon If you have specific questions you'd like answered which the docs don't currently answer please list them explicitly here, then when we add docs we'll make sure to explicit answer the specific questions you list here (along with anything else we can think of). It's often really hard to write good docs without a prompt. :-) |
I'll probably post more comments as I go. Here were the first snags I ran into:
I did get this working but I was trying things like: onStepContinue: () {
setState(() {
_currentStep++;
});
} But _currentStep is final so I ended up having to do: Stepper _stepper;
Stepper buildStepper(int step) {
_stepper = new Stepper(
currentStep: step,
...
onStepContinue: () {
setState(() {
buildStepper(step + 1);
});
};
return _stepper;
}
Widget build(BuildContext context) {
return buildStepper(0);
} |
@eseidelGoogle I actually didn't have the example for Stepper. But it was easy to implement, I saw this and update my flutter-examples repo @chrislondon this example should help you out with managing the state of the Stepper Widget, have a look at code here https://github.com/nisrulz/flutter-examples/blob/master/using_stepper/lib/main.dart
|
There are many Steppers defined in https://material.io/guidelines/components/steppers.html, we could specifically document which Stepper(s) is implemented by https://docs.flutter.io/flutter/material/Stepper-class.html I'd also love a screenshot for https://docs.flutter.io/flutter/material/Stepper-class.html to help me understand what kind of stepper this is. For example, do we show dots? Progress bar? |
Thanks! Would you be willing to send a PR to update and clarify the API docs for https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/stepper.dart#L128 ? |
@chrislondon apologies, but would you be willing to comment on #12500 or open a new issue specifically for "stepper with progress bar" ? This issue is about updating the API docs in Stepper to better clarify what kinds of steppers we currently implement. Sorry for the confusion here... we thank you for your feedback! |
@sethladd I could do that sometime towards the EOD. Can't promise though 😅 |
Today or tomorrow.. either works :) Thanks!! |
@sethladd Just wanted to clarify, the only update I need to be sending as a PR has to be dartdoc comment mentioning the kinds of steppers flutter currently implements, at the line you earlier linked? Since there isn't any example for Stepper, should I add that too here? or just add a link to my repository in the readme (that way I wouldn't be changing anything in flutter repo except the readme.md and examples repo would be decoupled from flutter project, just a suggestion). Let me know what you think. Thank you |
@nisrulz at a minimum, please update the API docs for the Stepper class to be specific about which kinds of steppers one can use. A bonus would be a small snippet of code in the API docs for the Stepper class, which shows how to use Stepper class for the various configurations/types. All this would be in a single PR. Other PRs can add examples and links, perhaps to our Sample catalog. Thank you! |
@nisrulz I got a clue about how to implement stepper, thanks to your example. However, I tried putting a TextField widget in the content of a step. The problem I am facing is that if I enter some text in the widget, and traverse to the next step, the text entered in the TextField at the previous Step is gone. This happens with StepperType.horizontal and not vertical. Can you help me out here. I have opened a separate issue #19835 . It would be great if we can figure this out soon. |
@Shantanu-Kotambkar do you have example code for how you implemented horizontal mode for stepper? Thanks! |
Looks like Stepper Class documentation exist now https://api.flutter.dev/flutter/material/Stepper-class.html There are definitely improvements needed in the doc but it does exist so i am closing this issue and for improvements, please created new issue |
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 |
At the moment I'm blindly making a stepper and experimenting with the settings. Documentation would greatly speed up my efforts.
The text was updated successfully, but these errors were encountered: