MarketStack Stock Market App is a Flutter built mobile application that shows stock details for 10 random companies;using MarketStack APIs. The app contains features such as date range selection and an auto complete search box to filter the data from the API resource.
- Feature 1: List of random companies in the Stock Market with the price value and details
- Feature 2: Autocomplete search-feature to filter from the list of companies
- Feature 3: Internet Connection Checker to Notify when the device is offline
- Feature 4: Date Range Picker to filter Stock value of companies fetched.
- Bloc State Management (Cubit)
- Pull-to-Refresh
- Google Fonts
- connectivity_plus (internet connection checker)
- get_it (dependency injection for bloc)
- json annotation
- http
- mocktail (Mock test library)
- equatable
The Codebase uses MVVM Clean Architecture with Block(Cubit) as Statemanagement which separates into four main layers namely.
- Data Layer: This layer handles data sources, repositories, and data models
- Domain Layer: The domain layer defines the business logic and use cases of the app
- Presentation Layer: This layer is responsible for UI, user interactions, and displaying data to users. It includes widgets, views, and view models (or view states) which are responsible for managing UI-related logic.
- Infrastructure Layer: The infrastructure layer contains code related to third-party api service.
NB: This app is in null-safety. Therefore, to run the app with no dependency conflicts and issues, you need to install flutter sdk version between '>=2.18.1 <3.0.0' to run the app.
.
-
Clone the repo With ssh
git@github.com:AYOMITIDE-OAJ/marketstack-stockapp.git
With https
[https://github.com/ayomitide-oaj/marketstack-stockapp](https://github.com/AYOMITIDE-OAJ/marketstack-stockapp)
- Run:
flutter pub get
to get the packages and dependencies setup/installed - Run the app using
flutter run lib/main.dart
to run the app.
- Open a terminal or command prompt and navigate to your Flutter project's root directory.
- Run the following commands to build the app for release:
1. flutter clean
2. flutter build apk --release // For Android
3. flutter build ios --release // For iOS
π¨
lib
βββ App
| βββ appentry.dart
|
βββ deoendencyinjection
| βββ di.dart
|
βββ stock
| βββ cubit
| βββstock_cubit.dart
| βββstock_observer.dart
| βββstock_state.dart
|
| βββ viewmodel
| βββstock_viemodel.dart
|
| βββ views
| βββstock_page.dart
| βββstock_screen.dart
|
βββ widgets
| βββ colors.dart
| βββ index.dart
| βββ loader_custom.dart
| βββ loading_widget.dart
| βββ no_network_Widget.dart
| βββ typography.dart
|
|
| βββ main.dart
| |
| βββ marketstackapi
| βββ api
| βββ api_service.dart
| βββ models
| βββ index.dart
| βββ stock.dart
| βββ tickers.dart
β βββ repository
| βββ marketstack_repository.dart
|
| βββ test
| βββ marketstackapi_test.dart
β
βββ pubspec.yaml