Skip to content

Commit 1b870ee

Browse files
committed
fix(entity_details): update EntityDetailsPageArguments to require entityId and contentType
- Make entityId and contentType required parameters - Remove entity parameter - Simplify the assert statement to only check for non-null entityId and contentType - Update types of entityId and contentType to be non-nullable
1 parent 5f8de6f commit 1b870ee

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

lib/entity_details/view/entity_details_page.dart

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@ import 'package:ui_kit/ui_kit.dart';
2121

2222
class EntityDetailsPageArguments {
2323
const EntityDetailsPageArguments({
24-
this.entityId,
25-
this.contentType,
26-
this.entity,
24+
required this.entityId,
25+
required this.contentType,
2726
}) : assert(
28-
(entityId != null && contentType != null) || entity != null,
29-
'Either entityId/contentType or a full entity object must be provided.',
27+
entityId != null && contentType != null,
28+
'Both entityId and contentType must be provided.',
3029
);
3130

32-
final String? entityId;
33-
final ContentType? contentType;
34-
final FeedItem? entity;
31+
final String entityId;
32+
final ContentType contentType;
3533
}
3634

3735
class EntityDetailsPage extends StatelessWidget {

0 commit comments

Comments
 (0)