- Dart 77.1%
- Kotlin 13.8%
- Nix 9.1%
|
|
||
|---|---|---|
| .flutter@44a626f4f0 | ||
| android | ||
| build/app/outputs/flutter-apk | ||
| fastlane/metadata/android/en-US | ||
| integration_test | ||
| lib | ||
| test | ||
| test_driver | ||
| .envrc | ||
| .gitignore | ||
| .gitmodules | ||
| .metadata | ||
| analysis_options.yaml | ||
| devenv.lock | ||
| devenv.nix | ||
| devenv.yaml | ||
| LICENSE | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| QUICKSTART.md | ||
| README.md | ||
CSV Editor - Flutter App
A Flutter application for viewing and editing CSV files.
Features
- 📂 Open CSV Files: Pick and load CSV files from your device
- ✏️ Edit Cells: Tap any cell to edit its content
- ➕ Add Rows/Columns: Dynamically add new rows and columns
- 🗑️ Delete Rows/Columns: Remove unwanted rows or columns
- 💾 Save Changes: Export edited CSV back to your device
- 🆕 Create New CSV: Start with a blank spreadsheet
- 📊 Spreadsheet View: Familiar table interface with scrolling
- ⚠️ Change Tracking: Visual indicator for unsaved changes
Setup Instructions
Prerequisites
- Flutter SDK (3.0.0 or higher)
- Android Studio or VS Code with Flutter extensions
- Android SDK
- A physical Android device or emulator (API level 21+)
Installation
-
Navigate to the project directory:
cd csv_editor -
Install dependencies:
flutter pub get -
Connect your Android device or start an emulator:
flutter devices -
Run the app:
flutter run
Android Emulator with devenv
This repo manages its Android emulator tooling through devenv and keeps mutable AVD state under the repo-local .android/ directory.
-
Enter the dev shell:
devenv shell -
Create the pinned emulator once:
android-avd-create -
Launch the emulator:
flutter-emulator-up -
In another shell, confirm the device and run the app:
devenv shell android-devices android-adb devices -l flutter-devices flutter-run-emulator
Other Flutter helpers:
flutter-run-androidruns the app on the default Android targetflutter-run-android <device-id>runs on a specific Android deviceflutter-run-emulatorruns onemulator-5554by defaultflutter-deviceslists Flutter-visible devices
Pinned emulator image for this repo:
- AVD name:
csv-editor-api36 - Package:
system-images;android-36;google_apis;x86_64
Notes:
ANDROID_USER_HOMEis set to.android/ANDROID_AVD_HOMEis set to.android/avd/adbcomes from the host as requested; the helper command just uses it from the shell
Building APK
To build a release APK:
flutter build apk --release
The APK will be located at: build/app/outputs/flutter-apk/app-release.apk
Usage
Opening a CSV File
- Tap the folder icon in the app bar, or
- Tap the "Open CSV File" button on the welcome screen
- Select a CSV file from your device
Creating a New CSV
- Tap the "+" icon in the app bar, or
- Tap the "Create New CSV" button on the welcome screen
Editing
- Edit Cell: Tap any cell and type to modify its content
- Add Row: Tap the "Add Row" button
- Add Column: Tap the "Add Column" button
- Delete Row: Tap the delete icon next to the row number
- Delete Column: Tap the delete icon in the column header
Saving
- Tap the save icon in the app bar or the floating action button
- Choose a location and filename
- Confirm to save the CSV file
Permissions
The app requires storage permissions to read and write CSV files:
READ_EXTERNAL_STORAGEWRITE_EXTERNAL_STORAGEMANAGE_EXTERNAL_STORAGE(Android 11+)
Permissions are requested at runtime when needed.
Technical Details
Dependencies
- csv (^6.0.0): CSV parsing and generation
- file_picker (^8.0.0): Native file picking dialog
- path_provider (^2.1.0): Access to file system directories
- permission_handler (^11.0.0): Runtime permission management
Troubleshooting
Permission Issues
If you encounter permission errors on Android 11+:
- Go to Settings > Apps > CSV Editor > Permissions
- Grant storage permissions manually
File Not Opening
- Ensure the file is a valid CSV format
- Check that the file is not corrupted
- Try opening a different CSV file
Build Errors
If you encounter build errors:
flutter clean
flutter pub get
flutter run
Future Enhancements
Potential features for future versions:
- Search and filter functionality
- Sort columns
- Cell formatting options
- Import/export other formats (Excel, JSON)
- Undo/redo functionality
- Column resizing
- Freeze header row