Skip to content

Commit

Permalink
use named params
Browse files Browse the repository at this point in the history
  • Loading branch information
claude committed Mar 8, 2023
1 parent b6dc26e commit b81778f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/flutter_app_analytics_segment_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import 'package:flutter_segment/flutter_segment.dart';

/// A Segment Provider for Flutter app analytics.
class SegmentProvider implements AnalyticsProvider {
final String _writeKey;
final String? _userId;

SegmentProvider(
this._writeKey,
this._userId,
);
String _writeKey = '';
String? _userId;

SegmentProvider({
required String writeKey,
String? userId,
}) {
_writeKey = writeKey;
_userId = userId;
}
initialize() async {
await Segment.config(
options: SegmentConfig(
Expand Down

0 comments on commit b81778f

Please sign in to comment.