make profile picture the full height of the window

This commit is contained in:
2026-02-24 12:43:34 +02:00
parent baea2c9fdb
commit ce2575035f
2 changed files with 15 additions and 4 deletions

View File

@@ -52,13 +52,16 @@ class _MihCircleAvatarState extends State<MihCircleAvatar> {
context: context,
builder: (context) {
return MihPackageWindow(
fullscreen: false,
fullscreen: true,
windowTitle: "",
scrollbarOn: false,
onWindowTapClose: () {
context.pop();
},
windowBody: InteractiveViewer(
child: Image(image: imagePreview!),
windowBody: SizedBox.expand(
child: InteractiveViewer(
child: Image(image: imagePreview!),
),
),
);
});

View File

@@ -15,6 +15,7 @@ class MihPackageWindow extends StatefulWidget {
final Color? foregroundColor;
final bool? borderOn;
final bool fullscreen;
final bool? scrollbarOn;
const MihPackageWindow({
super.key,
required this.fullscreen,
@@ -23,6 +24,7 @@ class MihPackageWindow extends StatefulWidget {
required this.onWindowTapClose,
required this.windowBody,
this.borderOn,
this.scrollbarOn,
this.backgroundColor,
this.foregroundColor,
});
@@ -177,7 +179,13 @@ class _MihPackageWindowState extends State<MihPackageWindow> {
getHeader(),
const SizedBox(height: 5),
Expanded(
child: SingleChildScrollView(child: widget.windowBody)),
child: widget.scrollbarOn != null || !widget.scrollbarOn!
? widget.windowBody
: MihSingleChildScroll(
scrollbarOn: true,
child: widget.windowBody,
),
),
],
)
: Column(