FirebaseExcelExporter class

A utility class for exporting Firestore collections to an Excel file.

This class allows customization of headers and data mapping, making it flexible for various use cases.

Example usage:

final exporter = FirebaseExcelExporter();
await exporter.exportCollection(
  collectionPath: 'users',
  filePath: '/path/to/save/file.xlsx',
  headers: ['Name', 'Email', 'Age'],
  dataMapper: (doc) => [doc['name'], doc['email'], doc['age']],
);

Constructors

FirebaseExcelExporter()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

exportToExcel({required String collectionName, required List<String> headers, required List mapper(Map<String, dynamic>), String fileName = 'export.xlsx', Query<Object?> queryBuilder(Query<Object?> query)?}) Future<void>
Exports a Firestore collection to an Excel file.