FirebaseUI-Flutter
FirebaseUI-Flutter copied to clipboard
[firebase_ui_storage] upload/download intents and actions for custom UIs
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));
}, ...);
}
}