@@ -156,15 +156,6 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
156156 appBarTitleText = l10n.detailsPageTitle;
157157 }
158158
159- final description = state.entity is Topic
160- ? (state.entity! as Topic ).description
161- : state.entity is Source
162- ? (state.entity! as Source ).description
163- : state.entity is Country
164- ? (state.entity! as Country )
165- .name // Using name as description for country
166- : null ;
167-
168159 final followButton = IconButton (
169160 icon: Icon (
170161 state.isFollowing ? Icons .check_circle : Icons .add_circle_outline,
@@ -191,28 +182,29 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
191182 children: [
192183 if (entityIconUrl != null )
193184 Padding (
194- padding: const EdgeInsets .only (right: AppSpacing .sm),
185+ padding: Directionality .of (context) == TextDirection .ltr
186+ ? const EdgeInsets .only (right: AppSpacing .md)
187+ : const EdgeInsets .only (left: AppSpacing .md),
195188 child: ClipRRect (
196189 borderRadius: BorderRadius .circular (AppSpacing .xs),
197190 child: Image .network (
198191 entityIconUrl,
199- width: kToolbarHeight - AppSpacing .lg ,
200- height: kToolbarHeight - AppSpacing .lg ,
192+ width: AppSpacing .xxl ,
193+ height: AppSpacing .xxl ,
201194 fit: BoxFit .contain,
202- errorBuilder: (context, error, stackTrace) => Icon (
203- appBarIconData ?? Icons .info_outline,
204- size: kToolbarHeight - AppSpacing .xl,
205- color: colorScheme.onSurfaceVariant,
206- ),
195+ errorBuilder: (context, error, stackTrace) =>
196+ const SizedBox (),
207197 ),
208198 ),
209199 )
210- else if (appBarIconData != null )
200+ else if (state.entity is Source && appBarIconData != null )
211201 Padding (
212- padding: const EdgeInsets .only (right: AppSpacing .sm),
202+ padding: Directionality .of (context) == TextDirection .ltr
203+ ? const EdgeInsets .only (right: AppSpacing .md)
204+ : const EdgeInsets .only (left: AppSpacing .md),
213205 child: Icon (
214206 appBarIconData,
215- size: kToolbarHeight - AppSpacing .xl ,
207+ size: AppSpacing .xxl ,
216208 color: colorScheme.onSurface,
217209 ),
218210 ),
@@ -251,33 +243,6 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
251243 const SizedBox (width: AppSpacing .sm),
252244 ],
253245 ),
254- SliverPadding (
255- padding: const EdgeInsets .all (AppSpacing .paddingMedium),
256- sliver: SliverList (
257- delegate: SliverChildListDelegate ([
258- if (description != null && description.isNotEmpty) ...[
259- Text (
260- description,
261- style: textTheme.bodyLarge? .copyWith (
262- color: colorScheme.onSurfaceVariant,
263- height: 1.5 ,
264- ),
265- ),
266- const SizedBox (height: AppSpacing .lg),
267- ],
268- if (state.feedItems.isNotEmpty ||
269- state.status == EntityDetailsStatus .loadingMore) ...[
270- Text (
271- l10n.headlinesSectionTitle,
272- style: textTheme.titleLarge? .copyWith (
273- fontWeight: FontWeight .bold,
274- ),
275- ),
276- const Divider (height: AppSpacing .lg, thickness: 1 ),
277- ],
278- ]),
279- ),
280- ),
281246 if (state.feedItems.isEmpty &&
282247 state.status != EntityDetailsStatus .initial &&
283248 state.status != EntityDetailsStatus .loadingMore &&
@@ -299,8 +264,10 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
299264 )
300265 else
301266 SliverPadding (
302- padding: const EdgeInsets .symmetric (
303- horizontal: AppSpacing .paddingMedium,
267+ padding: const EdgeInsets .only (
268+ top: AppSpacing .paddingMedium,
269+ left: AppSpacing .paddingMedium,
270+ right: AppSpacing .paddingMedium,
304271 ),
305272 sliver: SliverList .separated (
306273 itemCount:
0 commit comments