GroovinWidgets는 GroovinChip이 제작한 커스텀하고 재사용 가능한 UI 컴포넌트 모음을 제공하는 Flutter 위젯 라이브러리입니다. 일관성 있고 시각적으로 매력적인 요소를 통해 앱 개발을 향상시키며, 여러 플랫폼에서 현대적인 인터페이스를 쉽게 구축할 수 있도록 도와줍니다. 이 라이브러리는 Android, iOS, Web, macOS, Windows, Linux를 지원하여 효율성과 디자인의 통일성을 추구하는 크로스플랫폼 프로젝트에 이상적입니다. 깔끔한 코드와 직관적인 API를 통해 개발자는 반복 코드를 줄이고 핵심 기능에 집중할 수 있습니다.
사용 사례
크로스 플랫폼 플러터 앱 빌드
UI 개발 가속화
일관된 디자인 시스템 만들기
복잡한 위젯 조합 간소화
최소한의 노력으로 앱 미적 요소 향상
사용자 인터페이스의 빠른 프로토타이핑
주요 기능
사전 빌드된 사용자 지정 위젯
크로스 플랫폼 호환성
깨끗하고 유지보수 가능한 코드
pub를 통한 간편한 통합
재사용을 위해 설계됨
현대적인 Flutter 실천을 지원합니다
적합한 대상
UI 단축키를 찾는 Flutter 개발자
디자인 일관성을 우선시하는 팀
빠른 UI 반복이 필요한 프로젝트
그루빈칩의 디자인 패턴을 사용하는 개발자
동시에 여러 플랫폼을 대상으로 하는 앱
프론트엔드 중심의 플러터 팀
고려 사항
고유한 디자인을 위해 맞춤 설정이 필요할 수 있습니다
그루빈칩의 디자인 철학에 따라 달라집니다
기본 사용법을 넘어서는 문서가 제한적
매우 전문적인 UI 요구 사항에는 적합하지 않습니다
유연성을 위해 다른 UI 라이브러리와 함께 사용하는 것이 가장 좋습니다
적절히 관리되지 않으면 버전 충돌이 발생할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
🍪 groovin_widgets
A Flutter package containing widgets and utilities created and edited by GroovinChip.
This package currently contains the following widgets:
ModalDrawerHandle
OutlineDropdownButton
OutlineDropdownButtonFormField
GroovinExpansionTile
SplitColorBackground
AvatarBackButton
ScrollControllerBuilder
This package also contains the following utilities:
The HexColor class, which returns a Color based on a hex value String
The textLuminance function, which helps determine the color of a Text based on a given background color
The printFormattedJson function, which prints nicely formatted JSON to the console
ModalDrawerHandle
ModalDrawerHandle allows you to add a highly customizable drawer handle widget to your modalBottomSheets.
Sample image:
Full image gallery: https://imgur.com/gallery/zf6NriP
YouTube video walkthrough: https://www.youtube.com/watch?v=VF-zR9ougi8&feature=youtu.be
Every aspect of the drawer handle can be customized:
color
height
width
the MainAxisAlignment of the Row it sits in
the BorderRadius of all four corners
The recommended use of this widget is within the showModalBottomSheet builder.
The ideal use in this case is to return a Container that returns a Column, and the ModalDrawerHandle widget should be the first widget in the Column. I personally wrap the ModalDrawerHandle with a Padding that has a const EdgeInsets.all(8.0). Below is an example of this:
As such, developers can pass in any or all of their own custom values to the constructor as they choose.
OutlineDropdownButton
OutlineDropdownButton is a standard DropdownButton with one additional feature: the ability to wrap it in a border.
Every property that you'd expect to customize about a DropdownButton is available to the developer, and the InputDecoration
that the OutlineDropdownButton uses is also fully customizable.
By default, OutlineDropdownButton is initialized with the following properties:
OutlineDropdownButton({
this.inputDecoration = constInputDecoration(
border: OutlineInputBorder(),
contentPadding: EdgeInsets.all(8.0),
),
this.disabledHint,
this.elevation = 8, // the default value per the sourcethis.hint,
this.iconSize = 24.0, // the default value per the sourcethis.isDense = false, // the default value per the sourcethis.isExpanded = true, // here I deviate from the source because this property is greatthis.items,
this.onChanged,
this.style,
this.value,
});
A default OutlineDropdownButton will look as follows:
OutlineDropdownButtonFormField
OutlineDropdownButtonFormField is similar to OutlineDropdownButton but is optimized for
Forms. The additional properties are:
This widget builds the InputDecoration explicitly in the widget rather than the constructor due to
form validation limitations. However, the decoration is open for customization.
GroovinExpansionTile
This widget is a modified Expansion tile that allows for more customization over its appearance.
You can customize the BoxDecoration of the ExpansionTile so you can remove the lines that appear
above and below it when expanded, and so on.
ExpansionTile builds a ListTile for the user to tap on; GroovinExpansionTile builds a custom
ListTile so that you can add a subtitle and adjust the border radius of the InkWell the tile is
contained in.
As of version 1.2.1 of this library, this widget's default trailing icon will have a set color of
Colors.grey. This icon color is open to customization via the parameter defaultTrailingIconColor.
Example images:
Wrapped in Material with 2.0 elevation, not expanded:
Wrapped Material with 2.0 elevation, expanded:
Wrapped Material with 2.0 elevation, expanded, showing InkWell with topRight and topLeft radius:
SplitColorBackground
This widget enables the replication of designs seen on dribbble, uplabs, and other
design websites that show a header section with one background color, a body section with
a different background color, and rounded corners on the top of the body section.
An example of what this looks like is as follows, taken from the example project included
in this repository:
This widget operates as a Scaffold who's body is a Column with two Flexible widgets to represent
the header and the body. Various Scaffold properties are exposed to the developer. If you would like
more of the Scaffold properties opened up to customization, please file an issue on GitHub and
send me an additional email or tweet.
The widget contains the following properties:
/// Represents the flex property of the Flexible containing the header widget. Defaults to 1.final int headerFlex;
/// Represents the Widget that will be used as the headerfinal Widget header;
/// Represents the color for the header widgetfinal Color headerColor;
/// Represents the flex property of the Flexible containing the body widget. Defaults to 4.final int bodyFlex;
/// Represents the Widget that will be used as the bodyfinal Widget body;
/// Represents the corner radius for the top left corner of the bodyfinal double topLeftCornerRadius;
/// Represents the corner radius for the top right corner of the bodyfinal double topRightCornerRadius;
/// Represents the color for the body widgetfinal Color bodyColor;
/// The Scaffold appBar is available for optional use.final AppBar appBar;
/// The Scaffold FloatingActionButton is available for optional use.final FloatingActionButton floatingActionButton;
/// The Scaffold FloatingActionButtonLocation is available for optional use.final FloatingActionButtonLocation floatingActionButtonLocation;
/// The Scaffold BottomNavigationBar is available for optional use.final BottomNavigationBar bottomNavigationBar;
AvatarBackButton
This widget creates a back button with a user Avatar next to it, like WhatsApp does.
Given that user avatar's generally are retrieved via network calls this widget takes a String URL as the avatar and
passes it to a NetworkImage widget.
Screenshots:
ScrollControllerBuilder
This widget exposes a ScrollController to the child, thereby allowing widgets that require a ScrollController to be fully declarative.