Liquid는 플러터를 위한 오픈소스 UI 툴킷으로, 개발자가 유동적이고 동적인 시각적으로 매력적인 크로스플랫폼 애플리케이션을 만들 수 있도록 설계되었습니다. 부드러운 애니메이션, 반응형 레이아웃 및 현대적인 디자인 패턴에 중점을 둔 사용자 정의 가능한 위젯과 컴포넌트의 컬렉션을 제공합니다. 성능과 개발자 경험을 고려하여 제작된 Liquid는 복잡한 상호작용과 전환을 단순화함으로써 UI 개발을 향상시킵니다. 표현력 있고 인터랙티브한 인터페이스를 필요로 하며 최소한의 보일러플레이트 코드로 구현되는 앱에 이상적입니다.
사용 사례
애니메이션 스플래시 화면 만들기
상호작용형 온보딩 흐름 구축
반응형 대시보드 설계
제스처 기반 인터페이스 개발
상태 간의 부드러운 전환 구현
주요 기능
유동적이고 적응형 위젯 세트
내장 애니메이션 유틸리티
반응형 레이아웃 컴포넌트
사용자 정의 테마 지원
경량이고 모듈식 아키텍처
적합한 대상
현대적인 UI 패턴을 찾는 Flutter 개발자
인터랙티브 프로토타입을 구축하는 팀
높은 시각적 참여를 요구하는 앱
프론트엔드 중심의 플러터 프로젝트
디자이너와 개발자들이 협업하는 방식
고려 사항
새 사용자에게는 학습 곡선이 필요할 수 있습니다
성숙한 패키지에 비해 문서화가 제한적
정적 레이아웃보다 시각적 완성도를 우선시하는 앱에 가장 적합
간단한 콘텐츠 전용 인터페이스에는 권장하지 않습니다
안정적인 Flutter 버전 호환성에 의존합니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Liquid
Build fast, responsive, cross platform apps with Liquid.
Liquid is an open source UI toolkit for developing cross platform apps in Flutter. Quickly create apps for Android, IOS, Web or Desktop with our powerful grid system, text processor, forms, extensive prebuilt components and dozens of utilities.
A builder that builds its childrens based on active breakpoints.
LResponsiveBuilder(
onXS: (context) => buildOnXS(context), // required
onSM: (context) => buildOnSM(context), // build only on SM breakpoint
onMD: (context) => buildOnMD(context), // build only on MD breakpoint
onLG: (context) => buildOnLG(context), // build only on LG breakpoint
onXL: (context) => buildOnXL(context), // build only on XL breakpoint
)
NOTE: LResponsiveBuilder will build onXS by default for other breakpoints if they are not defined.
NOTE: By default LResponsiveBuilder will use parents width to determine the active breakpoint.
To use screen width instead of parent width to determine breakpoint
LResponsiveBuilder(
... // builders
useMediaQuery: true, // this will make responsive builder to use screen width to build layout
)
Note: Responsive builder helps to build layout based on screen size but its too much work to build layout for 5 breakpoints. use Responisve Columns to build responsive layout in liquid.
Liquid comes with Rows (LRow) and Columns (LColumn) which helps to create a responsive grid thats layout their children according to active breakpoint.
Rows (LRow)
LRow is a responsive layout component in liquid that accepts a list of columns.
It can change its axis based on breakpoint by using axis property.
LRow(
columns: <LColumn>[
... //list of columns
]
)
LRow support maximum of 12 columns in fixedSize mode (default mode). i.e, if on a particular breakpoint the sum of all the column span is greater than 12 than mode will be changed to ratio.
LRow(
columns: <LColumn>[
LColumn( // first column
lg: 8, // span to 8 column space in lg
xl: 6, // span to 6 column space in xl
children: <Widget>[...]
),
LColumn( // second column
lg: 4, // span to 4 column space in lg
xl: 3, // span to 3 column space in xl
children: <Widget>[...]
),
]
)
LRow support 2 mode to render its columns.
fixedSize (columns will takes exact span space)
ratio (uses ratio/percentage to determine available space)
LRow(
mode: LGridMode.ratio
columns: <LColumn>[
LColumn( // first column
lg: 8, // takes ~53% space in lg
xl: 6, // takes ~50% space in xl
children: <Widget>[...]
),
LColumn( // second column
lg: 4, // takes ~26% space in lg
xl: 3, // takes ~25% space in xl
children: <Widget>[...]
),
LColumn( // third column
lg: 3, // takes ~26% space in lg
xl: 3, // takes ~25% space in xl
children: <Widget>[...]
),
]
)
Gutters
The space between columns is known as gutter
default: 5px
LRow(
gutter: 10.0, // add 10px space between columns
columns: <LColumn>[
... //list of columns
]
)
Margin
The space around the row
default: bottom margin equals togutter/2
NOTE: by default LRow is in horizontal axis except in xs breakpoint which is vertical. you can change this using axis property of LRow
Hiding a column on particular breakpoint
You can prevent a column from rendering on breakpoint by using visibility property of LColumn
LRow(
columns: <LColumn>[
LColumn( // first column
lg: 8, // span to 8 column space in lg
xl: 6, // span to 6 column space in xl
children: <Widget>[...]
),
LColumn( // second column
visibility: LBoxVisibility.belowXL(false),
xl: 3, // span to 6 column space in xl
children: <Widget>[...]
),
LColumn( // third column
lg: 4, // span to 4 column space in lg
xl: 3, // span to 3 column space in xl
children: <Widget>[...]
),
]
)
In above code, the second column will not render on XS, SM, MD and LG breakpoints.
Liquid comes with a container that can change its property based on breakpoint. properties like alignment, height, width, decoration, visibility, padding and margin.
Creates a widget that combines common painting, positioning, rendering and sizing widgets according to breakpoint.
LBox(
visibility: LBoxVisibility(
xs: false, // will not render child in XS breakpoint
sm: false, // will not render child in SM breakpoint
),
height: LBoxDimension( // height based on active breakpoint
xs: 250.0,
sm: 280.0,
md: 350.0,
lg: 450.0,
xl: 500.0,
),
padding: LBoxEdgeInsets( // padding based on active breakpoint
lg: EdgeInsets.all(10.0),
xl: EdgeInsets.all(20.0),
),
child: Image.network("https://source.unsplash.com/random/"), // child widget
)
To know the currently active breakpoint use MediaQuery
To know if a particular breakpoint is active use
MediaQuery.of(context).isXS // true if XS is activeMediaQuery.of(context).isSM // true if SM is activeMediaQuery.of(context).isMD // true if MD is activeMediaQuery.of(context).isLG // true if LG is activeMediaQuery.of(context).isXL // true if XL is active
To get active breakpoint use
MediaQuery.of(context).activeBreakpoint // active breakpoint