Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.22.4'
flutter-version: '2.0.1'
- run: flutter pub get
- run: flutter test
- run: flutter analyze --no-pub --no-current-package lib
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.0.0
* Add support for null safety

## 1.0.1
* Improve docs

Expand Down
4 changes: 2 additions & 2 deletions example/lib/analytics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import 'package:mixpanel_flutter/mixpanel_flutter.dart';

class MixpanelManager {

static Mixpanel _instance;
static Mixpanel? _instance;

static Future<Mixpanel> init() async {
if (_instance == null) {
_instance = await Mixpanel.init("Your Mixpanel Token",
optOutTrackingDefault: false);
}
return _instance;
return _instance!;
}

}
4 changes: 2 additions & 2 deletions example/lib/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class EventScreen extends StatefulWidget {
}

class _EventScreenState extends State<EventScreen> {
Mixpanel _mixpanel;
late final Mixpanel _mixpanel;

@override
Future<void> initState() {
void initState() {
super.initState();
_initMixpanel();
}
Expand Down
2 changes: 1 addition & 1 deletion example/lib/gdpr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class GDPRScreen extends StatefulWidget {
}

class _GDPRScreenState extends State<GDPRScreen> {
Mixpanel _mixpanel;
late final Mixpanel _mixpanel;

@override
void initState() {
Expand Down
4 changes: 2 additions & 2 deletions example/lib/group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class GroupScreen extends StatefulWidget {
}

class _GroupScreenState extends State<GroupScreen> {
Mixpanel _mixpanel;
MixpanelGroup _mixpanelGroup;
late final Mixpanel _mixpanel;
late final MixpanelGroup _mixpanelGroup;

@override
void initState() {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ProfileScreen extends StatefulWidget {
}

class _ProfileScreenState extends State<ProfileScreen> {
Mixpanel _mixpanel;
late final Mixpanel _mixpanel;

@override
void initState() {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/widget.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

class MixpanelButton extends StatelessWidget {
MixpanelButton({@required this.onPressed, @required this.text});
MixpanelButton({required this.onPressed, required this.text});
final GestureTapCallback onPressed;
final String text;

Expand Down
42 changes: 21 additions & 21 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -56,7 +56,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -73,28 +73,28 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
mixpanel_flutter:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "1.0.0"
version: "2.0.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -106,56 +106,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
sdks:
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.20.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Demonstrates how to use the mixpanel_flutter plugin.
publish_to: 'none'

environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"

dependencies:
flutter:
Expand Down
Loading