@@ -21,17 +21,12 @@ import 'package:ui_kit/ui_kit.dart';
2121
2222class EntityDetailsPageArguments {
2323 const EntityDetailsPageArguments ({
24- this .entityId,
25- this .contentType,
26- this .entity,
27- }) : assert (
28- (entityId != null && contentType != null ) || entity != null ,
29- 'Either entityId/contentType or a full entity object must be provided.' ,
30- );
24+ required this .entityId,
25+ required this .contentType,
26+ });
3127
32- final String ? entityId;
33- final ContentType ? contentType;
34- final FeedItem ? entity;
28+ final String entityId;
29+ final ContentType contentType;
3530}
3631
3732class EntityDetailsPage extends StatelessWidget {
@@ -70,7 +65,6 @@ class EntityDetailsPage extends StatelessWidget {
7065 EntityDetailsLoadRequested (
7166 entityId: args.entityId,
7267 contentType: args.contentType,
73- entity: args.entity,
7468 adThemeStyle: AdThemeStyle .fromTheme (Theme .of (context)),
7569 ),
7670 );
@@ -176,7 +170,6 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
176170 EntityDetailsLoadRequested (
177171 entityId: widget.args.entityId,
178172 contentType: widget.args.contentType,
179- entity: widget.args.entity,
180173 adThemeStyle: AdThemeStyle .fromTheme (theme),
181174 ),
182175 ),
@@ -207,7 +200,8 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
207200 : state.entity is Source
208201 ? (state.entity! as Source ).description
209202 : state.entity is Country
210- ? (state.entity! as Country ).name // Using name as description for country
203+ ? (state.entity! as Country )
204+ .name // Using name as description for country
211205 : null ;
212206
213207 final followButton = IconButton (
@@ -228,8 +222,8 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
228222 final entityIconUrl = (state.entity is Topic )
229223 ? (state.entity! as Topic ).iconUrl
230224 : (state.entity is Country )
231- ? (state.entity! as Country ).flagUrl
232- : null ;
225+ ? (state.entity! as Country ).flagUrl
226+ : null ;
233227
234228 final Widget appBarTitleWidget = Row (
235229 mainAxisSize: MainAxisSize .min,
0 commit comments