Revision
Flutter Application Development.
Chapter 4: Introduction to Dart Language
Part One: True / False
1. Dart is an object-oriented programming language developed by Google. (True)
2. Dart supports arrays as a built-in data structure. (False)
3. The dynamic data type allows a variable to change its type at runtime. (True)
4. The for-in loop is used to iterate over collections in Dart. (True)
5. A constructor is used to define methods inside a class. (False)
Part Two: Short Answer
1. What is Dart mainly used for?
Answer: Developing mobile, web, and desktop applications.
2. Which keyword is used to declare a variable in Dart?
Answer: var
3. Name one decision-making statement in Dart.
Answer: if
4. What is the purpose of a loop?
Answer: To execute code repeatedly.
5. What is a class in Dart?
Answer: A blueprint for creating objects.
Chapter 5: Data Persistence Using SharedPreferences
Part One: True / False
1. Data persistence allows an app to retain data after it is closed. (True)
2. SharedPreferences stores data in key-value pairs. (True)
3. SharedPreferences is suitable for storing large databases. (False)
4. The SharedPreferences file can be accessed by other applications. (False)
5. SharedPreferences supports storing boolean values. (True)
Part Two: Short Answer
1. What is SharedPreferences used for in Flutter?
Answer: Storing small pieces of persistent data.
2. Which plugin is required to use SharedPreferences in Flutter?
Answer: shared_preferences
3. Name one data type that can be stored in SharedPreferences.
Answer: String
4. Where is SharedPreferences data stored?
Answer: In the device’s internal storage.
5. Why is SharedPreferences preferred over SQLite for small data?
Answer: It is simpler and requires less code.
Chapter 6: Local Storage Using SQLite (sqflite)
Part One: True / False
1. SQLite is a lightweight embedded database engine. (True)
2. The sqflite plugin provides a Dart API for SQLite operations. (True)
3. SQLite requires a remote server to function. (False)
4. SQLite supports inserting, updating, and deleting data. (True)
5. Using SQLite improves app performance by reducing network requests. (True)
Part Two: Short Answer
1. What is SQLite mainly used for in Flutter apps?
Answer: Local data storage.
2. Which method is used to open or create a database in sqflite?
Answer: openDatabase()
3. Name one advantage of using SQLite.
Answer: Offline data access.
4. Mention one disadvantage of using SQLite.
Answer: Increased complexity.
5. Which file is used to add the sqflite dependency?
Answer: [Link]