chore: fix lints.

Signed-off-by: Sahil Kumar <xdsahil@gmail.com>
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,
child: Builder(
builder: (context) {
if (attachment.type == 'image' ||
attachment.type == 'giphy') {
final imageUrl = attachment.imageUrl ??
attachment.assetUrl ??
attachment.thumbUrl;
if (attachment.type == AttachmentType.image ||
attachment.type == AttachmentType.giphy) {
return PhotoView.customChild(
maxScale: PhotoViewComputedScale.covered,
minScale: PhotoViewComputedScale.contained,
@@ -306,7 +302,7 @@ class _FullScreenMediaState extends State<StreamFullScreenMedia> {
height: double.infinity,
),
);
} else if (attachment.type == 'video') {
} else if (attachment.type == AttachmentType.video) {
final controller = videoPackages[attachment.id]!;
if (!controller.initialized) {
return const Center(
@@ -317,12 +317,8 @@ class _FullScreenMediaDesktopState extends State<FullScreenMediaDesktop> {
: Colors.black,
child: Builder(
builder: (context) {
if (attachment.type == 'image' ||
attachment.type == 'giphy') {
final imageUrl = attachment.imageUrl ??
attachment.assetUrl ??
attachment.thumbUrl;
if (attachment.type == AttachmentType.image ||
attachment.type == AttachmentType.giphy) {
return PhotoView.customChild(
maxScale: PhotoViewComputedScale.covered,
minScale: PhotoViewComputedScale.contained,
@@ -335,7 +331,7 @@ class _FullScreenMediaDesktopState extends State<FullScreenMediaDesktop> {
height: double.infinity,
),
);
} else if (attachment.type == 'video') {
} else if (attachment.type == AttachmentType.video) {
final package = videoPackages[attachment.id]!;
package.player.open(
Playlist(