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

패키지 상세v0.5.0

responsive_layout_builder

화면 크기와 방향에 따라 반응형 레이아웃을 구축하기 위한 Flutter 패키지입니다. 손목 시계, 소형/중형/대형 모바일, 소형/대형 태블릿 또는 데스크톱에 사용할 수 있습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
139
좋아요
24
Pub 점수
140

패키지 설치

flutter pub add responsive_layout_builder

패키지 개요

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

시계, 모바일, 태블릿, 데스크톱을 포함한 다양한 기기에서 화면 크기와 방향을 감지하여 반응형 레이아웃 생성을 간소화하는 플러터 패키지입니다. 현재 기기의 특성에 따라 UI 컴포넌트를 동적으로 조정할 수 있는 깔끔한 API를 제공하여 다양한 형태 요인에서 일관된 사용자 경험을 보장합니다. 반복적인 미디어 쿼리 로직을 작성하지 않고도 유연하고 확장 가능한 인터페이스를 구축하고자 하는 개발자에게 이상적입니다.

사용 사례

  • 다른 화면 크기에 맞춰 UI 적응
  • 일관된 디자인으로 크로스 플랫폼 앱 만들기
  • 시계와 태블릿용 레이아웃 만들기
  • 수동 미디어 쿼리 없이 반응형 디자인
  • 데스크톱 및 모바일을 위한 레이아웃 최적화
  • 다수의 기기 방향 지원

주요 기능

  • 자동 화면 크기 감지
  • 방향 인식 레이아웃 조정
  • 시계, 모바일, 태블릿 및 데스크탑 지원
  • 간단하고 선언적인 API
  • 일반 장치용 내장 브레이크포인트
  • 크로스 플랫폼 호환성

적합한 대상

  • 다기기 앱을 개발하는 개발자
  • 반응형 디자인을 우선시하는 팀
  • 적응형 UI가 필요한 프로젝트
  • Flutter 초보자가 반응형 레이아웃 배우기
  • 모바일 및 데스크톱 사용자를 대상으로 하는 앱
  • 복잡한 레이아웃 요구 사항을 가진 프로젝트

고려 사항

  • 여러 기기 유형에서 테스트를 수행해야 할 수 있습니다
  • 브레이크포인트는 사전 정의되어 있으며 완전히 사용자 지정할 수 없습니다
  • 매우 자주 재구성될 경우 성능에 미치는 영향
  • 화면 크기 및 방향 감지에 제한됨
  • 동적 콘텐츠 크기 조정을 처리하지 않음
  • 복잡한 레이아웃을 위해 상태 관리와 함께 사용하는 것이 가장 좋습니다

원본 README

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

responsive_layout_builder

Flutter package for building responsive layout based on screen sizes and orientation. It could be wristwatch, small/medium/large mobile, small/large tablet or desktop.

Getting Started

Widget approach

ResponsiveLayoutBuilder could be used as usual widget builder such as LayoutBuilder or OrientationBuilder, etc.

ResponsiveLayoutBuilder(
    builder: (context, screenSize) {
        // Use size argument to build size dependent widgets
    },
),

size property within screenSize stores LayoutSize which could be watch, mobile, tablet, desktop or tv.

mobile property within screenSize stores MobileLayoutSize which could be small, medium or large.

tablet property within screenSize stores TabletLayoutSize which could be small or large.

Functional approach

For using functional approach to retrieve current size use following:

// for getting mobile layout size 
getMobileLayoutSize(width: MediaQuery.of(context).size.width);

// for getting tablet layout size 
getTabletLayoutSize(width: MediaQuery.of(context).size.width);

// for getting screen size based on width
getScreenSize(width: MediaQuery.of(context).size.width);

// for getting screen size based on context 
getContextualScreenSize(context: context);

If you need to specify ScreenSizeSettings for all above functions sizes argument is needed to be passed, like this:

sizes: ScreenSizeSettings(...)

For getScreenSize and getContextualScreenSize could be specified also orientation and defaultSize.

TODO

  • Figure out how to determine TV
  • Add tests

카테고리

의존성

의존성 목록 1 개

  • pedantic^1.11.0

소스 저장소

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

아직 데이터가 없습니다.