본문 바로가기
개발/Flutter

how to compare boolean value?

by dev_caleb 2022. 12. 16.
728x90

This is simple algorithm for compare with boolean value!

matjipList.sort((a, b) => (a.visited? 1:0).compareTo(b.visited? 1:0));

 

728x90

'개발 > Flutter' 카테고리의 다른 글

How to query flutter hive data ?  (0) 2022.12.17
dart 2차 정렬하기 (twice ordering)  (0) 2022.12.16
naver login 이 안 될 때 (flutter)  (0) 2022.12.12
Firebase dynamic link 안 될 때  (0) 2022.12.12
Firebase Crashlytics  (0) 2022.12.08