Skip to content

Commit

Permalink
Update docs for constructor + add nullable params
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasyishak committed Oct 27, 2023
1 parent 75a2d3f commit 08a9402
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions pkgs/unified_analytics/lib/src/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,30 +237,33 @@ final class Event {
};

/// Event that is emitted from the flutter tool when a build invocation
/// has been run by the user
/// has been run by the user.
///
/// [label] -
/// [label] - the identifier for that build event.
///
/// [buildType] -
/// [buildType] - the identifier for which platform the build event was for,
/// examples include "ios", "gradle", and "web".
///
/// [command] -
/// [command] - the command that was ran to kick off the build event.
///
/// [settings] -
/// [settings] - the settings used for the build event related to
/// configuration and other relevant build information.
///
/// [error] -
/// [error] - short identifier used to explain the cause of the build error,
/// stacktraces should not be passed to this parameter.
Event.flutterBuildInfo({
required String label,
required String buildType,
required String command,
required String settings,
required String error,
String? command,
String? settings,
String? error,
}) : eventName = DashEvent.flutterBuildInfo,
eventData = {
'label': label,
'buildType': buildType,
'command': command,
'settings': settings,
'error': error,
if (command != null) 'command': command,
if (settings != null) 'settings': settings,
if (error != null) 'error': error,
};

Event.hotReloadTime({required int timeMs})
Expand Down

0 comments on commit 08a9402

Please sign in to comment.