Skip to content

Commit

Permalink
coderabbit-fixes_organization_search_list.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
ARYPROGRAMMER authored Nov 18, 2024
1 parent b6f5056 commit 6e2cc0b
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions lib/widgets/organization_search_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,35 +92,32 @@ class _OrganizationSearchListState extends State<OrganizationSearchList> {
),
);
}
Widget buildListTile(int index) {
return CustomListTile(
index: index,
type: TileType.org,
orgInfo: widget.model.organizations[index],
onTapOrgInfo: widget.model.selectOrg,
key: Key('orgTile_${widget.model.organizations[index].id}'),
);
}

if (index == widget.model.organizations.length - 3) {
return VisibilityDetector(
key: Key('OrgSelItem$index'),
key: Key('orgTile_${widget.model.organizations[index].id}'),
onVisibilityChanged: (VisibilityInfo info) {

Check warning on line 108 in lib/widgets/organization_search_list.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/organization_search_list.dart#L108

Added line #L108 was not covered by tests
if (info.visibleFraction > 0) {
if (fetchMore != null) {
widget.model.fetchMoreHelper(

Check warning on line 110 in lib/widgets/organization_search_list.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/organization_search_list.dart#L110

Added line #L110 was not covered by tests
fetchMore!,
fetchMore,
widget.model.organizations,

Check warning on line 112 in lib/widgets/organization_search_list.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/organization_search_list.dart#L112

Added line #L112 was not covered by tests
);
}
},
child: CustomListTile(
index: index,
type: TileType.org,
orgInfo: widget.model.organizations[index],
onTapOrgInfo: widget.model.selectOrg,
key: Key('OrgSelItem$index'),
),
child: buildListTile(index),
);
}

return CustomListTile(
index: index,
type: TileType.org,
orgInfo: widget.model.organizations[index],
onTapOrgInfo: widget.model.selectOrg,
key: Key('OrgSelItem$index'),
);
return buildListTile(index);
},
separatorBuilder: (BuildContext context, int index) {
return Padding(
Expand Down

0 comments on commit 6e2cc0b

Please sign in to comment.