A new Flutter project.
- Purpose: Define data structures and models used through the app.
- File:
vehicle_options.dart
contains theVehicleOption
class, which represents the vehicle options data model.
- Purpose: Contains all the UI components of the app.
- Files:
auction_data.dart
: Displays auction data to the user.home.dart
: The home screen of the app.signup.dart
: Allows users to enter their identification data.vehicles_selection.dart
: Screen for selecting vehicles based on fetched data.
- Purpose: Handles business logic and data operations, including API calls and local storage.
- Files:
api_service.dart
: Contains methods for making HTTP requests.local_storage.dart
: Manages data caching and retrieval using local storage.
- Purpose: Contains utility classes and functions that can be used throughout the app.
- Files:
error_handler.dart
: Utility for handling and displaying errors.regex_util.dart
: Utility for regex operations, including removing specific letters (QIO) from the input.
- File:
main.dart
initializes the app and sets up the navigation.
- Purpose: Make the app more robust and ship better code quality.
- Files:
local_storage_test.dart
: Test class that test the cache functionallity.
The Regex expresion in the regex.dart
file contains functions for validating Vehicle Identification Numbers (VINs). VINs are 17 characters long and can include any alphanumeric characters except for the letters I, O, and Q, which are excluded to avoid confusion with numerals 1 and 0.
Example Code:
class VINValidator {
static bool isValidVIN(String vin) {
final regex = RegExp(r'^[A-HJ-NPR-Z0-9]{17}$');
return regex.hasMatch(vin);
}
}