0% found this document useful (0 votes)
10 views

flutter test2

The document outlines a comprehensive guide on Flutter, covering theoretical concepts such as core features, state management, and advanced techniques, along with practical tasks including app development projects. It includes multiple-choice questions, fill-in-the-blanks, and short answer questions to assess understanding at beginner, intermediate, and advanced levels. Additionally, it provides links to GitHub repositories for various sample applications created as part of the practical exercises.

Uploaded by

lbarsidati2000
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

flutter test2

The document outlines a comprehensive guide on Flutter, covering theoretical concepts such as core features, state management, and advanced techniques, along with practical tasks including app development projects. It includes multiple-choice questions, fill-in-the-blanks, and short answer questions to assess understanding at beginner, intermediate, and advanced levels. Additionally, it provides links to GitHub repositories for various sample applications created as part of the practical exercises.

Uploaded by

lbarsidati2000
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Section 1: Theoretical Part

Beginner Level (20 Points)

1. Explain Flutter and its core features. (2 Points)


- What is Flutter?
1.1- Flutter is an open source framework for smartphone app development, developed by Google 2018.
It allows developers to create applications that work on Android, iOS, and more from a single code base.

- Why is Flutter preferred for cross-platform development?

1.2- Because it saves developers time and effort in terms of creating and maintaining codes, it also
features high performance and an ideal and fully customizable user experience.

------------------------------------------------------------------------------------------------------------------

2. MCQ: Choose the correct answer. (2 Points)


a) Which widget is used to create a scrollable column of items?
- i) Column

- ii) ListView

- iii) Stack

- iv) Expanded

2.1 - ii)ListView

b) Which method is used to rebuild the UI in StatefulWidget?

- i) build()

- ii) setState()

- iii) initState()

- iv) dispose()

answer
2.2 -ii)setState()

3. Fill in the blanks. (2 Points)

a) The root of a Flutter app is usually a __________ widget.

b) StatelessWidget is used for creating __________ UIs that do not change over time

answer
3.1 a) The root of a Flutter app is usually a (MaterialApp) widget
3.2 b) StatelessWidget is used for creating (static) UIs that do not change over time

4. Short Answer Questions. (4 Points)

a) What is the role of the MaterialApp widget?

b) How is navigation between screens achieved in Flutter?

answer

4.1 a) MaterialApp is the controller of the roots and layout file of the application. Includes navigation
guidance and audio-visual resources for managing items

4.2 b) Navigation between screens in filters is achieved using the (Navigator) widget, which allows
pushing and pulling screens (called Routes) on a stack.

Intermediate Level (40 Points)

1. Explain the concept of state management in Flutter. (4 Points)

- Why is state management important?

1.1 a) State management is important because applications need to handle changing data and an
interface that reflects these changes in real time. Without an organized state management mechanism,
code can become complex and unstructured.

- Name two state management solutions commonly used in Flutter.

1.2 b) Two popular case management solutions in Flutter are (Provider & Bloc)

2. MCQ: Choose the correct answer. (4 Points)

a) Which of the following widgets helps in lazy loading lists?

- i) GridView

- ii) ListView.builder

- iii) SingleChildScrollView

- iv) Column

2.1 a) i thing is (ListView.builder)


b) What is the main purpose of the FutureBuilder widget?

- i) To build widgets asynchronously based on future data

- ii) To update UI based on animations

- iii) To create reusable widgets

- iv) To add custom fonts

2.2 b) To build widgets asynchronously based on future data

3. True/False. (4 Points)

a) The Navigator.push() method is used to remove the current screen from the stack.

3.1 a) false

b) The setState() method updates only a portion of the widget tree.

3.2 b) true

4. Short Answer Questions. (8 Points)

a) Explain the lifecycle of a StatefulWidget and its key methods.

4.1 a) StatefulWidgets in Flutter go through a lifecycle that includes several main steps: building the state
(initState()), building the interface (build()), changing the state (setState()), and removing the state
(dispose()).

b) What is the difference between async and await in Dart?

4.2 b)
- async : A keyword used with a function to indicate that it will contain an asynchronous operation and
return Future
- await: A keyword used inside an async function to wait for the Future to complete before continuing
code execution

Advanced Level (40 Points)

1. Explain advanced state management techniques in Flutter. (5 Points)

- Compare and contrast Provider, Bloc, and Riverpod.

1.1 a)
Provider : I don't know much about it. I've used it a little it's easy to use and it integrates well with
simple screens but i think is not good for large-scale applications .
Bloc : Uses event patterns for state management, suitable for large-scale applications
Riverpod : I haven't learned it yet

2. MCQ: Choose the correct answer. (4 Points)

a) What is the purpose of the AnimationController in Flutter?

- i) To manage navigation transitions

- ii) To control animations like Tween

- iii) To manage lazy loading of widgets

- iv) To manage the state of a widget

2.1 a) the answer is => ii) To control animations like Tween

b) Which of the following improves performance in a Flutter app?

- i) Using const widgets

- ii) Avoiding unnecessary rebuilds

- iii) Lazy loading lists

- iv) All of the above

2.2 b)the answer is => - iv) All of the above

3. Short Answer Questions. (8 Points)

a) How would you debug performance issues in a Flutter app?

3.1 a) To detect performance issues in a Flutter application, you can use the (Flutter DevTools ) suite or
you can use the (Flutter Inspector ) to examine the widget tree and identify problems in the application
structure

b) What are the benefits of using keys in widgets, and when should you use GlobalKey?

3.2 b) Benefits of using keys include improving performance and helping to preserve the condition of the
part when it is rebuilt.
GlobalKey : should be used when you need to access and maintain state across different tree tools.

Section 2: Practical Part

Beginner Level (20 Points)

1. Counter App (10 Points)


- Create a simple counter app with a button to increment the count and display it on the
screen. - Bonus: Add a reset button. (2 Extra Points)

1.1 Counter App Github Link => https://github.com/lbarsidati HYPERLINK


"https://github.com/lbarsidati22/test_counter_imt" HYPERLINK
"https://github.com/lbarsidati22/test_counter_imt" HYPERLINK
"https://github.com/lbarsidati22/test_counter_imt"22 HYPERLINK
"https://github.com/lbarsidati22/test_counter_imt" HYPERLINK
"https://github.com/lbarsidati22/test_counter_imt"HYPERLINK
"https://github.com/lbarsidati22/test_counter_imt" HYPERLINK
"https://github.com/lbarsidati22/test_counter_imt"/test_counter_imt

2. Navigation (10 Points)


- Build an app with two screens:
- Screen 1: Displays a button.
- Screen 2: Displays the text “Welcome to Screen 2!” when navigated to

1.2 Navigation App Github Link => https://github.com/lbarsidati HYPERLINK


"https://github.com/lbarsidati22/test_imt_navigation" HYPERLINK
"https://github.com/lbarsidati22/test_imt_navigation" HYPERLINK
"https://github.com/lbarsidati22/test_imt_navigation"22 HYPERLINK
"https://github.com/lbarsidati22/test_imt_navigation" HYPERLINK
"https://github.com/lbarsidati22/test_imt_navigation"HYPERLINK
"https://github.com/lbarsidati22/test_imt_navigation" HYPERLINK
"https://github.com/lbarsidati22/test_imt_navigation"/test_imt_navigation

Intermediate Level (40 Points)

1. API Integration (20 Points)


- Build an app that fetches data from a public API (e.g.,
https://jsonplaceholder.typicode.com/posts).
- Display the data in a ListView.
1.1
I created the application and used bloc-cubit as state management, and I also used the http library to
fetch data from the API.
Api App Github Link => https://github.com/lbarsidati HYPERLINK
"https://github.com/lbarsidati22/test_imt_api"22 HYPERLINK
"https://github.com/lbarsidati22/test_imt_api"/test_imt_api

2. Form Validation (20 Points)


- Create a login form with fields for email and password.
- Validate the form so that:
- The email is correctly formatted.
- The password is at least 6 characters long.
2.1 Login App Github Link => https://github.com/lbarsidati HYPERLINK
"https://github.com/lbarsidati22/test_imt_login" HYPERLINK
"https://github.com/lbarsidati22/test_imt_login" HYPERLINK
"https://github.com/lbarsidati22/test_imt_login"22 HYPERLINK
"https://github.com/lbarsidati22/test_imt_login" HYPERLINK
"https://github.com/lbarsidati22/test_imt_login"HYPERLINK
"https://github.com/lbarsidati22/test_imt_login" HYPERLINK
"https://github.com/lbarsidati22/test_imt_login"/test_imt_login

Advanced Level (40 Points)

1. Custom Animation (20 Points)


- Build an app with a card that flips when tapped.
- One side of the card should display "Front", and the other side "Back"

1.1
Well, I have only studied animation in Flutter a little, so perhaps this is a simple application, but I learned
a little bit of animation in => https://api.flutter.dev/flutter/animation/AnimationController-class.html
Animation App Github Link => https://github.com/lbarsidati HYPERLINK
"https://github.com/lbarsidati22/test_imt_animation"22 HYPERLINK
"https://github.com/lbarsidati22/test_imt_animation"/test_imt_animation

2. Performance Optimization (20 Points)


- Create a ListView with 1,000 items.
- Ensure smooth scrolling using lazy loading and optimized rendering

2.1
I think I did not understand this test well. I did something that I do not know if it was in line with the
request

ListView app Github Link => https://github.com/lbarsidati HYPERLINK


"https://github.com/lbarsidati22/test_imt_listview"22 HYPERLINK
"https://github.com/lbarsidati22/test_imt_listview"/test_imt_listview

3. To-Do App (Bonus Task: 10 Points)


- Create a simple to-do app with:
- Adding tasks with a title and description.
- Marking tasks as completed.
- Storing tasks persistently using SharedPreferences or Hive.

3.1
I only have a little experience with Hive, so I'm using it. I hope you like it

Todo App Github Link => https://github.com/lbarsidati HYPERLINK


"https://github.com/lbarsidati22/test_imt_todo"22 HYPERLINK
"https://github.com/lbarsidati22/test_imt_todo"/test_imt_todo
-------------------- lbarsidati -----------------------

You might also like