Skip to content

Test for native mobile app development in iOS or Android

License

Notifications You must be signed in to change notification settings

bcgreijnlautier/mobile-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR Code app

A Flutter app that communicates with a Node.js API to generate and scan QR codes.

Getting Started

QR Code is created with Flutter. Installation instructions for Flutter can be found here.

Running the project

API Server

  1. Navigate to the /api directory.
  2. Run npm install.
  3. Run npm run start. The API server should be running on port 3000.

Flutter App

  1. Before running the mobile app, please ensure you are using the latest stable Flutter channel:

    flutter channel stable
    flutter upgrade
    

    This app was developed on Flutter stable channel 1.22.5

  2. Clone this repo.

  3. Change the apiUrl value in /lib/repositories/qr.dart depending on the device you are using:

    • iOS Simulator: 'http://localhost:3000'
    • Android Emulator: 'http://10.0.2.2:3000'
    • Real Device: Run ifconfig to determine your IP address, and set the value to 'http://<your_ip>:3000'
  4. Open an emulator and run flutter run in the root of the project, or run directly from Android Studio

App Structure

  • Business logic is managed with the bloc library. All blocs / cubits are located in /lib/blocs. flutter_bloc widgets are used in the frontend to handle state changes.

  • API wrappers are contained in /lib/repositories. Instances of these repositories are declared in /lib/main.dart using RepositoryProviders so that these repositories can be used by any bloc in the application. Repositories should only be accessed by cubits / blocs.

  • Tests are written using the flutter_test library and can be run using flutter test test/<file>.dart. Test files are located in /test. Testing Flutter apps

  • All screens are located in /lib/screens.

About

Test for native mobile app development in iOS or Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 90.6%
  • Ruby 4.3%
  • JavaScript 3.3%
  • Swift 1.3%
  • Other 0.5%