Skip to content

Commit 3d42c58

Browse files
committed
fix: commented out constructors params
1 parent 4d69206 commit 3d42c58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+431
-430
lines changed

lib/src/models/feed/ad.dart

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ class Ad extends FeedItem {
3535
required this.imageUrl,
3636
required this.targetUrl,
3737
required this.adType,
38-
required super.action, // Add action to constructor, this.placement,
38+
required super.action,
39+
this.placement,
3940
String? id,
40-
}) : id = id ?? const Uuid().v4(),
41-
super(type: 'ad');
41+
}) : id = id ?? const Uuid().v4(),
42+
super(type: 'ad');
4243

4344
/// Factory method to create an [Ad] instance from a JSON map.
4445
factory Ad.fromJson(Map<String, dynamic> json) => _$AdFromJson(json);
@@ -70,14 +71,14 @@ class Ad extends FeedItem {
7071

7172
@override
7273
List<Object?> get props => [
73-
id,
74-
imageUrl,
75-
targetUrl,
76-
adType,
77-
placement,
78-
type,
79-
action,
80-
];
74+
id,
75+
imageUrl,
76+
targetUrl,
77+
adType,
78+
placement,
79+
type,
80+
action,
81+
];
8182

8283
/// Creates a new [Ad] with updated properties.
8384
/// Use this to modify an [Ad] without changing the original instance.

lib/src/models/feed/ad.g.dart

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/models/feed/engagement_content.dart

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ class EngagementContent extends FeedItem {
2020
EngagementContent({
2121
required this.title,
2222
required this.engagementContentType,
23-
required super.action, // Add action to constructor, this.description,
23+
required super.action,
24+
this.description,
2425
this.callToActionText,
2526
this.callToActionUrl,
2627
String? id,
27-
}) : id = id ?? const Uuid().v4(),
28-
super(type: 'engagement_content');
28+
}) : id = id ?? const Uuid().v4(),
29+
super(type: 'engagement_content');
2930

3031
/// Factory method to create an [EngagementContent] instance from a JSON map.
3132
factory EngagementContent.fromJson(Map<String, dynamic> json) =>
@@ -60,15 +61,15 @@ class EngagementContent extends FeedItem {
6061

6162
@override
6263
List<Object?> get props => [
63-
id,
64-
title,
65-
description,
66-
engagementContentType,
67-
callToActionText,
68-
callToActionUrl,
69-
type,
70-
action,
71-
];
64+
id,
65+
title,
66+
description,
67+
engagementContentType,
68+
callToActionText,
69+
callToActionUrl,
70+
type,
71+
action,
72+
];
7273

7374
/// Creates a new [EngagementContent] with updated properties.
7475
/// Use this to modify an [EngagementContent] without changing the original

lib/src/models/feed/engagement_content.g.dart

Lines changed: 14 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/models/feed/feed_item_action.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ class ShowInterstitialThenOpenInternalContent extends FeedItemAction {
9494
/// instance from a JSON map.
9595
factory ShowInterstitialThenOpenInternalContent.fromJson(
9696
Map<String, dynamic> json,
97-
) => _$ShowInterstitialThenOpenInternalContentFromJson(json);
97+
) =>
98+
_$ShowInterstitialThenOpenInternalContentFromJson(json);
9899

99100
/// The unique identifier of the internal content to open after the interstitial.
100101
final String contentId;

lib/src/models/feed/feed_item_action.g.dart

Lines changed: 22 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/models/feed/suggested_content.dart

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
import 'package:ht_shared/ht_shared.dart' show Category, Country, Headline, Source;
1+
import 'package:ht_shared/ht_shared.dart'
2+
show Category, Country, Headline, Source;
23
import 'package:ht_shared/src/models/feed/feed_item.dart';
34
import 'package:ht_shared/src/models/feed/feed_item_action.dart'
45
show FeedItemAction, feedItemActionFromJson, feedItemActionToJson;
56
import 'package:ht_shared/src/models/feed/suggested_content_display_type.dart';
6-
import 'package:ht_shared/src/models/models.dart' show Category, Country, Headline, Source;
7-
import 'package:ht_shared/src/models/news/news.dart' show Category, Country, Headline, Source;
7+
import 'package:ht_shared/src/models/models.dart'
8+
show Category, Country, Headline, Source;
9+
import 'package:ht_shared/src/models/news/news.dart'
10+
show Category, Country, Headline, Source;
811
import 'package:json_annotation/json_annotation.dart';
912
import 'package:uuid/uuid.dart';
1013

@@ -24,11 +27,12 @@ class SuggestedContent extends FeedItem {
2427
SuggestedContent({
2528
required this.displayType,
2629
required this.items,
27-
required super.action, // Add action to constructor, this.title,
30+
required super.action,
31+
this.title,
2832
this.description,
2933
String? id,
30-
}) : id = id ?? const Uuid().v4(),
31-
super(type: 'suggested_content');
34+
}) : id = id ?? const Uuid().v4(),
35+
super(type: 'suggested_content');
3236

3337
/// Factory method to create a [SuggestedContent] instance from a JSON map.
3438
///
@@ -64,14 +68,14 @@ class SuggestedContent extends FeedItem {
6468

6569
@override
6670
List<Object?> get props => [
67-
id,
68-
title,
69-
description,
70-
displayType,
71-
items,
72-
type,
73-
action,
74-
];
71+
id,
72+
title,
73+
description,
74+
displayType,
75+
items,
76+
type,
77+
action,
78+
];
7579

7680
/// Creates a new [SuggestedContent] with updated properties.
7781
/// Use this to modify a [SuggestedContent] without changing the original

lib/src/models/feed/suggested_content.g.dart

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/models/feed/suggested_content_display_type.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:ht_shared/ht_shared.dart' show SuggestedContent;
22
import 'package:ht_shared/src/models/feed/feed.dart' show SuggestedContent;
3-
import 'package:ht_shared/src/models/feed/suggested_content.dart' show SuggestedContent;
3+
import 'package:ht_shared/src/models/feed/suggested_content.dart'
4+
show SuggestedContent;
45
import 'package:ht_shared/src/models/models.dart' show SuggestedContent;
56
import 'package:json_annotation/json_annotation.dart';
67

lib/src/models/news/category.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ class Category extends FeedItem {
2121
/// If an [id] is not provided, a UUID v4 will be generated.
2222
Category({
2323
required this.name,
24-
required super.action, // Add action to constructor, String? id,
24+
required super.action,
25+
String? id,
2526
this.description,
2627
this.iconUrl,
27-
}) : id = id ?? const Uuid().v4(),
28-
super(type: 'category');
28+
}) : id = id ?? const Uuid().v4(),
29+
super(type: 'category');
2930

3031
/// Creates a Category instance from a JSON map.
3132
factory Category.fromJson(Map<String, dynamic> json) =>

0 commit comments

Comments
 (0)