image captions now work with new api
This commit is contained in:
parent
71a5bda8c9
commit
9d4ec78b23
|
|
@ -193,44 +193,49 @@ class _DidvanPageViewState extends State<DidvanPageView> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (content.caption != null) {
|
|
||||||
return Center(
|
|
||||||
child: DidvanText(
|
|
||||||
content.caption,
|
|
||||||
style: Theme.of(context).textTheme.caption,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (content.image != null) {
|
if (content.image != null) {
|
||||||
return GestureDetector(
|
return Column(
|
||||||
onTap: () {
|
children: [
|
||||||
showDialog(
|
GestureDetector(
|
||||||
context: context,
|
onTap: () {
|
||||||
builder: (context) => Stack(
|
showDialog(
|
||||||
children: [
|
context: context,
|
||||||
Positioned.fill(
|
builder: (context) => Stack(
|
||||||
child: InteractiveViewer(
|
children: [
|
||||||
child: Center(
|
Positioned.fill(
|
||||||
child: SkeletonImage(
|
child: InteractiveViewer(
|
||||||
width: MediaQuery.of(context).size.width,
|
child: Center(
|
||||||
imageUrl: content.largeImage ?? content.image,
|
child: SkeletonImage(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
imageUrl: content.largeImage ?? content.image,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const Positioned(
|
||||||
|
right: 24,
|
||||||
|
top: 24,
|
||||||
|
child: _BackButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const Positioned(
|
);
|
||||||
right: 24,
|
},
|
||||||
top: 24,
|
child: SkeletonImage(
|
||||||
child: _BackButton(),
|
imageUrl: content.image!,
|
||||||
),
|
width: double.infinity,
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
},
|
if (content.caption != null)
|
||||||
child: SkeletonImage(
|
Center(
|
||||||
imageUrl: content.image!,
|
child: DidvanText(
|
||||||
width: double.infinity,
|
content.caption,
|
||||||
),
|
textAlign: TextAlign.center,
|
||||||
|
style: Theme.of(context).textTheme.caption,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue