Skip to content

Commit ed3983b

Browse files
authored
Remove duplicated conditions (duytq94#66)
1 parent 244924f commit ed3983b

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lib/pages/chat_page.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ class ChatPageState extends State<ChatPage> {
200200
child: Center(
201201
child: CircularProgressIndicator(
202202
color: ColorConstants.themeColor,
203-
value: loadingProgress.expectedTotalBytes != null &&
204-
loadingProgress.expectedTotalBytes != null
203+
value: loadingProgress.expectedTotalBytes != null
205204
? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes!
206205
: null,
207206
),
@@ -272,8 +271,7 @@ class ChatPageState extends State<ChatPage> {
272271
return Center(
273272
child: CircularProgressIndicator(
274273
color: ColorConstants.themeColor,
275-
value: loadingProgress.expectedTotalBytes != null &&
276-
loadingProgress.expectedTotalBytes != null
274+
value: loadingProgress.expectedTotalBytes != null
277275
? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes!
278276
: null,
279277
),
@@ -329,8 +327,7 @@ class ChatPageState extends State<ChatPage> {
329327
child: Center(
330328
child: CircularProgressIndicator(
331329
color: ColorConstants.themeColor,
332-
value: loadingProgress.expectedTotalBytes != null &&
333-
loadingProgress.expectedTotalBytes != null
330+
value: loadingProgress.expectedTotalBytes != null
334331
? loadingProgress.cumulativeBytesLoaded /
335332
loadingProgress.expectedTotalBytes!
336333
: null,

lib/pages/settings_page.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ class SettingsPageStateState extends State<SettingsPageState> {
194194
child: Center(
195195
child: CircularProgressIndicator(
196196
color: ColorConstants.themeColor,
197-
value: loadingProgress.expectedTotalBytes != null &&
198-
loadingProgress.expectedTotalBytes != null
197+
value: loadingProgress.expectedTotalBytes != null
199198
? loadingProgress.cumulativeBytesLoaded /
200199
loadingProgress.expectedTotalBytes!
201200
: null,

0 commit comments

Comments
 (0)