This Flutter application is a modified version of the Kamisato Records (link to repository). It demonstrates data persistence using Google Firebase. It includes functionalities to add, retrieve, update, and delete data from the kamisato-records
database. The application uses a Provider
for state management.
- An improvement of the Kamisato Records repository.
- Configured Firebase Firestore for data persistence.
- Dart files are organized to separate folders such as
api
,models
,navigation
,providers
, andscreens
. - Implemented
FriendListProvider
for state management. - Used
context.watch
to check onFriendListProvider
for any edit or delete actions. Andcontext.read
to call on the provider commands such asaddFriend
,editFriend
, anddeleteFriend
. - Created a user interface for adding, viewing, updating, and deleting records.
- Added error handling and validation for user inputs.
- Open Command Prompt or Windows Powershell.
- Navigate to the project directory.
- Set up your Google Firebase Database and follow the steps.
- Ensure you have FlutterFire CLI installed. If not, install it using:
dart pub global activate flutterfire_cli
- Configure FlutterFire for your project:
flutterfire configure
- Run the following lines to start the emulator and run the app:
cd kamisato flutter emulator --launch "Pixel_API" flutter run
- Dbestech.com. (2023). Flutter's addPostFrameCallback. https://www.dbestech.com/tutorials/flutter-addpostframecallback
- Ghimire, S.B. (2024, February 12). Understanding Flutter’s addPostFrameCallback: A Practical Guide. Medium; Medium. https://saw2110.medium.com/understanding-flutters-addpostframecallback-a-practical-guide-b3d3133b6b85
- Google. (2024). Tips & tricks | Cloud Functions for Firebase. Retrieved from: https://firebase.google.com/docs/functions/tips
- Gunawan, M. (2023, March 16). 4 Ways to Avoid The Null Check (!) Operator On Flutter. Retrieved from: https://mario-gunawan.medium.com/4-ways-to-avoid-the-null-check-operator-on-flutter-e2b8e7d965d
- Fireship.io. (2019). Top 100 Firebase Tips and Tricks. Retrieved from: https://fireship.io/lessons/firebase-tips-and-tricks/
- Rasathurai, S. (2024). Null check operator used on a null value. Retrieved from: https://stackoverflow.com/questions/64278595/null-check-operator-used-on-a-null-value