FSuper는 복잡한 사용자 인터페이스 개발을 가속화하기 위해 설계된 Flutter 위젯 라이브러리 및 UI 프레임워크입니다. 재사용 가능하고 사용자 정의가 가능한 위젯 세트를 제공하여 UI 구축을 간소화하고, 반복 코드를 줄이며 개발 생산성을 향상시킵니다. Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원하며 일관되고 고성능 디자인을 가능하게 합니다. 직관적인 API를 통해 개발자는 최소한의 노력으로 복잡한 레이아웃을 구축할 수 있어, 빠른 반복과 확장 가능한 UI 아키텍처가 필요한 프로젝트에 이상적입니다.
사용 사례
복잡한 대시보드 구축
재사용 가능한 UI 컴포넌트 만들기
빠른 프로토타이핑
크로스 플랫폼 앱 개발
UI 워크플로우 간소화
반응형 레이아웃 설계
주요 기능
사전 구축된 사용자 지정 가능한 위젯
크로스 플랫폼 호환성
보일러플레이트 코드 감소
직관적인 API 설계
반응형 레이아웃 지원
모듈러 구성 요소 구조
적합한 대상
경험 많은 플러터 개발자
UI 일관성을 우선시하는 팀
엄격한 마감일이 있는 프로젝트
복잡한 레이아웃을 필요로 하는 앱
생산성 향상을 원하는 개발자
고려 사항
신규 사용자를 위한 학습 곡선
사용 가능한 문서가 제한되어 있습니다
패키지 크기를 증가시킬 수 있습니다
대규모 앱에 가장 적합
신중한 통합 계획이 필요합니다
출판사의 적극적인 유지보수에 의존
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
FSuper
FSuper can help developers build complex views quickly and comfortably.
It supports rich text, rounded corners, borders, pictures, small red dots, and set up to two sub-components at the same time, and control their relative positions, high-quality Neumorphism style.
maxWidth. If width> maxWidth, width is overridden. If there is no width, the maximum expanded width is maxWidth
maxHeight
double
false
null
maxHeight. If height> maxHeight, height is overridden. If there is no height, the maximum extension width is maxHeight
backgroundColor
Color
false
null
background color
backgroundImage
ImageProvider
false
null
Background illustration. Overrides backgroundColor and gradient
gradient
Gradient
false
null
Gradient. Will be overwriting backgroundColor
padding
EdgeInsetsGeometry
false
null
Text and margins on each side. This is very useful to reserve space for children in FSuper
margin
EdgeInsets
false
null
FSuper margins in parent container
corner
FCorner
false
null
Corner size
cornerStyle
FCornerStyle
false
FCornerStyle.round
Corner style. Rounded by default, set FCornerStyle.bevel to bevel
text
String
false
null
Text content
style
TextStyle
false
null
text style
textAlign
TextAlign
false
TextAlign.center
Text alignment
spans
List
false
null
Rich text. After receiving text, the text configuration will be inherited by default. Can be set individually via TextStyle
onClick
GestureTapCallback
false
null
Set FSuper click listener
🧸 Child Widget Parameters
Param
Type
Necessary
Default
desc
child1
Widget
false
null
child widget 1
child1Alignment
Alignment
false
null
Relative position of child widget 1 in FSuper
child1Margin
EdgeInsets
false
null
child widget 1 relative position based offset
onChild1Click
GestureTapCallback
false
null
Click listener of child widget 1
child2
Widget
false
null
child widget 2
child2Alignment
Alignment
false
null
Relative position of child widget 2 in FSuper
child2Margin
EdgeInsets
false
null
child widget 2 relative position based offset
onChi2d1Click
GestureTapCallback
false
null
Click listener of child widget 2
🎈 Red Point Parameters
Param
Type
Necessary
Default
desc
redPoint
bool
false
false
Whether to show the Red Point
redPointColor
Color
false
Colors.redAccent
The Red Point color
redPointSize
double
false
20
The Red Point size
redPointText
String
false
null
text on Red Point
redPointTextStyle
TextStyle
false
null
red point text style
redPointOffset
Offset
false
null
The Red Point shifts to the upper right. The Red Point of Offset (0,0) is in the upper right corner of FSuper. By default, the Red Point is shifted to the upper right by 1/4
🖼 Stroke Parameters
Param
Type
Necessary
Default
desc
strokeWidth
double
false
null
Border width. > 0 border will be displayed
strokeColor
Color
false
null
stroke color
🔳 Shadow Parameters
Param
Type
Necessary
Default
desc
shadowColor
Color
false
null
Shadow color
shadowOffset
Offset
false
null
Shadow offset
shadowBlur
double
false
null
The larger the value, the larger the shadow
🍭 Neumorphism Style
Param
Type
Necessary
Default
desc
isSupportNeumorphism
bool
false
false
Whether to support the Neumorphism style. Open this item [highlightColor] will be invalid
lightOrientation
FLightOrientation
false
FLightOrientation.LeftTop
Valid when [isSupportNeumorphism] is true. The direction of the light source is divided into four directions: upper left, lower left, upper right, and lower right. Used to control the illumination direction of the light source, which will affect the highlight direction and shadow direction
highlightShadowColor
Color
false
null
After the Neumorphism style is turned on, the bright shadow color
float
bool
false
false
Whether the Neumorphism style is turned on, whether it is a floating effect, otherwise it is a concave effect, the default is true
FSuper The first part of the text is set through the text property, and related text style properties can be set. If you want to achieve rich text effects, you can pass a TextSpan array via the spans property.
Of course, by default, the properties you have not set for TextSpan will automatically inherit the text style configuration of FSuper.
By default, FSuper is able to adapt the text content size.
But you can still specify a specific size through the width, height properties. If you want the parent container to be full of components, you can set their value to double.infinity.
⚠️ You should never set the size of FSuper to double.infinity in an infinite parent container, because it really does not know how big it should be!
In addition, FSuper also provides maxWidth and maxHeight to assist in layout, which is useful in the case of an uncertain component size. Your components will never exceed their limits.
Using FSuper to declare a corner and border component is very simple.
Corners can be declared just by the corner property. A Corner object will describe the corners of the component. You can control each corner individually.
FSuper supports two types of corners:
FCornerStyle.round:Rounded corners. This is what we need most of the time.
FCornerStyle.bevel:bevel corners.
If you want a border, you only need to make StrokeWidth> 0 of FSuper. In addition, the strokeColor property allows you to describe the color of the border.
In FSuper, two child components can be declared by child1, child2. You can specify their location and declare a click event.
This will greatly increase development speed in some common and complex layouts. Especially in the scenario where the size of one component is small and uncertain, and the other component determines the position based on its size, FSuper handles everything.
The effects of these components in the picture only need one FSuper component to complete.
FButton brings an incredible, ultra-high texture Neumorphism style to developers.
Developers only need to configure the isSupportNeumorphism parameter to enable and disable the Neumorphism style.
If you want to adjust the style of Neumorphism, you can make subtle adjustments through several attributes related to Shadow, among which:
shadowColor: configure the shadow of the shadow
highlightShadowColor: configure highlight shadow
FButton also provides lightOrientation parameters, and even allows developers to adjust the care angle, and has obtained different Neumorphism effects.
Through the float parameter, developers can easily switch between floating visual effect and recessed visual effect.
🎞 More Demo
Do not be surprised, the effects in the figure are all achieved with FSuper.
The design of the sub-components makes FSuper a qualitative leap in flexibility, and most of the complex views are capable.
For example, the chat bubble in the picture does not need to use the background picture, just use FSuper to achieve it. This makes such components extremely flexible and easy to modify.
FSuper(maxWidth:220,textAlign:TextAlign.left,text:"I'm created by FSuper 😄",padding:EdgeInsets.only(left:12,right:12,top:15,bottom:15),backgroundColor:Color(0xffa5ed7e),corner:FCorner.all(6),child1:Transform.rotate(angle:pi/4,child:FSuper(width:10,height:10,backgroundColor:Color(0xffa5ed7e),corner:FCorner.all(1.5),),),child1Alignment:Alignment.topRight,child1Margin: EdgeInsets.only(right:-4,top:20),shadowColor:Color(0xffa5ed7e),shadowBlur:5,),
😃 How to use?
Add dependency in project pubspec.yaml file:
🌐 pub dependency
dependencies:fsuper:^<versionnumber>
⚠️ Attention, please go to pub to get the latest version number of FSuper
🖥 git dependencies
dependencies:fsuper:git:url:'git@github.com:Fliggy-Mobile/fsuper.git'ref:'<Branch number or tag number>'
⚠️ Attention,Please refer to the official project of FSuper for the branch number or tag.
💡 License
Copyright2020-present FliggyAndroidTeam.
Licensed under the ApacheLicense, Version2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at following link.
http://www.apache.org/licenses/LICENSE-2.0Unlessrequired by applicable law or agreed to in writing, software
distributed under the Licenseis distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licensefor the specific language governing permissions and
limitations under the License.