mobileapp
mobileapp
1.Bottom Navigation:
•Includes five tabs: Home, Contacts, History,
Settings, and About.
•Icon and Label for each tab to indicate its purpose.
2.Screens List:
•Displays different screens based on the selected
tab.
•Uses a list of screens (_screens), which includes:
•HomeScreen
•CallContactScreen
•IRHistoryScreen
•SettingsScreen
•AboutScreen
3.Navigation Behavior:
•Updates the screen and highlights the active tab
when a user taps a tab.
•Customizable icon colors for selected and
unselected tabs.
This HomeScreen in Flutter displays real-time IR sensor
data for monitoring driver drowsiness. Key points:
1.Data Fetching:
•Fetches data from a ThingSpeak API when
the screen loads.
•Displays IR sensor values and a timestamp
after adding a 5-hour offset.
2.Main Content:
•Alarm Icon: Visual indicator for drowsiness
alerts.
•IR Data Display:
•Shows sensor data and formatted
timestamp in bordered containers.
•Styled with white and blue for contrast.
The IRHistoryScreen displays a history of driver drowsiness events, fetching data from a remote API and notifying users
when drowsiness is detected.
Key Features:
1.Notification Permission: Requests permission to
send notifications to the user.
2.Local Notifications: Uses FlutterLocalNotificationsPlugin to alert the user if
the driver is drowsy.