Skip to content

Commit

Permalink
Update lib/lints/avoid_late_keyword/models/avoid_late_keyword_paramet…
Browse files Browse the repository at this point in the history
…ers.dart

Co-authored-by: Yurii Prykhodko <[email protected]>
  • Loading branch information
maxxlab and yurii-prykhodko-solid authored Nov 15, 2023
1 parent 8aeeeb2 commit 13b5e61
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ class AvoidLateKeywordParameters {
/// Maximum number of parameters
final bool allowInitialized;

static const _defaultAllowInitialized = false;

/// Constructor for [AvoidLateKeywordParameters] model
const AvoidLateKeywordParameters({
required this.allowInitialized,
this.allowInitialized = false,
});

/// Method for creating from json data
factory AvoidLateKeywordParameters.fromJson(Map<String, Object?> json) =>
AvoidLateKeywordParameters(
allowInitialized: json['allow_initialized'] as bool? ??
_defaultAllowInitialized,
allowInitialized: json['allow_initialized'] as bool?,
);
}

0 comments on commit 13b5e61

Please sign in to comment.