Skip to content

[firebase_ui_storage] upload/download intents and actions for custom UIs #42

@lesnitsky

Description

@lesnitsky

Firebase UI should provide intents and actions that could be used directly by custom UIs.

Example:

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
      return Actions(
        actions: {
          UploadFileIntent: UploadFileAction(), // <- from 'package:firebase_ui_storage/firebase_ui_storage.dart'
        },
        ...
      )
   }
}

class MyCustomView extends StatelessWidget {
  Widget build(BuildContext context) {
    return ElevatedButton(onPressed: () async {
      final file = await pickFile();
      Actions.invoke(UploadFileIntent(file));
    }, ...);
  }
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions