Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Advanced Example (Custom Workflow using ImpReader class) #3

Merged
merged 19 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .flutter-plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This is a generated file; do not edit or check into version control.
haptic_feedback=/Users/runner/.pub-cache/hosted/pub.dev/haptic_feedback-0.4.2/
path_provider_linux=/Users/runner/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
path_provider_windows=/Users/runner/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/
sensors_plus=/Users/runner/.pub-cache/hosted/pub.dev/sensors_plus-5.0.1/
shared_preferences=/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences-2.3.3/
shared_preferences_android=/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/
shared_preferences_foundation=/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/
shared_preferences_linux=/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/
shared_preferences_web=/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/
shared_preferences_windows=/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/
1 change: 1 addition & 0 deletions .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"haptic_feedback","path":"/Users/runner/.pub-cache/hosted/pub.dev/haptic_feedback-0.4.2/","native_build":true,"dependencies":[]},{"name":"sensors_plus","path":"/Users/runner/.pub-cache/hosted/pub.dev/sensors_plus-5.0.1/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"haptic_feedback","path":"/Users/runner/.pub-cache/hosted/pub.dev/haptic_feedback-0.4.2/","native_build":true,"dependencies":[]},{"name":"sensors_plus","path":"/Users/runner/.pub-cache/hosted/pub.dev/sensors_plus-5.0.1/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/runner/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/Users/runner/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"sensors_plus","path":"/Users/runner/.pub-cache/hosted/pub.dev/sensors_plus-5.0.1/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/runner/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"haptic_feedback","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sensors_plus","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-11-18 13:47:56.096363","version":"3.24.3","swift_package_manager_enabled":false}
34 changes: 31 additions & 3 deletions .github/workflows/pr_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,46 @@ jobs:
- name: Prepare Flutter
uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main
with:
directory: example
directory: example/example

- name: Run static analysis
run: |
cd example
cd example/example
flutter analyze --no-fatal-warnings
shell: bash

- name: Check licenses
uses: emdgroup/mtrust-urp/.github/actions/check-dart-licenses@main
with:
directory: example
directory: example/example

build_advanced_example:
name: Build Advanced Example
needs: validate_pr
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Dart
uses: dart-lang/setup-dart@v1

- name: Prepare Flutter
uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main
with:
directory: example/example_advanced

- name: Run static analysis
run: |
cd example/example_advanced
flutter analyze --no-fatal-warnings
shell: bash

- name: Check licenses
uses: emdgroup/mtrust-urp/.github/actions/check-dart-licenses@main
with:
directory: example/example_advanced

build_library:
name: Build Library
Expand Down
34 changes: 31 additions & 3 deletions .github/workflows/pr_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,46 @@ jobs:
- name: Prepare Flutter
uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main
with:
directory: example
directory: example/example

- name: Run static analysis
run: |
cd example
cd example/example
flutter analyze --no-fatal-warnings
shell: bash

- name: Check licenses
uses: emdgroup/mtrust-urp/.github/actions/check-dart-licenses@main
with:
directory: example
directory: example/example

build_advanced_example:
name: Build Advanced Example
needs: validate_pr
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Dart
uses: dart-lang/setup-dart@v1

- name: Prepare Flutter
uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main
with:
directory: example/example_advanced

- name: Run static analysis
run: |
cd example/example_advanced
flutter analyze --no-fatal-warnings
shell: bash

- name: Check licenses
uses: emdgroup/mtrust-urp/.github/actions/check-dart-licenses@main
with:
directory: example/example_advanced

build_library:
name: Build Library
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 1.0.0-2 (2024-11-18)

## 1.0.0-1 (2024-11-18)

### [1.0.0-0](1.0.0-0) (2024-11-18)

### [0.3.2](v0.3.1...v0.3.2) (2024-11-12)
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ To display the IMP Sheet, utilize the `ImpSheet` widget. It requires a connectio

```

## Use ImpReader to build custom workflows

To build custom workflows, utilize the `ImpReader` class. It requires a connection strategy to handle the connection between the device and the reader.

```dart
final reader = ImpReader(
connectionStrategy: _connectionStrategy,
);
```

With the `ImpReader` you can access all methods required to build workflows that meet your specific requirements. Please refer to the `example_advanced` for an example on how to build custom workflows.

## Configuration Options
- **Connection Strategies:** While BLE is the default, IMP-Kit supports various connection strategies. Ensure you include and configure the appropriate strategy package as needed.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 24 additions & 24 deletions example/pubspec.lock → example/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.11.0"
better_log:
dependency: transitive
description:
name: better_log
sha256: "8bbafaf5740568710081c4778656d5e554f72cb2aae793e8ebf969d5a4d7c54a"
url: "https://merckgroup.jfrog.io/artifactory/api/pub/dice-mtrust-pub-dev-local/"
source: hosted
version: "1.0.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -265,8 +257,8 @@ packages:
dependency: "direct main"
description:
name: liquid_flutter
sha256: "5978f5eb60e44e098a64aa97d14e06c5a743cac448b66feb82fdc660745bcd8f"
url: "https://merckgroup.jfrog.io/artifactory/api/pub/dice-mtrust-pub-dev-local/"
sha256: "2a7f05e1849a435af3c04c48c574a6aa8cd5439ef54ba0b5a7a5f6de089919b0"
url: "https://pub.dev"
source: hosted
version: "15.3.2"
logger:
Expand Down Expand Up @@ -317,45 +309,53 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.15.0"
mtrust_better_log:
dependency: transitive
description:
name: mtrust_better_log
sha256: b922a50326c3855ef366c46cfef36df6b58cf683f0e937c32f4064316aa70101
url: "https://pub.dev"
source: hosted
version: "1.0.0"
mtrust_imp_kit:
dependency: "direct main"
description:
path: ".."
path: "../.."
relative: true
source: path
version: "0.1.4"
version: "1.0.0-2"
mtrust_urp_ble_strategy:
dependency: "direct main"
description:
name: mtrust_urp_ble_strategy
sha256: ddd9da8eab71a261cc2195a26d8b6262c5c0960070c8cd2718b70bf450343dce
url: "https://merckgroup.jfrog.io/artifactory/api/pub/dice-mtrust-pub-dev-local/"
sha256: d872e089ce05b7c10bd4a3884efa734f3e29695d3c6111b46fa7b8acc083cc44
url: "https://pub.dev"
source: hosted
version: "8.0.0"
version: "8.0.1"
mtrust_urp_core:
dependency: transitive
description:
name: mtrust_urp_core
sha256: cc596cfe7d7355813f56517ed25dc27e8bc4e8f29e4d868dd15e3d2196d7164e
url: "https://merckgroup.jfrog.io/artifactory/api/pub/dice-mtrust-pub-dev-local/"
sha256: bc8d19183262e0d52c1139b3cb8a369594687876f5365a2106efa0cad082b286
url: "https://pub.dev"
source: hosted
version: "8.0.0"
version: "8.0.1"
mtrust_urp_types:
dependency: transitive
description:
name: mtrust_urp_types
sha256: "722c3dff485cc1546df806cfa8f278a2d56dc44ff51750ecb18af948213a185d"
url: "https://merckgroup.jfrog.io/artifactory/api/pub/dice-mtrust-pub-dev-local/"
sha256: "65478d9c303a67638e9613d784bd2434240dbfcfc6c6c41c1584b9d77fd07d6b"
url: "https://pub.dev"
source: hosted
version: "4.0.3"
version: "4.1.0"
mtrust_urp_ui:
dependency: transitive
description:
name: mtrust_urp_ui
sha256: "2a879d4bc65e513d49d8a7fe724ae4837d8a18fa60c6b383b843057d3a41bd95"
url: "https://merckgroup.jfrog.io/artifactory/api/pub/dice-mtrust-pub-dev-local/"
sha256: "7032a751b6edee69143e8feab69eedf7f942acb7ee51714e982ed9b673fcb4eb"
url: "https://pub.dev"
source: hosted
version: "8.0.0"
version: "8.0.1"
multi_split_view:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml → example/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: example
description: "A new Flutter project."
description: "Example showcasing the use of ImpSheet (predefined workflow)."
publish_to: "none"
version: 0.1.0

Expand All @@ -10,7 +10,7 @@ dependencies:
flutter:
sdk: flutter
mtrust_imp_kit:
path: ../
path: ../../
mtrust_urp_ble_strategy: ^8.0.1
liquid_flutter: ^15.3.2

Expand Down
43 changes: 43 additions & 0 deletions example/example_advanced/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
36 changes: 36 additions & 0 deletions example/example_advanced/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "abb292a07e20d696c4568099f918f6c5f330e6b0"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
- platform: android
create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
- platform: ios
create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
- platform: web
create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
3 changes: 3 additions & 0 deletions example/example_advanced/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# example

A new Flutter project.
1 change: 1 addition & 0 deletions example/example_advanced/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include: package:flutter_lints/flutter.yaml
13 changes: 13 additions & 0 deletions example/example_advanced/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
Loading
Loading