Skip to content

Commit

Permalink
Merge pull request #2 from blinkcard/release/v2.4.0
Browse files Browse the repository at this point in the history
Release/v2.4.0
  • Loading branch information
markosopcic authored Aug 25, 2021
2 parents b4dc186 + e85cfdc commit 2aaa231
Show file tree
Hide file tree
Showing 24 changed files with 325 additions and 257 deletions.
2 changes: 1 addition & 1 deletion BlinkCard/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
}

dependencies {
implementation('com.microblink:blinkcard:2.3.0@aar') {
implementation('com.microblink:blinkcard:2.4.0@aar') {
transitive = true
}
}
8 changes: 8 additions & 0 deletions BlinkCard/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkcard.flutter">

<application>

<activity
android:name="com.microblink.blinkcard.activity.BlinkCardActivity"
android:noHistory="true"/>

</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

#import "MBBlinkCardOverlaySettingsSerialization.h"
#import "MBOverlaySerializationUtils.h"

@interface MBCBlinkCardOverlaySettingsSerialization ()

Expand All @@ -30,6 +31,7 @@ -(MBCOverlayViewController *) createOverlayViewController:(NSDictionary *)jsonOv
MBCBlinkCardOverlaySettings *sett = [[MBCBlinkCardOverlaySettings alloc] init];
self.delegate = delegate;
sett.enableEditScreen = NO;
[MBCOverlaySerializationUtils extractCommonOverlaySettings:jsonOverlaySettings overlaySettings:sett];

{
id glareMessage = [jsonOverlaySettings valueForKey:@"glareMessage"];
Expand Down
4 changes: 2 additions & 2 deletions BlinkCard/ios/blinkcard_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'blinkcard_flutter'
s.version = '2.3.0'
s.version = '2.4.0'
s.summary = 'Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards.'
s.description = <<-DESC
Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards.
Expand All @@ -18,7 +18,7 @@ Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards.
s.dependency 'Flutter'
s.platform = :ios, '9.0'

s.dependency 'MBBlinkCard', '~> 2.3.0'
s.dependency 'MBBlinkCard', '~> 2.4.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
Expand Down
2 changes: 1 addition & 1 deletion BlinkCard/lib/microblink_scanner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MicroblinkScanner {
})
);

if (jsonResults == null) return List<RecognizerResult>(0);
if (jsonResults == null) return List.empty();

var results = [];
for (int i = 0; i < jsonResults.length; ++i) {
Expand Down
19 changes: 9 additions & 10 deletions BlinkCard/lib/overlay_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@ part 'overlay_settings.g.dart';
/// Base class for all overlay settings objects
@JsonSerializable()
class OverlaySettings {
/// type of the overlay settings object
String? overlaySettingsType;

/// type of the overlay settings object
String overlaySettingsType;

/// whether front camera should be used instead of the default camera
/// whether front camera should be used instead of the default camera
/// false by default
bool useFrontCamera = false;

/// whether beep sound will be played on successful scan
/// whether beep sound will be played on successful scan
/// false by default
bool enableBeep = false;

/// (optional) if default overlay contains textual information, text will be localized to this language. Otherwise device langauge will be used
/// example: "en"
String language;
String? language;

/// (optional) to be used with language variable, it defines the country locale
/// example: "US" to use "en_US" on Android and en-US on iOS
String country;
String? country;

OverlaySettings(String overlaySettingsType) {
this.overlaySettingsType = overlaySettingsType;
}
OverlaySettings(this.overlaySettingsType);

factory OverlaySettings.fromJson(Map<String, dynamic> json) => _$OverlaySettingsFromJson(json);

Expand Down
6 changes: 3 additions & 3 deletions BlinkCard/lib/overlay_settings.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions BlinkCard/lib/overlays/blinkcard_overlays.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ class BlinkCardOverlaySettings extends OverlaySettings {
/// String: user instructions that are shown above camera preview while the first side of the
/// document is being scanned.
/// If null, default value will be used.
String firstSideInstructions;
String? firstSideInstructions;

/// String: user instructions that are shown above camera preview while the second side of the
/// document is being scanned.
/// If null, default value will be used.
String flipCardInstructions;
String? flipCardInstructions;

/// Defines whether glare warning will be displayed when user turn on a flashlight
/// Default true
bool showFlashlightWarning;
bool showFlashlightWarning = true;

BlinkCardOverlaySettings(): super('BlinkCardOverlaySettings');

Expand Down
10 changes: 5 additions & 5 deletions BlinkCard/lib/overlays/blinkcard_overlays.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions BlinkCard/lib/recognizer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class Recognizer {
/// Type of recognizer
String recognizerType;

Recognizer(String recognizerType) {
this.recognizerType = recognizerType;
}
Recognizer(this.recognizerType);

RecognizerResult createResultFromNative(Map<String, dynamic> nativeResult) {}
RecognizerResult createResultFromNative(Map<String, dynamic> nativeResult) {
return RecognizerResult(nativeResult['resultState']);
}

factory Recognizer.fromJson(Map<String, dynamic> json) => _$RecognizerFromJson(json);

Expand All @@ -45,9 +45,7 @@ class RecognizerResult {
/// State of the result. It is always one of the values represented by RecognizerResultState enum
RecognizerResultState resultState;

RecognizerResult(RecognizerResultState resultState) {
this.resultState = resultState;
}
RecognizerResult(this.resultState);

factory RecognizerResult.fromJson(Map<String, dynamic> json) => _$RecognizerResultFromJson(json);

Expand All @@ -63,9 +61,7 @@ class RecognizerCollection {

int milisecondsBeforeTimeout = 10000;

RecognizerCollection(List<Recognizer> recognizerArray) {
this.recognizerArray = recognizerArray;
}
RecognizerCollection(this.recognizerArray);

factory RecognizerCollection.fromJson(Map<String, dynamic> json) => _$RecognizerCollectionFromJson(json);

Expand Down
55 changes: 24 additions & 31 deletions BlinkCard/lib/recognizer.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2aaa231

Please sign in to comment.