image captions now work with new api
This commit is contained in:
parent
71a5bda8c9
commit
9d4ec78b23
|
|
@ -193,16 +193,11 @@ 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(
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
@ -231,6 +226,16 @@ class _DidvanPageViewState extends State<DidvanPageView> {
|
||||||
imageUrl: content.image!,
|
imageUrl: content.image!,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
if (content.caption != null)
|
||||||
|
Center(
|
||||||
|
child: DidvanText(
|
||||||
|
content.caption,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: Theme.of(context).textTheme.caption,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue