Skip to content

Commit 1c46acf

Browse files
committed
style: format misc
1 parent bdbe9c2 commit 1c46acf

File tree

6 files changed

+30
-41
lines changed

6 files changed

+30
-41
lines changed

lib/account/bloc/account_bloc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ class AccountBloc extends Bloc<AccountEvent, AccountState> {
493493
// Sort followed sources by name ascending
494494
final sortedSources = List<Source>.from(preferences.followedSources)
495495
..sort((a, b) => a.name.compareTo(b.name));
496-
496+
497497
// Sort followed countries by name ascending
498498
final sortedCountries = List<Country>.from(preferences.followedCountries)
499499
..sort((a, b) => a.name.compareTo(b.name));

lib/account/bloc/available_countries_state.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,5 @@ class AvailableCountriesState extends Equatable {
2727
}
2828

2929
@override
30-
List<Object?> get props => [
31-
status,
32-
availableCountries,
33-
error,
34-
];
30+
List<Object?> get props => [status, availableCountries, error];
3531
}

lib/account/view/manage_followed_items/countries/add_country_to_follow_page.dart

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -94,32 +94,29 @@ class AddCountryToFollowPage extends StatelessWidget {
9494
height: AppSpacing.xl + AppSpacing.xs,
9595
child:
9696
Uri.tryParse(country.flagUrl)?.isAbsolute == true
97-
? ClipRRect(
98-
borderRadius: BorderRadius.circular(
99-
AppSpacing.xs,
100-
),
101-
child: Image.network(
102-
country.flagUrl,
103-
fit: BoxFit.contain,
104-
errorBuilder:
105-
(context, error, stackTrace) =>
106-
Icon(
97+
? ClipRRect(
98+
borderRadius: BorderRadius.circular(
99+
AppSpacing.xs,
100+
),
101+
child: Image.network(
102+
country.flagUrl,
103+
fit: BoxFit.contain,
104+
errorBuilder:
105+
(context, error, stackTrace) => Icon(
107106
Icons.flag_outlined,
108107
color: colorScheme.onSurfaceVariant,
109108
size: AppSpacing.lg,
110109
),
111-
loadingBuilder: (
112-
context,
113-
child,
114-
loadingProgress,
115-
) {
110+
loadingBuilder:
111+
(context, child, loadingProgress) {
116112
if (loadingProgress == null) {
117113
return child;
118114
}
119115
return Center(
120116
child: CircularProgressIndicator(
121117
strokeWidth: 2,
122-
value: loadingProgress
118+
value:
119+
loadingProgress
123120
.expectedTotalBytes !=
124121
null
125122
? loadingProgress
@@ -130,13 +127,13 @@ class AddCountryToFollowPage extends StatelessWidget {
130127
),
131128
);
132129
},
133-
),
134-
)
135-
: Icon(
136-
Icons.flag_outlined,
137-
color: colorScheme.onSurfaceVariant,
138-
size: AppSpacing.lg,
139-
),
130+
),
131+
)
132+
: Icon(
133+
Icons.flag_outlined,
134+
color: colorScheme.onSurfaceVariant,
135+
size: AppSpacing.lg,
136+
),
140137
),
141138
title: Text(country.name, style: textTheme.titleMedium),
142139
trailing: IconButton(

lib/account/view/manage_followed_items/manage_followed_items_page.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ class ManageFollowedItemsPage extends StatelessWidget {
6060
endIndent: AppSpacing.paddingMedium,
6161
),
6262
ListTile(
63-
leading: Icon(Icons.add_location_alt_outlined, color: colorScheme.primary),
63+
leading: Icon(
64+
Icons.add_location_alt_outlined,
65+
color: colorScheme.primary,
66+
),
6467
title: Text(
6568
l10n.accountFollowedCountriesTile,
6669
style: textTheme.titleMedium,

lib/headlines-search/widgets/country_item_widget.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,10 @@ class CountryItemWidget extends StatelessWidget {
1515
@override
1616
Widget build(BuildContext context) {
1717
return ListTile(
18-
leading: CircleAvatar(
19-
backgroundImage: NetworkImage(country.flagUrl),
20-
),
18+
leading: CircleAvatar(backgroundImage: NetworkImage(country.flagUrl)),
2119
title: Text(country.name),
2220
subtitle: country.isoCode.isNotEmpty
23-
? Text(
24-
country.isoCode,
25-
maxLines: 1,
26-
overflow: TextOverflow.ellipsis,
27-
)
21+
? Text(country.isoCode, maxLines: 1, overflow: TextOverflow.ellipsis)
2822
: null,
2923
onTap: () {
3024
context.push(

lib/router/router.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import 'package:flutter/material.dart';
55
import 'package:flutter_bloc/flutter_bloc.dart';
66
import 'package:flutter_news_app_mobile_client_full_source_code/account/bloc/account_bloc.dart';
77
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/account_page.dart';
8-
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/manage_followed_items_page.dart';
9-
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/sources/add_source_to_follow_page.dart';
10-
import 'package:flutter_news_app_mobile_client_full_source_code/account/bloc/available_countries_bloc.dart';
118
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/countries/add_country_to_follow_page.dart';
129
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/countries/followed_countries_list_page.dart';
10+
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/manage_followed_items_page.dart';
11+
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/sources/add_source_to_follow_page.dart';
1312
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/sources/followed_sources_list_page.dart';
1413
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/topics/add_topic_to_follow_page.dart';
1514
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/topics/followed_topics_list_page.dart';

0 commit comments

Comments
 (0)