Skip to content

Commit

Permalink
improve: use play_video_mixin for sending video
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockvn authored and hoangdat committed Sep 28, 2023
1 parent 33269f7 commit c60a770
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/pages/chat/events/sending_video_widget.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'package:fluffychat/pages/chat/events/message_content_style.dart';
import 'package:fluffychat/presentation/mixins/play_video_action_mixin.dart';
import 'package:fluffychat/presentation/model/file/display_image_info.dart';
import 'package:fluffychat/widgets/video_viewer_dialog.dart';
import 'package:flutter/material.dart';
import 'package:flutter_blurhash/flutter_blurhash.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'package:matrix/matrix.dart';

class SendingVideoWidget extends StatelessWidget {
class SendingVideoWidget extends StatelessWidget with PlayVideoActionMixin {
final Event event;

final MatrixVideoFile matrixFile;
Expand Down Expand Up @@ -89,14 +89,7 @@ class SendingVideoWidget extends StatelessWidget {
if (matrixFile.filePath == null) {
return;
}
await showDialog(
context: context,
useRootNavigator: false,
useSafeArea: false,
builder: (context) {
return VideoViewerDialog(path: matrixFile.filePath!);
},
);
playVideoAction(context, matrixFile.filePath!);
}

void _checkSendingFileStatus() {
Expand Down

0 comments on commit c60a770

Please sign in to comment.