asPreviewWidget method
Implementation
@override
Widget asPreviewWidget() {
if (!kIsWeb) {
return Image.file(
File(
imageFile.path,
),
);
}
return RepaintBoundary(
key: _renderRepaintKey,
child: Stack(
alignment: Alignment.bottomRight,
children: [
Image.network(
imageFile.path,
),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateFormat('dd MMM, yyyy HH:mm').format(dateTime),
textAlign: TextAlign.end,
style: const TextStyle(fontSize: 16, color: Colors.red),
),
Text(
'${locationData.longitude}, ${locationData.latitude}',
textAlign: TextAlign.end,
style: const TextStyle(fontSize: 16, color: Colors.red),
),
],
)
],
),
);
}