export_firebase_csv 1.0.8 copy "export_firebase_csv: ^1.0.8" to clipboard
export_firebase_csv: ^1.0.8 copied to clipboard

Una librería Flutter que realiza exportación a CSV desde Firestore.

example/main.dart

import 'package:export_firebase_csv/export_firebase_csv.dart';

void main() {
  // Ejemplo de uso de exportWithTitles
  exportDataFromFirebase();

  // Ejemplo de uso de jsonToCsv
  convertJsonToCsv();
}

void exportDataFromFirebase() async {
  String collectionName = 'employees';
  List<String> rowTitles = ['Name', 'Age', 'City'];
  List<String> fieldNames = ['name', 'age', 'city'];
  DateTime startDate = DateTime(2023, 1, 1);
  DateTime endDate = DateTime(2023, 1, 31);
  String dateFieldName = 'hireDate';

  await exportWithTitles(
    collectionName,
    rowTitles,
    fieldNames,
    startDate,
    endDate,
    dateFieldName,
    "-",
    "report"
  );
}

void convertJsonToCsv() {
  String jsonString = '[{"name": "Alice", "age": 30, "city": "New York"}, {"name": "Bob", "age": 25, "city": "Los Angeles"}]';
  String fileName = 'data';

  jsonToCsv(jsonString, fileName);
}
9
likes
130
pub points
48%
popularity

Publisher

unverified uploader

Una librería Flutter que realiza exportación a CSV desde Firestore.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cloud_firestore, download, flutter, intl

More

Packages that depend on export_firebase_csv