Black_Hole_Flutter는 자주 사용되는 확장 함수와 재사용 가능한 위젯을 하나의 간편한 가져오기 솔루션으로 통합하는 포괄적인 유틸리티 패키지입니다. 개발을 간소화하기 위해 설계되었으며, 안드로이드, iOS, 웹, 맥OS, 윈도우, 리눅스 등 여러 플랫폼에서 시간 절약 도구를 제공합니다. 이 패키지는 자주 필요한 기능의 중앙 허브 역할을 하여 봐일러플레이트 코드를 줄이고 Flutter 프로젝트의 일관성을 촉진합니다. 효율성과 빠른 프로토타이핑을 원하는 개발자에게 적합합니다.
사용 사례
빠른 UI 개발
프로젝트 간 코드 재사용
일반적인 작업 간소화
크로스 플랫폼 유틸리티
Prototyping
반복 코드 줄이기
주요 기능
통합 유틸리티 확장
재사용 가능한 위젯
다중 플랫폼 지원
최소 설정
일관된 코딩 스타일
확장 가능한 설계
적합한 대상
초보자에서 고급까지의 Flutter 개발자
대규모 앱 개발
코드 일관성을 우선시하는 팀
빠른 반복이 필요한 프로젝트
최소한의 종속성 원하는 개발자
고려 사항
사용되지 않은 유틸리티가 포함될 수 있습니다
의존성 블로트 가능성
기능별로 사용자 정의가 제한됨
매우 전문적인 요구 사항에는 적합하지 않습니다
포함된 함수에 대한 신중한 검토가 필요합니다
프로젝트 범위가 포함된 도구와 일치할 때 가장 효과적으로 사용됩니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
🛠 A package absorbing all Flutter utility functions, including extension functions and commonly used widgets.
In Flutter, you often see the pattern <Class>.of(context) (e.g., Theme.of(context)). This package adds extension getters on BuildContext for those classes so you can just say:
Note: This uses the name of routes, so it only works with named routes.
📱 Widgets
🔳 Buttons
Did you ever want to show a progress indicator inside a button? Or were annoyed to conditionally set a Button's onPressed to disable it? Fear no more — black_hole_flutter has got you covered!
This screenshot only shows an excerpt of all available button types and variants.
isEnabled: Settings this to false disables this button, even if onPressed is set.
🥙 FillOrWrap
A layout with two different behaviors:
By default, all children are positioned next to each other with equal widths. This is comparable to a Row with all children wrapped in Expanded.
If the children are too wide to fit in a single line, or one child would become smaller than its reported minimum width, the children get positioned below each other ("wrapped"). This is similar to a Column with MainAxisSize.min.
🎯 LeftCenterRight
A layout taking optional left, center, and right children.
It will try to keep center in the center of itself, even if only one of left and right is set, or they have different widths.
🟢 Circle
A circle with optional diameter, background color, padding, and child.