Skip to content

Commit 2c1f274

Browse files
Merge pull request #67 from qonversion/release/3.0.0
Release/3.0.0
2 parents 08f3ca8 + ad437be commit 2c1f274

27 files changed

+326
-355
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.0
2+
* Add null safety support
3+
* Increase min Dart SDK version to 2.12.0
4+
15
## 2.5.2
26
* SKProduct issue fix
37
* Unfinished transactions fix

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.qonversion.flutter.sdk.qonversion_flutter_sdk'
2-
version '2.4.2'
2+
version '3.0.0'
33

44
buildscript {
55
ext.kotlin_version = '1.3.50'

ios/qonversion_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'qonversion_flutter'
7-
s.version = '2.4.3'
7+
s.version = '3.0.0'
88
s.summary = 'Flutter Qonversion SDK'
99
s.description = <<-DESC
1010
Powerful yet simple subscription analytics

lib/src/models/eligibility.g.dart

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

lib/src/models/launch_result.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class QLaunchResult {
1717
name: 'timestamp',
1818
fromJson: QMapper.dateTimeFromSecondsTimestamp,
1919
)
20-
final DateTime date;
20+
final DateTime? date;
2121

2222
/// All products
2323
@JsonKey(

lib/src/models/launch_result.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/models/offerings.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:collection/collection.dart' show IterableExtension;
12
import 'package:json_annotation/json_annotation.dart';
23
import 'package:qonversion_flutter/qonversion_flutter.dart';
34

@@ -13,16 +14,15 @@ enum QOfferingTag {
1314
@JsonSerializable(createToJson: false)
1415
class QOfferings {
1516
@JsonKey(name: 'main')
16-
final QOffering main;
17+
final QOffering? main;
1718

1819
@JsonKey(name: 'available_offerings')
1920
final List<QOffering> availableOfferings;
2021

2122
const QOfferings(this.main, this.availableOfferings);
2223

23-
QOffering offeringForIdentifier(String id) => availableOfferings.firstWhere(
24+
QOffering? offeringForIdentifier(String id) => availableOfferings.firstWhereOrNull(
2425
(element) => element.id == id,
25-
orElse: () => null,
2626
);
2727

2828
factory QOfferings.fromJson(Map<String, dynamic> json) =>
@@ -42,9 +42,8 @@ class QOffering {
4242

4343
const QOffering(this.id, this.tag, this.products);
4444

45-
QProduct productForIdentifier(String id) => products.firstWhere(
45+
QProduct? productForIdentifier(String id) => products.firstWhereOrNull(
4646
(element) => element.qonversionId == id,
47-
orElse: () => null,
4847
);
4948

5049
factory QOffering.fromJson(Map<String, dynamic> json) =>

lib/src/models/offerings.g.dart

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

lib/src/models/permission.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class QPermission {
3030
name: 'started_timestamp',
3131
fromJson: QMapper.dateTimeFromSecondsTimestamp,
3232
)
33-
final DateTime startedDate;
33+
final DateTime? startedDate;
3434

3535
/// Expiration date for subscription
3636
@JsonKey(
3737
name: 'expiration_timestamp',
3838
fromJson: QMapper.dateTimeFromSecondsTimestamp,
3939
)
40-
final DateTime expirationDate;
40+
final DateTime? expirationDate;
4141

4242
/// Use for checking permission for current user.
4343
/// Pay attention, isActive == true does not mean that subscription is renewable.

lib/src/models/permission.g.dart

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

0 commit comments

Comments
 (0)