Fix tombol Muat lebih banyak: cek filteredSales.length bukan state.sales (negatif -17)
This commit is contained in:
@@ -395,7 +395,10 @@ class _RiwayatScreenState extends State<RiwayatScreen> {
|
|||||||
},
|
},
|
||||||
color: kAccent,
|
color: kAccent,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
itemCount: displayedSales.length + (state.hasMoreSales ? 1 : 0),
|
itemCount: displayedSales.length +
|
||||||
|
(filteredSales.length > state.visibleSalesCount
|
||||||
|
? 1
|
||||||
|
: 0),
|
||||||
separatorBuilder: (_, __) =>
|
separatorBuilder: (_, __) =>
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
itemBuilder: (context, i) {
|
itemBuilder: (context, i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user