Skip to content
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

对于一个已经打开的dailog,旋转屏幕后是否可以更改SmartDialog.show的alignment属性 #238

Open
ArturoRen opened this issue Nov 22, 2024 · 2 comments

Comments

@ArturoRen
Copy link

版本信息

  • Flutter版本:[举例:3.19.6]
  • flutter_smart_dialog版本:[举例:v4.9.8+3]

Alignment.bottomCenter的dialog,在屏幕旋转后,我能否可以改为Alignment.leftCenter的方式去关闭它

问题demo

SmartDialog.show(
      builder: (builder) => Container(
 width: 321.w,
 height: 321.h,
 color: Colors.res,),
      tag: MusicDialog.tag,
      alignment: ScreenUtil().orientation == Orientation.portrait? Alignment.bottomCenter:Alignment.leftCenter,,
      backType: SmartBackType.block,
      // clickMaskDismiss: false,
      maskColor: ColorThemeData.black.withOpacity(.6),
    );
@xdd666t
Copy link
Member

xdd666t commented Nov 22, 2024

adjustBuilder可以在尺寸加载完成后重新设置alignment

你这种场景可以在屏幕切换的时候重新调用SmartDialog.show,keekSingle设置为true

@ArturoYi
Copy link

adjustmentBuilder可以在尺寸加载完成后重新设置对齐

你这种场景可以在屏幕切换的时候重新调用SmartDialog.show,keekSingle设置为true

keekSingle设置为true可行,

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

No branches or pull requests

3 participants