Skip to content

Commit 82946ac

Browse files
authored
Merge pull request #53 from flagship-io/fixBetaSdkVersionAndBuild
Fix beta sdk version and build
2 parents c80f9e4 + 34bd8fd commit 82946ac

File tree

16 files changed

+55
-18
lines changed

16 files changed

+55
-18
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
flutter-version: ${{ matrix.flutter }}
3838
- run: flutter pub get
3939
working-directory: example
40-
- run: flutter build apk --debug
40+
- run: flutter build apk --debug -v
4141
working-directory: example
4242
- name: Archive FlagshipQA APK
4343
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2+
# 4.1.1-beta - 24/06/2025
3+
4+
### Fix
5+
- Add information in visitor context: 'fs_users', 'fs_client', 'fs_version'.
6+
17
# 4.1.0-beta - 07/04/2025
28
### Added
39

example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ flutter {
6060

6161
dependencies {
6262
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63+
6364
}

example/android/gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
org.gradle.jvmargs=-Xmx1536M
21
android.useAndroidX=true
32
android.enableJetifier=true
3+
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8
4+
kotlin.daemon.jvm.options=-Xmx2048m

example/lib/Providers/fs_data.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
66

77
class FSData extends ChangeNotifier {
88
// Apikey
9-
String _apiKey = "--"; //
9+
String _apiKey = "DxAcxlnRB9yFBZYtLDue1q01dcXZCw6aM49CQB23"; //
1010
// EnvId
1111
String _envId = "bkk9glocmjcg0vtmdlng"; //
1212
// Mode

example/lib/widgets/subWidget/item.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class _ItemState extends State<ItemHit> {
7272
itemEvent.price = double.tryParse(_textControllerPrice.text) ?? 0;
7373
itemEvent.quantity = int.tryParse(_textControllerQuantity.text) ?? 1;
7474
itemEvent.category = _textControllerCategory.text;
75-
75+
itemEvent.location = "itemScreen";
7676
print(itemEvent);
7777

7878
var text = "Item sent";

example/lib/widgets/subWidget/transaction.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class _TransactionState extends State<TransactionHit> {
101101
transacEvent.paymentMethod = _textControllerPaymentMethod.text;
102102
transacEvent.shippingMethod = _textControllerShippingMethod.text;
103103
transacEvent.itemCount = int.tryParse(_textControllerItemCount.text) ?? 0;
104+
transacEvent.location = "screen_transac";
104105

105106
print(transacEvent);
106107

lib/flagshipContext/flagship_context.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,17 @@ enum FlagshipContext {
5959
APP_VERSION_CODE, // = "sdk_versionCode"
6060

6161
/// Version FlagShip
62+
@Deprecated('Use .FS_VERSION')
6263
FLAGSHIP_VERSION, // = "sdk_fsVersion"
6364

65+
/// Version FlagShip
66+
FS_VERSION, // = "fs_Version"
67+
6468
/// Name of the interface
6569
INTERFACE_NAME, // = "sdk_interfaceName"
70+
71+
/// Client
72+
FS_CLIENT, // fs_client
6673
}
6774

6875
// Get the key for the relative context
@@ -129,6 +136,12 @@ String rawValue(FlagshipContext type) {
129136
case FlagshipContext.INTERFACE_NAME:
130137
ret = "sdk_interfaceName";
131138
break;
139+
case FlagshipContext.FS_VERSION:
140+
ret = "fs_version";
141+
break;
142+
case FlagshipContext.FS_CLIENT:
143+
ret = "fs_client";
144+
break;
132145
}
133146
return ret;
134147
}

lib/flagshipContext/flagship_context_manager.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ class FlagshipContextManager {
3030
case FlagshipContext.OS_VERSION_CODE:
3131
return FSDevice.getSystemVersion();
3232
case FlagshipContext.FLAGSHIP_VERSION:
33+
case FlagshipContext.FS_VERSION:
3334
return FlagshipVersion;
34-
// Set by the client
35+
case FlagshipContext.FS_CLIENT:
36+
return "flutter";
3537
case FlagshipContext.LOCATION_CITY:
3638
case FlagshipContext.LOCATION_REGION:
3739
case FlagshipContext.LOCATION_COUNTRY:
@@ -70,6 +72,8 @@ class FlagshipContextManager {
7072
case FlagshipContext.FLAGSHIP_VERSION:
7173
case FlagshipContext.INTERFACE_NAME:
7274
case FlagshipContext.IP:
75+
case FlagshipContext.FS_VERSION:
76+
case FlagshipContext.FS_CLIENT:
7377
return (value is String);
7478
// double
7579
case FlagshipContext.LOCATION_LAT:

lib/flagship_version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/// This file is automatically updated
2-
const FlagshipVersion = "4.1.0";
2+
const FlagshipVersion = "4.1.1-beta";

0 commit comments

Comments
 (0)