{"id":32724905,"url":"https://github.com/brntsv/native_web_scroll","last_synced_at":"2026-05-17T19:31:45.386Z","repository":{"id":321420728,"uuid":"1085721197","full_name":"brntsv/native_web_scroll","owner":"brntsv","description":"Native (DOM) scrolling for Flutter Web with a single ScrollController","archived":false,"fork":false,"pushed_at":"2025-11-22T06:49:55.000Z","size":25,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-16T15:28:44.275Z","etag":null,"topics":["dom","flutter","scrollcontroller","web"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brntsv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-29T12:29:36.000Z","updated_at":"2025-11-22T06:49:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e4eb986-38d3-4050-9ab6-3461065c9777","html_url":"https://github.com/brntsv/native_web_scroll","commit_stats":null,"previous_names":["brntsv/native_web_scroll"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brntsv/native_web_scroll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brntsv%2Fnative_web_scroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brntsv%2Fnative_web_scroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brntsv%2Fnative_web_scroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brntsv%2Fnative_web_scroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brntsv","download_url":"https://codeload.github.com/brntsv/native_web_scroll/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brntsv%2Fnative_web_scroll/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33151712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dom","flutter","scrollcontroller","web"],"created_at":"2025-11-03T01:01:21.959Z","updated_at":"2026-05-17T19:31:45.378Z","avatar_url":"https://github.com/brntsv.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# native_web_scroll\n\nWeb‑native scrolling for Flutter Web with a single `ScrollController`.\n\n- Syncs a Flutter `ScrollController` with a real DOM scroller behind your content.\n- Preserves native browser behavior (momentum, accessibility, OS settings).\n- Works everywhere: on Web it uses DOM; elsewhere it behaves like a normal controller.\n- Also fixes scroll issues with `Draggable` in Telegram and other in‑app browsers by relying on native DOM scrolling and proper wheel event handling.\n\n## Why use this\n- You want native browser scrolling feel on Web.\n- You need one `ScrollController` for both programmatic control and user scrolling.\n- You hit odd scroll behavior (e.g. jitter with `Draggable` inside in‑app browsers).\n\n## Platform support\n- Web: native DOM scrolling via `HtmlElementView`.\n- Android/iOS/macOS/Windows/Linux: falls back to a regular `ScrollController`.\n\n## Quick start\n```dart\nimport 'package:native_web_scroll/native_web_scroll.dart';\n\nNativeScrollBuilder(\n  builder: (context, scrollController) =\u003e ListView.builder(\n    controller: scrollController,\n    itemCount: 100,\n    itemBuilder: (context, i) =\u003e Text('Item $i'),\n  );\n);\n```\n\n## How it works (Web)\n- Registers a platform view and renders an HTML `\u003cdiv\u003e` with scroll overflow.\n- Mirrors scroll position between the DOM and the Flutter `ScrollController` (both ways), avoiding feedback loops.\n- Updates a spacer element to reflect `viewport + maxScrollExtent`, reducing drift when content size changes.\n\n## Notes\n- Flutter vs browser scrollbars: `hideFlutterScrollbars` hides only Flutter’s scrollbars. Native browser scrollbars are unaffected.\n- In‑app browsers (e.g., Telegram): `stopWheelPropagation: true` helps avoid nested scroll conflicts and improves `Draggable` interaction.\n- Dynamic layouts: for external initial offsets, set them in a post‑frame callback (`jumpTo/animateTo`) after the controller has clients.\n\n## Troubleshooting\n- Double scrollbars: set `hideFlutterScrollbars: true` (or hide native DOM scrollbars via CSS if you prefer Flutter’s).\n- Jumps/drift after layout changes: ensure the controller has clients, then `jumpTo/animateTo` in a post‑frame callback.\n- Nested scroll conflicts: keep `stopWheelPropagation: true` or tune per layout.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrntsv%2Fnative_web_scroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrntsv%2Fnative_web_scroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrntsv%2Fnative_web_scroll/lists"}