wrap expanded image stack in a safearea to help with notch issues
This commit is contained in:
parent
18657eb980
commit
3349ca7253
1 changed files with 27 additions and 25 deletions
|
|
@ -17,36 +17,38 @@ class ExpandableImage extends ConsumerWidget {
|
||||||
? null
|
? null
|
||||||
: () => showDialog(
|
: () => showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (_) => Stack(
|
builder: (_) => SafeArea(
|
||||||
children: [
|
child: Stack(
|
||||||
Align(
|
children: [
|
||||||
alignment: .topRight,
|
Align(
|
||||||
child: Padding(
|
alignment: .topRight,
|
||||||
padding: .all(32),
|
child: Padding(
|
||||||
child: M3EButton(
|
padding: .all(32),
|
||||||
onPressed: Navigator.of(context).pop,
|
child: M3EButton(
|
||||||
child: Icon(Icons.close),
|
onPressed: Navigator.of(context).pop,
|
||||||
),
|
child: Icon(Icons.close),
|
||||||
),
|
|
||||||
),
|
|
||||||
Center(
|
|
||||||
child: InteractiveViewer(
|
|
||||||
maxScale: 10,
|
|
||||||
child: Image(
|
|
||||||
fit: .contain,
|
|
||||||
errorBuilder: (_, error, stackTrace) => ErrorDialog(
|
|
||||||
"Loading failed for $source\nError: $error",
|
|
||||||
stackTrace,
|
|
||||||
),
|
|
||||||
image: CachedNetworkImage(
|
|
||||||
source!,
|
|
||||||
ref.watch(CrossCacheController.provider),
|
|
||||||
headers: ref.headers,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Center(
|
||||||
],
|
child: InteractiveViewer(
|
||||||
|
maxScale: 10,
|
||||||
|
child: Image(
|
||||||
|
fit: .contain,
|
||||||
|
errorBuilder: (_, error, stackTrace) => ErrorDialog(
|
||||||
|
"Loading failed for $source\nError: $error",
|
||||||
|
stackTrace,
|
||||||
|
),
|
||||||
|
image: CachedNetworkImage(
|
||||||
|
source!,
|
||||||
|
ref.watch(CrossCacheController.provider),
|
||||||
|
headers: ref.headers,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue