Recall & Review
beginner
What is file storage in mobile apps?
File storage means saving data as files on the device's storage, like saving a photo or a note. It helps keep data even when the app is closed.
Click to reveal answer
beginner
Which Flutter package is commonly used for file storage?
The
path_provider package helps find device folders to save files, and dart:io is used to read/write files.Click to reveal answer
intermediate
What is the difference between temporary and persistent storage?
Temporary storage is for files that can be deleted anytime (like cache). Persistent storage keeps files safe until the user deletes them or uninstalls the app.
Click to reveal answer
intermediate
How do you get the app's documents directory in Flutter?
Use
getApplicationDocumentsDirectory() from path_provider. It returns a folder where you can save files that should persist.Click to reveal answer
intermediate
Why should you handle file operations asynchronously in Flutter?
File reading and writing can take time. Doing it asynchronously keeps the app smooth and responsive, avoiding freezes or delays.
Click to reveal answer
Which Flutter package helps locate device directories for file storage?
✗ Incorrect
The path_provider package provides paths to commonly used locations on the device file system.
What does
getTemporaryDirectory() return?✗ Incorrect
getTemporaryDirectory() returns a folder for temporary files that the system may delete when needed.
Which Dart library is used to read and write files?
✗ Incorrect
dart:io provides classes like File to read and write files on the device.
Why should file operations be done asynchronously in Flutter?
✗ Incorrect
Asynchronous file operations keep the app responsive by not blocking the UI thread.
Where should you save user-generated files that need to persist?
✗ Incorrect
The application documents directory is meant for files that should persist between app launches.
Explain how to save a text file in Flutter using file storage.
Think about how to find the folder, create a file, and write text to it without freezing the app.
You got /5 concepts.
Describe the difference between temporary and persistent storage and when to use each in a mobile app.
Consider what happens if the app closes or the device runs low on space.
You got /5 concepts.