goxiaoy / flutter_survey_js

Flutter client library for parsing and display surveyjs.io survey
https://goxiaoy.github.io/flutter_survey_js/
MIT License
16 stars 17 forks source link

Feature/scroll page dots #106

Closed Vpdwivedi closed 1 year ago

Vpdwivedi commented 1 year ago
goxiaoy commented 1 year ago

This PR is unnecessary. You can customize by using SurveyConfiguration and builder

s.SurveyConfiguration(
  titleBuilder: (BuildContext context, s.Elementbase element, Widget child)=>child,
  ...
  child: s.SurveyWidget(
    survey: s.surveyFromJson(survey),
    builder: (context)=>SurveyLayout( stepperBuilder : (BuildContext context, int pageCount, int currentPage)=>YourStepperBuilder),
    onChange: (v) {
      print(v);
    },
    onSubmit: (v) {
      print(v);
    },
  )
)
goxiaoy commented 1 year ago

It's not recommend to use DotStepper when there are too many pages, you may use style like https://pub.dev/packages/flutter_web_pagination