Removal of conditional assignment of scrollController in Grid View widget.
Fixes #3963
Test Code
import flet as ft
def main(page: ft.Page):
page.title = "GridView Example"
page.theme_mode = ft.ThemeMode.DARK
page.padding = 50
page.update()
images = ft.GridView(
expand=1,
runs_count=5,
max_extent=150,
child_aspect_ratio=1.0,
spacing=5,
run_spacing=5
)
page.add(images)
for i in range(0, 60):
images.controls.append(
ft.Image(
src=f"https://picsum.photos/150/150?{i}",
fit=ft.ImageFit.NONE,
repeat=ft.ImageRepeat.NO_REPEAT,
border_radius=ft.border_radius.all(10),
)
)
page.update()
ft.app(main)
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
Checklist:
[x] I signed the CLA.
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] My changes generate no new warnings
[x] New and existing tests pass locally with my changes
Summary by Sourcery
Remove the use of AdjustableScrollController and replace it with ScrollController in GridView, ListView, and ScrollableControl widgets to simplify the scroll controller logic and fix related issues.
Bug Fixes:
Remove conditional assignment of AdjustableScrollController in GridView, ListView, and ScrollableControl widgets.
Enhancements:
Simplify scroll controller logic by using ScrollController directly instead of AdjustableScrollController.
Description
Removal of conditional assignment of scrollController in Grid View widget. Fixes #3963
Test Code
Type of change
Checklist:
Summary by Sourcery
Remove the use of AdjustableScrollController and replace it with ScrollController in GridView, ListView, and ScrollableControl widgets to simplify the scroll controller logic and fix related issues.
Bug Fixes:
Enhancements: