Getting Started
Prerequisites
- Download and install Flutter SDK
- Download and install Android Studio
- Download and install Xcode (if mac users)
- Download and install Sourcetree
Description
Helixworld . Mobile App for the Helixworld.
Setup
-
our first setup is to download the flutter SDK Flutter SDK Link Install Mac
-
Download also Sourcetree for Code Version Management Sourcetree for Windows or Mac
-
add existing local repo and point it to where you put the Flutter SDK and then checkout the version
3.13.7
-
setup and Download Android Studio
-
setup and Download
Clone Repo
git clone https://github.com/MetaverseGroup/helixworlds-snatcher-sdk.git
create new app in flutter
- flutter create
app_name
- cd
app_name
- flutter pub get
- flutter run
Setting up Pre Commit
python -m pip install --upgrade pip
pip install pre-commit
pre-commit install
Running
sample app inside the SDK for testing the SDK
- dart run build_runner build (add this command if you are experiencing problems with model not generated after pulling)
- cd example
- flutter run
Troubleshooting
if you encounter issue running your project
- flutter doctor - (to be able to diagnose what your flutter tools lacks or having issues with)
Integration Setup
call this function to initialize the DI Class that will be used on the SDK
// call this method to setup your url coordinate with our team in order to get this values on in your .env file
setBaseSDKUrl(gathererUrl, inventoryUrl)
import 'package:helixworlds_snatcher_sdk/core/service_di.dart';
import 'package:helixworlds_snatcher_sdk/helixworlds_sdk.dart';
setupServices()
/// for remote scan service it will require calling endpoint
loginMobile("Developer ID", "Secret Key")
/// this will get you access to the methods available on the SDK
getSDK()
/// requirement in order to use the cloud based image recognition from MVG please contact our team in order to access this feature
Future<Either<Failure, Success>> loginMobile(String developerId, String secret);
/// this is the methods you can use for scanning we should use the scanItem method and provide an optional param if is using remote scan service
Future<Either<Failure, Success>> scanItems(InputImage image);
Future<Either<Failure, Success>> scanItem({bool isAR = false});
Future<Either<Failure, Success>> scanItemsByAR(XFile image);
Future<Either<Failure, String>> getUserId();
Future<Either<Failure, Success>> cacheFavoritesItem(InventoryItemModel model);
Future<Either<Failure, List<MyLogModel>>> fetchFavoritesItems();
Future<Either<Failure, List<MyLogModel>>> fetchScannedItems();
Future<Either<Failure, Success>> redirectToUrl(String murl);
bool isLocalFetch();
String getDefaultUserId();
on pubspecs.yaml please include this
dependencies:
// production version from pub dev
helixworlds_snatcher_sdk: ^1.0.0+1
// use this if you are testing the modified version in github (remove this if using the one from pub dev)
helixworlds_snatcher_sdk:
git:
url: https://github.com/MetaverseGroup/helixworlds_snatcher_sdk.git
ref: main
flutter:
uses-material-design: true
assets:
- packages/helixworlds_snatcher_sdk/assets/model.tflite
Testing
run all unit tests cases flutter test test/
Libraries
- core/const
- core/failure
- core/service_di
- core/success
- features/analytics/mixpanels/analytics_googleanalytics_remote_datasource
- features/analytics/mixpanels/analytics_mixpanels_local_datasource
- features/analytics/mixpanels/analytics_mixpanels_rudderstack_remote_datasource
- features/analytics/mixpanels/analytics_repository
- features/auth/auth_local_datasource
- features/auth/auth_remote_datasource
- features/auth/auth_repository
- features/log/data/log_local_datasource
- features/log/data/model/log_model
- features/scan/data/model/scan_model
- features/scan/data/scan_local_datasource
- features/scan/data/scan_remote_datasource
- features/scan/data/scan_repository
- features/user_details/data/user_details_local_datsource
- features/user_details/data/user_details_remote_datasource
- features/user_details/user_details_repository
- features/widgets/app_bar/appbar_image
- features/widgets/app_bar/appbar_image_1
- features/widgets/app_bar/appbar_title
- features/widgets/app_bar/custom_app_bar
- features/widgets/custom_image_view
- helixworlds_sdk
- helixworlds_snatcher_sdk
- theme/app_decoration
- theme/bloc/theme_bloc
- theme/custom_text_style
- theme/theme_helper
- utils/helper_util
- utils/network_util
- utils/object_image
- utils/object_url
- utils/pref_utils
- utils/sentry_util
- utils/size_utils