Mobile application developed in Flutter for connecting with an RFID reader 🏷️
Designed to connect to an RFID reader via Bluetooth Low Energy (BLE) to optimize product counting and inventory.
Follow these instructions to get a copy of the project up and running on your local machine for development and testing.
- Flutter SDK (version 3.x or higher)
- A code editor, such as VS Code or Android Studio
- An Android device or emulator
-
Clone the repository:
git clone {repository-url-for-smartstock-mobile} cd smartstock-mobile -
Install dependencies:
flutter pub get
-
Configure environment variables:
cp .env.example .env
Edit the .env file with the necessary settings.
-
Run the application:
flutter run
-
Generate routing files: The project uses
auto_routefor navigation. During development, run the following command to generate the required files:dart run build_runner build
- Framework: Flutter
- State Management: Riverpod
- Navigation: AutoRoute
- Bluetooth Communication: flutter_blue_plus
- HTTP Requests: http
- UI Components: forui
- Dependency Injection: get_it
- Environment Variables: flutter_dotenv
- Logging: logger
The project follows a clean architecture, separating responsibilities into different layers:
lib/
├── app/
│ ├── bluetooth/ # Bluetooth connection logic and state machine
│ ├── config/ # API settings, dependencies, and environment variables
│ ├── data/ # Repositories and Data Transfer Objects (DTOs)
│ ├── domain/ # Entities and repository abstractions
│ ├── routing/ # Route configuration (AutoRoute)
│ ├── ui/ # Widgets, pages, providers (Riverpod), and themes
│ └── utils/ # Utility classes (e.g., logger)
└── main.dart # Application entry point
- To maintain a smoother transition between screens with the same
AppBarstyle, I opted to useAutoTabsinstead ofNavigator.push(), avoiding the default effect that replaces the entire screen. However, asAutoTabssimulates navigation, the native back button ends up closing the app when in internal routes. I solved this usingPopScopeandSystemNavigator.pop()on Android. On iOS, this behavior will differ as the method is not supported. Edit: I believe that customizing the screen transition animation would make this unnecessary. However, as these screens currently share behaviors, it worked out perfectly. - Credits for the home screen background
stock.png: https://www.pexels.com/photo/red-and-white-plastic-containers-on-shelf-3992851/ + https://pinetools.com/blur-image with theStack Blurfilter and radius 100 + https://imgonline.tools/pt/darken with a darkening factor of 15. - Changing the application icon on iOS needs adjustments to become functional. Also, due to the lack of compatible hardware, the iOS version of the application has not been tested.
- Useful command:
flutter build apk --obfuscate --split-debug-info=/output
This project is licensed under the MIT License. See the LICENSE file for more details.
This repository contains the implementation of the project's mobile application, developed by Ruan Macedo Santos.
Developed for the Smart Stock project within the EmbarcaTech Program.