Skip to content

Optimised overlay render logic - #30

Merged
hellohejinyu merged 1 commit into
minaxorg:masterfrom
mohsinraza-fdev:refactor/overlay-render-logic
Oct 24, 2024
Merged

hellohejinyu merged 1 commit into
minaxorg:masterfrom
mohsinraza-fdev:refactor/overlay-render-logic

Conversation

@mohsinraza-fdev

@mohsinraza-fdev mohsinraza-fdev commented Oct 23, 2024 •

Copy link
Copy Markdown

Currently the IntroStepBuilder renders overlay on the left side even when there is more space on the right, because the getOverlayPosition function inside _StepWidgetBuilder verifies if there is more space on the sides compared to top and bottom spaces but it doesn't exactly calculate which side has more space.

Before:

Screen.Recording.2024-10-23.at.1.36.07.PM.mov

After:

Screen.Recording.2024-10-23.at.1.40.42.PM.mov

to reproduce the issue add padding to the right above centre widget here in the example

class GroupUsage extends StatelessWidget {
const GroupUsage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Center(
child: Column(

Like this:

      appBar: AppBar(),
      body: Padding(
        padding: const EdgeInsets.only(right: 100),
        child: Center(
          child: Column(

@hellohejinyu
hellohejinyu merged commit 94bfa17 into minaxorg:master Oct 24, 2024
@hellohejinyu

Copy link
Copy Markdown
Member

Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants