flutter_intro icon indicating copy to clipboard operation
flutter_intro copied to clipboard

when the widget is scrollable, the highlight section goes off the screen

Open andydean565 opened this issue 4 years ago • 1 comments

first of all, great plugin.

just having an issue with a form which extents past the current view, the highlighted box is out of view with no option to scroll and just shows the back overlay.

my current fix is having a custom call-back in useAdvancedTheme which will scroll to the key before running 'onNext' but could be a good feature.

current solution

inside Intro instance

onTap: params.currentStepIndex == (params.stepCount - 1)
        ? () => {params.onFinish(), finishCallback()}
         : () async => {
              await nextCallback(params.currentStepIndex + 1),
              params.onNext(),
},

creating the intro instance with a function

intro = createIntro(nextCallback: (index) async {
      print('next callback');
      await Scrollable.ensureVisible(intro.keys[index].currentContext,
          duration: Duration(seconds: 1));
    }, finishCallback: () {
      print('finish callback');
      Scrollable.ensureVisible(context);
});

andydean565 avatar May 14 '21 13:05 andydean565

Having the same issue. I think there should be some way to provide maximum height for highlighted box, e.g. do not go beyond 60% screen height, or calculate the intro text and buttons height and make at least this much space available image

absar avatar Jun 26 '21 01:06 absar