Skip to content

Commit 2aaa231

Browse files
authored
Merge pull request #2 from blinkcard/release/v2.4.0
Release/v2.4.0
2 parents b4dc186 + e85cfdc commit 2aaa231

24 files changed

+325
-257
lines changed

BlinkCard/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
}
3535

3636
dependencies {
37-
implementation('com.microblink:blinkcard:2.3.0@aar') {
37+
implementation('com.microblink:blinkcard:2.4.0@aar') {
3838
transitive = true
3939
}
4040
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.microblink.blinkcard.flutter">
3+
4+
<application>
5+
6+
<activity
7+
android:name="com.microblink.blinkcard.activity.BlinkCardActivity"
8+
android:noHistory="true"/>
9+
10+
</application>
311
</manifest>

BlinkCard/ios/Classes/MicroblinkModule/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
#import "MBBlinkCardOverlaySettingsSerialization.h"
9+
#import "MBOverlaySerializationUtils.h"
910

1011
@interface MBCBlinkCardOverlaySettingsSerialization ()
1112

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

3436
{
3537
id glareMessage = [jsonOverlaySettings valueForKey:@"glareMessage"];

BlinkCard/ios/blinkcard_flutter.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'blinkcard_flutter'
7-
s.version = '2.3.0'
7+
s.version = '2.4.0'
88
s.summary = 'Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards.'
99
s.description = <<-DESC
1010
Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards.
@@ -18,7 +18,7 @@ Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards.
1818
s.dependency 'Flutter'
1919
s.platform = :ios, '9.0'
2020

21-
s.dependency 'MBBlinkCard', '~> 2.3.0'
21+
s.dependency 'MBBlinkCard', '~> 2.4.0'
2222

2323
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
2424
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }

BlinkCard/lib/microblink_scanner.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MicroblinkScanner {
3434
})
3535
);
3636

37-
if (jsonResults == null) return List<RecognizerResult>(0);
37+
if (jsonResults == null) return List.empty();
3838

3939
var results = [];
4040
for (int i = 0; i < jsonResults.length; ++i) {

BlinkCard/lib/overlay_settings.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,26 @@ part 'overlay_settings.g.dart';
66
/// Base class for all overlay settings objects
77
@JsonSerializable()
88
class OverlaySettings {
9+
/// type of the overlay settings object
10+
String? overlaySettingsType;
911

10-
/// type of the overlay settings object
11-
String overlaySettingsType;
12-
13-
/// whether front camera should be used instead of the default camera
12+
/// whether front camera should be used instead of the default camera
13+
/// false by default
1414
bool useFrontCamera = false;
1515

16-
/// whether beep sound will be played on successful scan
16+
/// whether beep sound will be played on successful scan
17+
/// false by default
1718
bool enableBeep = false;
1819

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

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

27-
OverlaySettings(String overlaySettingsType) {
28-
this.overlaySettingsType = overlaySettingsType;
29-
}
28+
OverlaySettings(this.overlaySettingsType);
3029

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

BlinkCard/lib/overlay_settings.g.dart

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BlinkCard/lib/overlays/blinkcard_overlays.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ class BlinkCardOverlaySettings extends OverlaySettings {
1010
/// String: user instructions that are shown above camera preview while the first side of the
1111
/// document is being scanned.
1212
/// If null, default value will be used.
13-
String firstSideInstructions;
13+
String? firstSideInstructions;
1414

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

2020
/// Defines whether glare warning will be displayed when user turn on a flashlight
2121
/// Default true
22-
bool showFlashlightWarning;
22+
bool showFlashlightWarning = true;
2323

2424
BlinkCardOverlaySettings(): super('BlinkCardOverlaySettings');
2525

BlinkCard/lib/overlays/blinkcard_overlays.g.dart

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BlinkCard/lib/recognizer.dart

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ class Recognizer {
1515
/// Type of recognizer
1616
String recognizerType;
1717

18-
Recognizer(String recognizerType) {
19-
this.recognizerType = recognizerType;
20-
}
18+
Recognizer(this.recognizerType);
2119

22-
RecognizerResult createResultFromNative(Map<String, dynamic> nativeResult) {}
20+
RecognizerResult createResultFromNative(Map<String, dynamic> nativeResult) {
21+
return RecognizerResult(nativeResult['resultState']);
22+
}
2323

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

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

48-
RecognizerResult(RecognizerResultState resultState) {
49-
this.resultState = resultState;
50-
}
48+
RecognizerResult(this.resultState);
5149

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

@@ -63,9 +61,7 @@ class RecognizerCollection {
6361

6462
int milisecondsBeforeTimeout = 10000;
6563

66-
RecognizerCollection(List<Recognizer> recognizerArray) {
67-
this.recognizerArray = recognizerArray;
68-
}
64+
RecognizerCollection(this.recognizerArray);
6965

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

0 commit comments

Comments
 (0)