mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
feat: torrent file support on web (#171)
This commit is contained in:
12 files changed
+288
-55
No files matched your search
@@ -1,3 +1,6 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -10,6 +13,7 @@ class CreateController extends GetxController
|
||||
final isResolving = false.obs;
|
||||
final showAdvanced = false.obs;
|
||||
late TabController advancedTabController;
|
||||
final fileDataUri = "".obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@@ -22,4 +26,13 @@ class CreateController extends GetxController
|
||||
advancedTabController.dispose();
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
void setFileDataUri(Uint8List bytes) {
|
||||
fileDataUri.value =
|
||||
"data:application/x-bittorrent;base64,${base64.encode(bytes)}";
|
||||
}
|
||||
|
||||
void clearFileDataUri() {
|
||||
fileDataUri.value = "";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user