ROCAS TabBarTabViewActivity
ROCAS TabBarTabViewActivity
ELECL01C
ANDROID APP DEVELOPMENT
You can consult any reference but your answer must be written in your own words.
.
1. What is the purpose of the TabBar and TabBarView widgets in Flutter? ANSWER:
- TabBar Displays tabs for navigation. While TabBarView Holds content corresponding to
each tab.
3. What are some key properties of the TabBar widget, and how can they be
customized? ANSWER:
1. Tabs- List of tabs.
2. isScrollable- Scrollable tabs (true/false).
3. Controller- Custom TabController.
4. labelColor, unselectedLabelColor- Text color.
5. indicatorColor, indicatorWeight- Indicator appearance.
6. labelStyle, unselectedLabelStyle- Text style.
7. onTap- Callback for tab selection.
Create a basic Flutter Application in Android Studio or your favorite IDE and replace the main.dart
file with the following code.
Screenshot of the Output:
HANDS ON ACTIVITY:
• Create a new Flutter project using FLUTLAB.
• Name your project as TabbedApp_Surname.
2.Tab Content:
• Each tab should have unique content. You can choose the content based on the theme of
your app.
• For example, if it's a fitness app, tabs could be "Workouts," "Nutrition," and "Progress."
3. Icons:
• Consider adding icons to each tab for better visual appeal.
• You can use the Tab widget and provide the icon property.