Skip to content

Commit 45b458c

Browse files
committed
style: misc
1 parent 0b0feb6 commit 45b458c

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

lib/src/models/feed/feed_item_action.dart

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ Map<String, dynamic> feedItemActionToJson(FeedItemAction action) {
5959
/// {@endtemplate}
6060
@JsonSerializable()
6161
class OpenInternalContent extends FeedItemAction {
62-
63-
/// Factory method to create an [OpenInternalContent] instance from a JSON map.
64-
factory OpenInternalContent.fromJson(Map<String, dynamic> json) =>
65-
_$OpenInternalContentFromJson(json);
6662
/// {@macro open_internal_content}
6763
const OpenInternalContent({
6864
required this.contentId,
6965
required this.contentType,
7066
}) : type = 'open_internal_content';
7167

68+
/// Factory method to create an [OpenInternalContent] instance from a JSON map.
69+
factory OpenInternalContent.fromJson(Map<String, dynamic> json) =>
70+
_$OpenInternalContentFromJson(json);
71+
7272
/// A string representation of the action type.
7373
@JsonKey(name: 'type', required: true)
7474
final String type;
@@ -88,18 +88,18 @@ class OpenInternalContent extends FeedItemAction {
8888
/// {@endtemplate}
8989
@JsonSerializable()
9090
class ShowInterstitialThenOpenInternalContent extends FeedItemAction {
91+
/// {@macro show_interstitial_then_open_internal_content}
92+
const ShowInterstitialThenOpenInternalContent({
93+
required this.contentId,
94+
required this.contentType,
95+
}) : type = 'show_interstitial_then_open_internal_content';
9196

9297
/// Factory method to create a [ShowInterstitialThenOpenInternalContent]
9398
/// instance from a JSON map.
9499
factory ShowInterstitialThenOpenInternalContent.fromJson(
95100
Map<String, dynamic> json,
96101
) =>
97102
_$ShowInterstitialThenOpenInternalContentFromJson(json);
98-
/// {@macro show_interstitial_then_open_internal_content}
99-
const ShowInterstitialThenOpenInternalContent({
100-
required this.contentId,
101-
required this.contentType,
102-
}) : type = 'show_interstitial_then_open_internal_content';
103103

104104
/// A string representation of the action type.
105105
@JsonKey(name: 'type', required: true)
@@ -121,12 +121,12 @@ class ShowInterstitialThenOpenInternalContent extends FeedItemAction {
121121
/// {@endtemplate}
122122
@JsonSerializable()
123123
class OpenExternalUrl extends FeedItemAction {
124+
/// {@macro open_external_url}
125+
const OpenExternalUrl({required this.url}) : type = 'open_external_url';
124126

125127
/// Factory method to create an [OpenExternalUrl] instance from a JSON map.
126128
factory OpenExternalUrl.fromJson(Map<String, dynamic> json) =>
127129
_$OpenExternalUrlFromJson(json);
128-
/// {@macro open_external_url}
129-
const OpenExternalUrl({required this.url}) : type = 'open_external_url';
130130

131131
/// A string representation of the action type.
132132
@JsonKey(name: 'type', required: true)

test/src/models/feed/ad_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import 'package:ht_shared/src/models/feed/ad.dart';
21
import 'package:ht_shared/src/models/content_type.dart';
2+
import 'package:ht_shared/src/models/feed/ad.dart';
33
import 'package:ht_shared/src/models/feed/ad_placement.dart';
44
import 'package:ht_shared/src/models/feed/feed_item_action.dart';
55
import 'package:test/test.dart';

test/src/models/feed/feed_item_test.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
import 'package:ht_shared/ht_shared.dart';
2-
import 'package:ht_shared/src/models/feed/ad.dart';
3-
import 'package:ht_shared/src/models/feed/ad_placement.dart';
4-
import 'package:ht_shared/src/models/feed/engagement_content.dart';
5-
import 'package:ht_shared/src/models/feed/engagement_content_type.dart';
6-
import 'package:ht_shared/src/models/feed/feed_item.dart';
72
import 'package:ht_shared/src/models/feed/feed_item_action.dart';
8-
import 'package:ht_shared/src/models/feed/source_type.dart';
9-
import 'package:ht_shared/src/models/feed/suggested_content.dart';
10-
import 'package:ht_shared/src/models/feed/suggested_content_display_type.dart';
11-
import 'package:ht_shared/src/models/news/category.dart';
12-
import 'package:ht_shared/src/models/news/country.dart';
13-
import 'package:ht_shared/src/models/news/headline.dart';
14-
import 'package:ht_shared/src/models/news/source.dart';
153
import 'package:test/test.dart';
164

175
void main() {

0 commit comments

Comments
 (0)