Giter Site home page Giter Site logo

car_on_sale's Introduction

car_on_sale

A new Flutter project.

Project Structure

Explanation of Code Organization

1. Models

  • Purpose: Define data structures and models used through the app.
  • File: vehicle_options.dart contains the VehicleOption class, which represents the vehicle options data model.

2. Screens

  • 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.

3. Services

  • 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.

4. Utils

  • 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.

5. Main

  • File: main.dart initializes the app and sets up the navigation.

6. Tests

  • Purpose: Make the app more robust and ship better code quality.
  • Files:
    • local_storage_test.dart: Test class that test the cache functionallity.

Extra: VIN Validation

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);
  }
}

car_on_sale's People

Contributors

kiketordera avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.