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, context: context,
builder: (context) { builder: (context) {
return MihPackageWindow( return MihPackageWindow(
fullscreen: false, fullscreen: true,
windowTitle: "", windowTitle: "",
scrollbarOn: false,
onWindowTapClose: () { onWindowTapClose: () {
context.pop(); context.pop();
}, },
windowBody: InteractiveViewer( windowBody: SizedBox.expand(
child: Image(image: imagePreview!), child: InteractiveViewer(
child: Image(image: imagePreview!),
),
), ),
); );
}); });

View File

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