Implementation
void showImage(BuildContext context) {
showDialog(
barrierDismissible: true,
context: context,
builder: (context) => Dialog(
backgroundColor: Colors.transparent,
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Stack(alignment: Alignment.centerLeft, children: [
FadeInImage.memoryNetwork(
fadeInDuration: const Duration(milliseconds: 400),
fadeInCurve: Curves.easeInOut,
fit: BoxFit.cover,
placeholder: kTransparentImage,
image: statement.statementPictureURL != null
? statement.statementPictureURL!.replaceAll(
"https%3A%2F%2Fparsefiles.back4app.com%2FFeP6gb7k9R2K9OztjKWA1DgYhubqhW0yJMyrHbxH%2F",
"")
: "https://quellenreiter.app/assets/logo-pink.png",
),
// Display [statement.samplePictureCopyright]
RotatedBox(
quarterTurns: 1,
child: Container(
padding: const EdgeInsets.all(2),
color: const Color.fromARGB(61, 0, 0, 0),
child: SelectableText(
statement.samplePictureCopyright.trim(),
style: Theme.of(context).textTheme.bodyText1,
),
),
),
Positioned(
top: 5,
right: 5,
child: IconButton(
icon: const Icon(Icons.close),
iconSize: 50,
onPressed: () => Navigator.of(context).pop(context),
),
),
]),
),
),
);
}