HomePage class

The main home page of the CulicidaeLab application.

This stateful widget represents the primary interface that users see when opening the app. It provides a tabbed interface with five main sections:

  • Home: Welcome screen with feature overview and navigation
  • Classification: Camera-based mosquito identification using AI
  • Gallery: Mosquito species information and visual gallery
  • Diseases: Disease information related to mosquitoes
  • Map: Interactive mosquito activity map (WebView)

Architecture & State Management

The widget manages navigation state using IndexedStack for efficient memory usage and state preservation across tabs. It integrates with:

Key Features

  • Bottom Navigation: Five-tab navigation with custom icons
  • Language Selection: Multi-language support (EN, ES, RU) via app bar menu
  • Model Preloading: Automatic PyTorch Lite model initialization on startup
  • Responsive Design: Gradient background and adaptive layouts
  • State Preservation: Maintains state across tab switches using IndexedStack
  • Error Handling: Graceful model loading failure handling
HomePage (IndexedStack)
├── Home Tab (Welcome screen with feature cards)
├── Classification Tab (ClassificationScreen)
├── Gallery Tab (MosquitoGalleryScreen)
├── Diseases Tab (DiseaseInfoScreen)
└── Map Tab (WebViewScreen)

Performance Considerations

  • Uses IndexedStack to maintain widget state across navigation
  • Preloads ML model asynchronously to avoid blocking UI
  • Implements proper lifecycle management for model loading
  • Optimizes memory usage by lazy-loading tab content

Localization Support

The screen supports multiple languages through:

  • Dynamic language switching via app bar menu
  • Localized navigation labels and content
  • Proper text direction and formatting support
  • Persistent language preference storage

See also:

Inheritance

Constructors

HomePage({Key? key})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _HomePageState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited