UploadSession class
Clase que encapsula el estado y las operaciones de una sesión de carga. Se evita el uso de variables de instancia compartidas en FlutterHttpProvider, concentrando la lógica y el estado propio de la carga en este objeto.
Constructors
-
UploadSession({required FlutterHttpProvider provider, required String token, required String imagenNombre, required String urlStreaming, required String urlStreamingPartBase, required List<
Uint8List> fileParts})
Properties
-
fileParts
→ List<
Uint8List> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imagenNombre → String
-
final
- provider → FlutterHttpProvider
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → String
-
final
- urlStreaming → String
-
final
- urlStreamingPartBase → String
-
final
Methods
-
finalizarTransaccion(
String idTransaccion) → Future< String> - Finaliza la transacción de carga en el servidor y retorna el path final del archivo.
-
iniciarTransaccion(
) → Future< String> - Inicia la transacción de carga en el servidor y retorna el ID resultante.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subirArchivo(
{String idTransaccion = '', bool runIsolate = true, int timeOutInSeconds = 45}) → Future< String> -
Sube todas las partes del archivo de forma secuencial.
Se utiliza un isolate cuando la plataforma lo permite y se solicita.
se agrega parametro
timeOutInSecondssi no se envia se predetermina 45 segundos -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited