firefile 0.1.0 copy "firefile: ^0.1.0" to clipboard
firefile: ^0.1.0 copied to clipboard

outdated

The Firefile package makes it easy to control the display of the Firestore file download progress.

Usage #

Firefile(
  controller: controller,
  tileBuilder: (task) {
    Widget? trailing;
    switch (task.state) {
      case TaskState.running:
        if (task.progress > 0) {
          trailing = IconButton(
            onPressed: () => controller.cancelTask(task, removeOnCancel: true),
            icon: Stack(
              fit: StackFit.passthrough,
              alignment: Alignment.center,
              children: [
                CircularProgressIndicator(
                  value: task.progress,
                  color: Colors.red,
                ),
                Text('${(task.progress * 100).round()}%'),
              ],
            ),
          );
        } else {
          trailing = const CircularProgressIndicator();
        }
        break;
      case TaskState.success:
        trailing = const Text('Success 🎉');
        break;
      default:
        break;
    }
    return ListTile(
      title: Text(task.fileName),
      trailing: trailing,
    );
  },
),
6
likes
0
points
57
downloads

Publisher

unverified uploader

Weekly Downloads

The Firefile package makes it easy to control the display of the Firestore file download progress.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bloc, firebase_storage, flutter, flutter_bloc, freezed, freezed_annotation, provider

More

Packages that depend on firefile