diff --git a/example/lib/deviceid_sessionid.dart b/example/lib/deviceid_sessionid.dart index 046068f..866fa8c 100644 --- a/example/lib/deviceid_sessionid.dart +++ b/example/lib/deviceid_sessionid.dart @@ -19,7 +19,7 @@ class _DeviceIdSessionIdState extends State { Row( children: [ FutureBuilder( - future: AppState.of(context).analytics.getDeviceId(), + // future: AppState.of(context).analytics.getDeviceId(), builder: (BuildContext context, AsyncSnapshot snapshot) { return Text(snapshot.data.toString()); }, @@ -33,7 +33,7 @@ class _DeviceIdSessionIdState extends State { ), Row(children: [ FutureBuilder( - future: AppState.of(context).analytics.getSessionId(), + // future: AppState.of(context).analytics.getSessionId(), builder: (BuildContext context, AsyncSnapshot snapshot) { return Text(snapshot.data.toString()); }, diff --git a/example/lib/event_form.dart b/example/lib/event_form.dart index 77a8858..e95d2a4 100644 --- a/example/lib/event_form.dart +++ b/example/lib/event_form.dart @@ -13,7 +13,7 @@ class _EventFormState extends State { void onPress() { AppState.of(context) - ..analytics.logEvent(_controller.text) + // ..analytics.logEvent(_controller.text) ..setMessage('Event sent.'); } diff --git a/example/lib/flush_thresholds_form.dart b/example/lib/flush_thresholds_form.dart index c0191ca..f4a4a1f 100644 --- a/example/lib/flush_thresholds_form.dart +++ b/example/lib/flush_thresholds_form.dart @@ -19,7 +19,7 @@ class _FlushThresholdFormState extends State { if (eventUploadThresholdInput.text.isNotEmpty && value != null) { AppState.of(context) - ..analytics.setEventUploadThreshold(value) + // ..analytics.setEventUploadThreshold(value) ..setMessage('Event upload threshold set.'); } } @@ -29,7 +29,7 @@ class _FlushThresholdFormState extends State { if (eventUploadPeriodMillisInput.text.isNotEmpty && value != null) { AppState.of(context) - ..analytics.setEventUploadPeriodMillis(value) + // ..analytics.setEventUploadPeriodMillis(value) ..setMessage('Event upload period millis set.'); } } diff --git a/example/lib/group_form.dart b/example/lib/group_form.dart index ac671e1..be162bd 100644 --- a/example/lib/group_form.dart +++ b/example/lib/group_form.dart @@ -11,7 +11,7 @@ class _GroupFormState extends State { void onPress() { if (groupType.text.isNotEmpty && groupValue.text.isNotEmpty) { AppState.of(context) - ..analytics.setGroup(groupType.text, groupValue.text) + // ..analytics.setGroup(groupType.text, groupValue.text) ..setMessage('Group set.'); } } diff --git a/example/lib/group_identify_form.dart b/example/lib/group_identify_form.dart index 8d500b4..3870bd9 100644 --- a/example/lib/group_identify_form.dart +++ b/example/lib/group_identify_form.dart @@ -18,7 +18,7 @@ class _GroupIdentifyFormState extends State { ..set(groupPropertyKey.text, groupPropertyValue.text); AppState.of(context) - ..analytics.groupIdentify(groupType.text, groupValue.text, identify) + // ..analytics.groupIdentify(groupType.text, groupValue.text, identify) ..setMessage('Group Identify sent.'); } } diff --git a/example/lib/identify_form.dart b/example/lib/identify_form.dart index 743c637..720a961 100644 --- a/example/lib/identify_form.dart +++ b/example/lib/identify_form.dart @@ -20,7 +20,7 @@ class _IdentifyFormState extends State { } AppState.of(context) - ..analytics.identify(identify) + // ..analytics.identify(identify) ..setMessage('Identify sent.'); } diff --git a/example/lib/my_app.dart b/example/lib/my_app.dart index 654145b..8046907 100644 --- a/example/lib/my_app.dart +++ b/example/lib/my_app.dart @@ -32,35 +32,35 @@ class _MyAppState extends State { void initState() { super.initState(); - analytics = Amplitude.getInstance(instanceName: "project"); - analytics.setUseDynamicConfig(true); - analytics.setServerUrl("https://api2.amplitude.com"); - analytics.init(widget.apiKey); - analytics.enableCoppaControl(); - analytics.setUserId("test_user", startNewSession: true); - analytics.trackingSessionEvents(true); - analytics.setMinTimeBetweenSessionsMillis(5000); - analytics.setEventUploadThreshold(5); - analytics.setEventUploadPeriodMillis(30000); - analytics.setServerZone("US"); - analytics.logEvent('MyApp startup', - eventProperties: {'event_prop_1': 10, 'event_prop_2': true}); - analytics.logEvent('Out of Session Event', outOfSession: true); - analytics.setOptOut(true); - analytics.logEvent('Opt Out Event'); - analytics.setOptOut(false); + // analytics = Amplitude.getInstance(instanceName: "project"); + // analytics.setUseDynamicConfig(true); + // analytics.setServerUrl("https://api2.amplitude.com"); + // analytics.init(widget.apiKey); + // analytics.enableCoppaControl(); + // analytics.setUserId("test_user", startNewSession: true); + // analytics.trackingSessionEvents(true); + // analytics.setMinTimeBetweenSessionsMillis(5000); + // analytics.setEventUploadThreshold(5); + // analytics.setEventUploadPeriodMillis(30000); + // analytics.setServerZone("US"); + // analytics.logEvent('MyApp startup', + // eventProperties: {'event_prop_1': 10, 'event_prop_2': true}); + // analytics.logEvent('Out of Session Event', outOfSession: true); + // analytics.setOptOut(true); + // analytics.logEvent('Opt Out Event'); + // analytics.setOptOut(false); Map userProps = { 'date': '01.06.2020', 'name': 'Name', 'buildNumber': '1.1.1', }; - analytics.logRevenueAmount(21.9); - analytics.setUserProperties(userProps); + // analytics.logRevenueAmount(21.9); + // analytics.setUserProperties(userProps); } Future _flushEvents() async { - await analytics.uploadEvents(); + // await analytics.uploadEvents(); setMessage('Events flushed.'); } diff --git a/example/lib/regenerate_device.dart b/example/lib/regenerate_device.dart index 5585479..dcbf427 100644 --- a/example/lib/regenerate_device.dart +++ b/example/lib/regenerate_device.dart @@ -10,7 +10,7 @@ class RegenerateDeviceBtn extends StatefulWidget { class _DeviceState extends State { void onPress() { AppState.of(context) - ..analytics.regenerateDeviceId() + // ..analytics.regenerateDeviceId() ..setMessage('Regenerate DeviceId.'); } diff --git a/example/lib/revenue_form.dart b/example/lib/revenue_form.dart index d019703..ccf3f2c 100644 --- a/example/lib/revenue_form.dart +++ b/example/lib/revenue_form.dart @@ -18,13 +18,13 @@ class _RevenueFormState extends State { if (productId.text.isNotEmpty && double.tryParse(price.text) != null && int.tryParse(quantity.text) != null) { - AppState.of(context) - ..analytics.logRevenue( - productId.text, - int.tryParse(quantity.text)!, - double.tryParse(price.text)!, - ) - ..setMessage('Revenue Sent.'); + // AppState.of(context) + // // ..analytics.logRevenue( + // productId.text, + // int.tryParse(quantity.text)!, + // double.tryParse(price.text)!, + // ) + // ..setMessage('Revenue Sent.'); } } diff --git a/example/lib/user_id_form.dart b/example/lib/user_id_form.dart index d30ddd5..fc2a4ba 100644 --- a/example/lib/user_id_form.dart +++ b/example/lib/user_id_form.dart @@ -21,7 +21,7 @@ class _UserIdFormState extends State { children: [ Text('Current User Id', style: Theme.of(context).textTheme.headlineSmall), FutureBuilder( - future: AppState.of(context).analytics.getUserId(), + // future: AppState.of(context).analytics.getUserId(), builder: (BuildContext context, AsyncSnapshot snapshot) { return Text(snapshot.data.toString()); }, diff --git a/example/pubspec.lock b/example/pubspec.lock index 46bfb77..2ee6e2b 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -12,10 +12,10 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.10.0" boolean_selector: dependency: transitive description: @@ -28,10 +28,10 @@ packages: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.2.1" clock: dependency: transitive description: @@ -44,10 +44,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.17.0" cupertino_icons: dependency: "direct main" description: @@ -83,42 +83,42 @@ packages: dependency: transitive description: name: js - sha256: a5e201311cb08bf3912ebbe9a2be096e182d703f881136ec1e81a2338a9e120d + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.2.0" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.8.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -128,10 +128,10 @@ packages: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.9.1" stack_trace: dependency: transitive description: @@ -168,10 +168,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.4.16" vector_math: dependency: transitive description: @@ -180,14 +180,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - web: - dependency: transitive - description: - name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 - url: "https://pub.dev" - source: hosted - version: "0.1.4-beta" sdks: - dart: ">=3.1.0-185.0.dev <4.0.0" + dart: ">=2.19.0 <4.0.0" flutter: ">=2.0.0" diff --git a/test/events/base_event_test.dart b/test/events/base_event_test.dart index 09c29c7..d8b648e 100644 --- a/test/events/base_event_test.dart +++ b/test/events/base_event_test.dart @@ -171,7 +171,6 @@ void main() { 'revenue_type': revenueType, 'extra': extra, 'partner_id': partnerId, - 'attempts': attempts, }; expect(event.toMap(), equals(expectedMap)); diff --git a/test/events/event_options_test.dart b/test/events/event_options_test.dart index 32cb277..d5aad5d 100644 --- a/test/events/event_options_test.dart +++ b/test/events/event_options_test.dart @@ -177,7 +177,6 @@ void main() { expect(eventOptions.revenueType, equals(testRevenueType)); expect(eventOptions.extra, equals(testExtra)); expect(eventOptions.partnerId, equals(testPartnerId)); - expect(eventOptions.attempts, equals(testAttempts)); }); }); }