justkawal / excel

Excel Library for Flutter and Dart - https://pub.dev/packages/excel
MIT License
403 stars 212 forks source link

Default constructors for simplicity #330

Open TheCarpetMerchant opened 4 months ago

TheCarpetMerchant commented 4 months ago

Please provide a setter function on cells to easily set values, such as :

//...
cell.set('value');
cell.set(10);
//...

The setter using type checks to instantiate the correct CellValues. This will also help give the correct "cell style", because if I'm honest I can't be bothered to set a cell style for every int cell. The cells should at the very least have a default style if you want this system. You made a type-driven system, which is great, but that means you type system must make it impossible to create values which inevitably throw Exceptions (such as cell.value = IntCellValue(10);).