패키지, 저장소 및 앱 카테고리 검색

web_smooth_scroll 표지
패키지 상세v2.0.0

web_smooth_scroll

보다 부드럽고 아름다운 스크롤 느낌을 제공하는 데 도움이 되는 패키지입니다.

Web
30일 다운로드
5.1천
좋아요
171
Pub 점수
160

패키지 설치

flutter pub add web_smooth_scroll

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

web_smooth_scroll은 웹 플랫폼에서의 스크롤 경험을 향상시키기 위해 설계된 Flutter 패키지입니다. 시각적 매력과 사용자 상호작용을 개선하기 위해 더 부드럽고 자연스러운 스크롤 애니메이션을 제공합니다. 스크롤 동작을 최적화함으로써 지연 현상을 줄이고, 스크롤 가능한 위젯에 유려하고 아름다운 느낌을 제공합니다. 이 패키지는 현대적인 UX 기준에서 스무스한 스크롤이 중요한 웹 애플리케이션을 위한 것입니다.

사용 사례

  • 웹 앱 스크롤 경험 향상
  • 유동적인 UI 상호작용 만들기
  • 웹에서 인식되는 성능 향상
  • 아름다운 스크롤 효과 추가
  • 웹 앱에서 스크롤 동작 최적화

주요 기능

  • 부드러운 스크롤 애니메이션
  • 웹 전용 최적화
  • 필요한 설정 최소화
  • 개선된 스크롤 부드러움
  • 사용자 정의 가능한 스크롤 동작

적합한 대상

  • 더 나은 스크롤 UX를 원하는 웹 개발자
  • 긴 스크롤 가능한 콘텐츠를 가진 앱
  • 디자인 중심의 웹 애플리케이션
  • 시각적 완성도를 우선시하는 프로젝트
  • 인터랙티브 콘텐츠를 갖춘 Flutter 웹 프로젝트

고려 사항

  • 주로 웹 플랫폼용
  • 다른 브라우저에서 테스트가 필요할 수 있습니다
  • 모바일 또는 데스크톱에 미치는 영향은 제한적
  • 기본 스크롤 기능에 필요하지 않음
  • 브라우저의 부드러운 스크롤링 지원 여부에 따라 다릅니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Web Smooth Scroll

A package to help you provide a smoother and aesthetic scroll feeling. The motivation behind this package is, while using the official Flutter SDK the scrolling experience on web is very jerky and feels laggy to overcome it and provide more quality scrolling this package is developed.


Motivation

While I was developing my portfolio website using Flutter I faced the issue of jerky scrolling so for a research in solving it I came across this package https://pub.dev/packages/smooth_scroll_web, but it has got some issues and currently not being maintained by the author. It has issues while scrolling and also when using with scrollbars the scroll behaviour is different. Also when user uses a trackpad to scroll it'll scroll to the bottom of the screen and makes the website completely unusable. Also that package doesn't supports null safety which is supported in this package. I've developed this package to overcome all this issues. I would like to thank Dezső Csete, for this motivation and providing a base to work on.


Scroll without plugin


Scroll with plugin


Getting Started


Installation

Add

dependencies:
  web_smooth_scroll: ^latest_version

to your pubspec.yaml, and run

flutter packages get

in your project's root directory.

Basic Usage
  1. Import it to your project file
import 'package:web_smooth_scroll/web_smooth_scroll.dart';
  1. Create a Scroll Controller
  // Controllers
  late ScrollController _scrollController;

  @override
  void initState() {
    // initialize scroll controllers
    _scrollController = ScrollController();

    super.initState();
  }
  1. Use the controller with package
@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Web Smooth Scroll'),
      ),
      body: WebSmoothScroll(
        controller: _scrollController,
        child: SingleChildScrollView(
          physics: const NeverScrollableScrollPhysics(),
          controller: _scrollController,
          child: _buildScrollableList(),
        ),
      ),
    );
  }
WebSmoothScroll can be used with any scrollable widget, just pass the same scroll controller to WebSmoothScroll as well as the scrollable widget. And also specify scroll physics to NeverScrollableScrollPhysics()

There are additional optional parameters one can use

    WebSmoothScroll(
        controller: _scrollController,
        scrollSpeed: 2.1, // additional scroll extent for smooth animation
        scrollAnimationLength: 800, // duration of animation of scroll in milliseconds
        curve: Curves.easeInOutCirc, // curve of the animation
        child: SingleChildScrollView(
          physics: const NeverScrollableScrollPhysics(),
          controller: _scrollController,
          child: _buildScrollableList(),
        ),
    ),

Some points to be noted

  1. This plugin is to be used only on web and not on any other platform, you can check if platform is web and render using WebSmoothScroll else don't use this plugin.
  2. Remember to assign physics as NeverScrollableScrollPhysics() else you won't see any change in the scrolling behaviour

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.