Demo: Upload requests are consumed and immediately discarded. Nothing is stored.
File picker and upload queue with size/type checks, progress and retry from the beginning.
TxFileUploader
| Parameter | Type | Default | Meaning |
|---|---|---|---|
| adapter | TxUploadAdapter? | null | Upload function for one file. |
| dataSource | Object? | null | List, configuration or DataSource instance; takes precedence over items. |
| multiple | bool | false | Allows multiple files. |
| maxFileSize | int? | null | Maximum file size in bytes. |
| minFileSize | int | 0 | Minimum file size in bytes. |
| extensions | List<String> | const [] | Allowed file extensions without a dot. |
| instantly | bool | false | Starts valid files immediately after selection. |
| disabled | bool | false | Disables interaction. |
| onUploaded | void Function(TxFile, Object?)? | null | Provides the uploaded TxFile and adapter result. |
| onError | void Function(TxFile, Object)? | null | Reports the file and error of a failed upload operation. |
| onChanged | ValueChanged<List<TxFile>>? | null | Callback for changed; see the signature for arguments and return type. |
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';
Widget example() {
// Demo endpoint: consumes the request without storing files. Maximum 1 MiB.
final upload = txHttpUpload(TxHttpUploadConfig(url: Uri.base.resolve('/api/upload')));
return TxFileUploader(adapter: upload, extensions: const ['txt'], maxFileSize: 1048576);
}