Skip to content

Commit

Permalink
Add app review
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbengtsson committed Sep 2, 2024
1 parent 698f7d2 commit 4a87305
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion appdmg.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"x": 100,
"y": 100,
"type": "file",
"path": "build/airdashmac.app"
"path": "build/Airdash156.app"
}
]
}
8 changes: 8 additions & 0 deletions lib/transfer/connector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4a87305

Please sign in to comment.