responsive_ui_kit
responsive_ui_kit은 중앙 정렬 레이아웃, 반응형 분할 보기, 화면 크기 확장 및 자동 텍스트 스케일링을 사용하여 적응형이고 확장 가능한 Flutter UI를 구축하는 데 도움을 줍니다.
kFasih132/flutter_responsive_ui open-source repository details.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A clean and flexible way to build responsive layouts in Flutter across mobile, tablet, and desktop — with minimal boilerplate and powerful layout tools.
🧱 Simple, composable layout widgets
📐 Screen-based constraints (context.width, context.height)
🔡 Auto-scaling text with context.scaleText(...)
🔀 Dynamic Row/Column layout with ResponsiveSplitBody
🧩 ResponsiveCenteredBody for centered readable content
⚙️ Customizable breakpoints
🧠 Inherited context with ResponsiveLayoutProvider
🧪 Built-in example app
Add to your pubspec.yaml:
dependencies:
responsive_ui_kit : ^0.0.2
Import the package.
import 'package:flutter_responsive_ui/responsive_ui_kit.dart';
https://github.com/user-attachments/assets/6e97004f-8694-4885-a852-5918e5615e8a
Wrap your app with ```ResponsiveLayoutProvider```` to access screen size in the widget tree:
void main() {
runApp(
const ResponsiveLayoutProvider(
child: MaterialApp(
home: MyHomePage(),
),
),
);
}
ResponsiveCenteredBodyCenter your content and constrain its width (default maxWidth = 640).
ResponsiveCenteredBody(
maxWidth: 720,
backgroundColor: Colors.grey[200],
child: Text("Centered content"),
)
ResponsiveSplitBodyAutomatically switches between vertical and horizontal layout:
ResponsiveSplitBody(
primaryChild: Text("Primary"),
secondaryChild: Text("Secondary"),
gap: 16,
)
Force layout direction:
ResponsiveSplitBody(
forceVerticalLayout: true, // Always vertical
)
Custom breakpoints:
use maxMobileWidth property of BreakPoints
ResponsiveSplitBody(
breakPoints: BreakPoints(maxMobileWidth: 700),
)
final screenWidth = context.width;
final screenHeight = context.height;
Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
'text widget scaling with screen size',
style: TextStyle(
color: Colors.amber,
// getRespSize will scale your given size according to screen size and TextSizes is class where you can some standarad
//text sizes
fontSize: getRespSize(context, size: TextSizes.titleMedium),
// TextScalingValues parameter to control of scaling
),
),
Icon(Icons.home, size: getRespSize(context, size: 22))
],
),
| Feature | Usage |
|---|---|
| Max width | ResponsiveCenteredBody(maxWidth: ...) |
| Custom breakpoints | BreakPoints(maxMobileWidth: ...) |
| Gap between children | gap: 20 in ResponsiveSplitBody |
| Flex ratios | primaryFlex, secondaryFlex |
| Cross axis alignment | crossAxisAlignment: CrossAxisAlignment.start |
의존성 목록 3 개
{"sdk":"flutter"}{"sdk":"flutter"}^5.0.0사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗