Skip to content

Commit

Permalink
Update Flutter to be compatible with Dart v3 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Oct 9, 2023
1 parent ede5e09 commit 900a871
Show file tree
Hide file tree
Showing 19 changed files with 30 additions and 114 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -596,4 +596,6 @@ lib/generated_plugin_registrant.dart
lib/example/generated_plugin_registrant.dart

# FVM
.fvm/
.fvm/

posthog_flutter.iml
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Next

- Add support to Dart v3.0.0 (#52)[https://github.com/PostHog/posthog-flutter/pull/52]

## 3.1.0

- Adds support for `groups`
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Posthog
Copyright (c) 2020 PostHog

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 2 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
.DS_Store
/build
/captures

/.settings
13 changes: 0 additions & 13 deletions android/.settings/org.eclipse.buildship.core.prefs

This file was deleted.

2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ android {
}

dependencies {
implementation 'com.posthog.android:posthog:2.0.0'
implementation 'com.posthog.android:posthog:2.0.3'
}
}
6 changes: 4 additions & 2 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ MigrationBackup/

# End of https://www.gitignore.io/api/git,dart,flutter,intellij,webstorm,visualstudio


# Web related
lib/generated_plugin_registrant.dart
lib/generated_plugin_registrant.dart

android/.project
android/.settings
28 changes: 0 additions & 28 deletions example/android/.project

This file was deleted.

13 changes: 0 additions & 13 deletions example/android/.settings/org.eclipse.buildship.core.prefs

This file was deleted.

2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 663715e941f9adb426e33bf9376914006f9ea95b

COCOAPODS: 1.11.3
COCOAPODS: 1.13.0
2 changes: 1 addition & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 0 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:posthog_flutter/posthog_flutter.dart';

Expand Down
3 changes: 2 additions & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ publish_to: "none"
version: 0.0.1+1

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'
flutter: '>=1.10.0'

dependencies:
flutter:
Expand Down
9 changes: 4 additions & 5 deletions lib/src/posthog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,16 @@ class Posthog {
Future<void> reloadFeatureFlags() {
return _posthog.reloadFeatureFlags();
}

Future<void> group({
required String groupType,
required String groupKey,
required Map<String, dynamic> groupProperties,
}) {
return _posthog.group(
groupType: groupType,
groupKey: groupKey,
groupProperties: groupProperties
);
groupType: groupType,
groupKey: groupKey,
groupProperties: groupProperties);
}

Posthog._internal();
Expand Down
9 changes: 4 additions & 5 deletions lib/src/posthog_platform_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ abstract class PosthogPlatform {
throw UnimplementedError('reloadFeatureFlags() has not been implemented.');
}

Future<void> group({
required String groupType,
required String groupKey,
Map<String, dynamic>? groupProperties
}) {
Future<void> group(
{required String groupType,
required String groupKey,
Map<String, dynamic>? groupProperties}) {
throw UnimplementedError('group() has not been implemented.');
}
}
20 changes: 0 additions & 20 deletions posthog_flutter.iml

This file was deleted.

5 changes: 2 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: posthog_flutter
description: Flutter implementation of Posthog client for iOS, Android and Web
description: Flutter implementation of PostHog client for iOS, Android and Web
version: 3.1.0
homepage: https://www.posthog.com
repository: https://github.com/posthog/posthog-flutter
issue_tracker: https://github.com/posthog/posthog-flutter/issues
documentation: https://github.com/posthog/posthog-flutter#readme

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'
flutter: '>=1.10.0'

dependencies:
Expand All @@ -16,7 +16,6 @@ dependencies:
flutter_web_plugins:
sdk: flutter


dev_dependencies:
flutter_test:
sdk: flutter
Expand Down
16 changes: 0 additions & 16 deletions test/posthog_flutter_test.dart

This file was deleted.

0 comments on commit 900a871

Please sign in to comment.