@@ -59,6 +59,10 @@ Map<String, dynamic> feedItemActionToJson(FeedItemAction action) {
5959/// {@endtemplate}
6060@JsonSerializable ()
6161class 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);
6266 /// {@macro open_internal_content}
6367 const OpenInternalContent ({
6468 required this .contentId,
@@ -69,10 +73,6 @@ class OpenInternalContent extends FeedItemAction {
6973 @JsonKey (name: 'type' , required : true )
7074 final String type;
7175
72- /// Factory method to create an [OpenInternalContent] instance from a JSON map.
73- factory OpenInternalContent .fromJson (Map <String , dynamic > json) =>
74- _$OpenInternalContentFromJson (json);
75-
7676 /// The unique identifier of the internal content to open.
7777 final String contentId;
7878
@@ -88,6 +88,13 @@ class OpenInternalContent extends FeedItemAction {
8888/// {@endtemplate}
8989@JsonSerializable ()
9090class ShowInterstitialThenOpenInternalContent extends FeedItemAction {
91+
92+ /// Factory method to create a [ShowInterstitialThenOpenInternalContent]
93+ /// instance from a JSON map.
94+ factory ShowInterstitialThenOpenInternalContent .fromJson (
95+ Map <String , dynamic > json,
96+ ) =>
97+ _$ShowInterstitialThenOpenInternalContentFromJson (json);
9198 /// {@macro show_interstitial_then_open_internal_content}
9299 const ShowInterstitialThenOpenInternalContent ({
93100 required this .contentId,
@@ -98,13 +105,6 @@ class ShowInterstitialThenOpenInternalContent extends FeedItemAction {
98105 @JsonKey (name: 'type' , required : true )
99106 final String type;
100107
101- /// Factory method to create a [ShowInterstitialThenOpenInternalContent]
102- /// instance from a JSON map.
103- factory ShowInterstitialThenOpenInternalContent .fromJson (
104- Map <String , dynamic > json,
105- ) =>
106- _$ShowInterstitialThenOpenInternalContentFromJson (json);
107-
108108 /// The unique identifier of the internal content to open after the interstitial.
109109 final String contentId;
110110
@@ -121,17 +121,17 @@ class ShowInterstitialThenOpenInternalContent extends FeedItemAction {
121121/// {@endtemplate}
122122@JsonSerializable ()
123123class OpenExternalUrl extends FeedItemAction {
124+
125+ /// Factory method to create an [OpenExternalUrl] instance from a JSON map.
126+ factory OpenExternalUrl .fromJson (Map <String , dynamic > json) =>
127+ _$OpenExternalUrlFromJson (json);
124128 /// {@macro open_external_url}
125129 const OpenExternalUrl ({required this .url}) : type = 'open_external_url' ;
126130
127131 /// A string representation of the action type.
128132 @JsonKey (name: 'type' , required : true )
129133 final String type;
130134
131- /// Factory method to create an [OpenExternalUrl] instance from a JSON map.
132- factory OpenExternalUrl .fromJson (Map <String , dynamic > json) =>
133- _$OpenExternalUrlFromJson (json);
134-
135135 /// The URL to open.
136136 final String url;
137137
0 commit comments