How to convert data from uploaded csv to list of model and store it in Firebase Firestore using Flutter Riverpod
Step1: Create Model class like emplyeeModel.dart import ‘dart:convert’; List<Employee> employeeFromJson(String str) => List<Employee>.from(json.decode(str).map((x) => Employee.fromJson(x))); String employeeToJson(List<Employee> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson()))); class Employee { Employee({ this.employeeName, this.employeeNumber, }); final String? employeeName; final String? employeeNumber; factory Employee.fromJson(Map<String, dynamic> json) => Employee( […]