chore: fix lints.

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2023-08-18 19:50:05 +05:30
parent 115dced88e
commit 9f4c31c1bd
2 changed files with 6 additions and 14 deletions
@@ -288,12 +288,8 @@ class _FullScreenMediaState extends State<StreamFullScreenMedia> {
: Colors.black, : Colors.black,
child: Builder( child: Builder(
builder: (context) { builder: (context) {
if (attachment.type == 'image' || if (attachment.type == AttachmentType.image ||
attachment.type == 'giphy') { attachment.type == AttachmentType.giphy) {
final imageUrl = attachment.imageUrl ??
attachment.assetUrl ??
attachment.thumbUrl;
return PhotoView.customChild( return PhotoView.customChild(
maxScale: PhotoViewComputedScale.covered, maxScale: PhotoViewComputedScale.covered,
minScale: PhotoViewComputedScale.contained, minScale: PhotoViewComputedScale.contained,
@@ -306,7 +302,7 @@ class _FullScreenMediaState extends State<StreamFullScreenMedia> {
height: double.infinity, height: double.infinity,
), ),
); );
} else if (attachment.type == 'video') { } else if (attachment.type == AttachmentType.video) {
final controller = videoPackages[attachment.id]!; final controller = videoPackages[attachment.id]!;
if (!controller.initialized) { if (!controller.initialized) {
return const Center( return const Center(
@@ -317,12 +317,8 @@ class _FullScreenMediaDesktopState extends State<FullScreenMediaDesktop> {
: Colors.black, : Colors.black,
child: Builder( child: Builder(
builder: (context) { builder: (context) {
if (attachment.type == 'image' || if (attachment.type == AttachmentType.image ||
attachment.type == 'giphy') { attachment.type == AttachmentType.giphy) {
final imageUrl = attachment.imageUrl ??
attachment.assetUrl ??
attachment.thumbUrl;
return PhotoView.customChild( return PhotoView.customChild(
maxScale: PhotoViewComputedScale.covered, maxScale: PhotoViewComputedScale.covered,
minScale: PhotoViewComputedScale.contained, minScale: PhotoViewComputedScale.contained,
@@ -335,7 +331,7 @@ class _FullScreenMediaDesktopState extends State<FullScreenMediaDesktop> {
height: double.infinity, height: double.infinity,
), ),
); );
} else if (attachment.type == 'video') { } else if (attachment.type == AttachmentType.video) {
final package = videoPackages[attachment.id]!; final package = videoPackages[attachment.id]!;
package.player.open( package.player.open(
Playlist( Playlist(