diff --git a/appdmg.json b/appdmg.json index 4d4eff9..d3e1367 100644 --- a/appdmg.json +++ b/appdmg.json @@ -6,7 +6,7 @@ "x": 100, "y": 100, "type": "file", - "path": "build/airdashmac.app" + "path": "build/Airdash156.app" } ] } diff --git a/lib/transfer/connector.dart b/lib/transfer/connector.dart index 53450b8..e68750d 100644 --- a/lib/transfer/connector.dart +++ b/lib/transfer/connector.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:flutter_webrtc/flutter_webrtc.dart'; import 'package:http/http.dart' as http; +import 'package:in_app_review/in_app_review.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:simple_peer/simple_peer.dart'; import 'package:wakelock/wakelock.dart'; @@ -143,6 +144,13 @@ class Connector { ...remoteDeviceProperties(receiver), ...payloadProps, }); + + if (sendError == null) { + await Future.delayed(const Duration(seconds: 2)); + if (await InAppReview.instance.isAvailable()) { + InAppReview.instance.requestReview(); + } + } } } diff --git a/pubspec.lock b/pubspec.lock index a846c72..c562c4b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -447,6 +447,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.2.0" + in_app_review: + dependency: "direct main" + description: + name: in_app_review + sha256: "99869244d09adc76af16bf8fd731dd13cef58ecafd5917847589c49f378cbb30" + url: "https://pub.dev" + source: hosted + version: "2.0.9" + in_app_review_platform_interface: + dependency: transitive + description: + name: in_app_review_platform_interface + sha256: fed2c755f2125caa9ae10495a3c163aa7fab5af3585a9c62ef4a6920c5b45f10 + url: "https://pub.dev" + source: hosted + version: "2.0.5" integration_test: dependency: "direct dev" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 16c1fea..dde116c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: airdash description: Share files anywhere publish_to: "none" -version: 2.0.157+157 +version: 2.0.158+158 environment: sdk: ">=2.17.1 <3.0.0" @@ -37,6 +37,7 @@ dependencies: dbus: ^0.7.8 pasteboard: ^0.2.0 file_selector: ^1.0.3 + in_app_review: ^2.0.9 dev_dependencies: integration_test: