Skip to content

Commit

Permalink
added FlutterRoot and changed isEmpty to isNotEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhijeetRanjan308 committed May 15, 2024
1 parent df41440 commit 12c8a3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand Down
4 changes: 2 additions & 2 deletions lib/web/kommunicate_flutter_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class KommunicateFlutterPluginWeb {
}
js.context['loginCallBack'] = loginCallBackFunction;

if (!appId.isEmpty && !userId.isEmpty) {
if (appId.isNotEmpty && userId.isNotEmpty) {
String jsCode = '''
try {
(function(d, m) {
Expand Down Expand Up @@ -143,7 +143,7 @@ class KommunicateFlutterPluginWeb {
}
js.context['loginAsVisitorCallback'] = loginAsVisitorCallBackFunction;

if (!appId.isEmpty) {
if (appId.isNotEmpty) {
String jsCode = '''
try {
(function(d, m) {
Expand Down

0 comments on commit 12c8a3f

Please sign in to comment.