Skip to content

Commit

Permalink
solved error
Browse files Browse the repository at this point in the history
  • Loading branch information
ge59dil committed Jan 27, 2024
1 parent 9f1e13d commit e6948b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/view_models/download_view_model.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:convert';
import 'package:fixnum/fixnum.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:gocast_mobile/models/download/download_state_model.dart';
import 'package:shared_preferences/shared_preferences.dart';
Expand Down Expand Up @@ -30,7 +29,7 @@ class DownloadViewModel extends StateNotifier<DownloadState> {


Future<String> downloadVideo(
String videoUrl, Int64 streamId, String fileName,) async {
String videoUrl, int streamId, String fileName,) async {
try {
final directory = await getApplicationDocumentsDirectory();
final filePath = '${directory.path}/$fileName';
Expand Down Expand Up @@ -127,7 +126,7 @@ class DownloadViewModel extends StateNotifier<DownloadState> {
}
}

bool isStreamDownloaded(Int64 id) {
bool isStreamDownloaded(int id) {
final int streamIdInt = id.toInt(); // Convert Int64 to int
return state.downloadedVideos.containsKey(streamIdInt);
}
Expand Down

0 comments on commit e6948b0

Please sign in to comment.