Flutter(36)
-
ex12. Flexible과 Expanded
✅ Flexible vs Expandedimport 'package:flutter/material.dart';class ExFlexible extends StatelessWidget { const ExFlexible({super.key}); @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Column( children: [ // 1. Flexible과 Expanded를 사용하지 않았을 때! SizedBox(height: 20,), Text('Flexible, expanded 미사용'), ..
2024.06.12 -
ex11. SizedBox 실습
import 'package:flutter/material.dart';class EXKaKao extends StatelessWidget { const EXKaKao({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Container( width: double.infinity, height: 50, margin: EdgeInsets.all(10), decoration: BoxDecoration( color: Colors.yellow..
2024.06.12 -
ex10. SizedBox
✅ 배너✅ SizedBox✅ ExSizedBoximport 'package:flutter/material.dart';class ExSizedBox extends StatelessWidget { const ExSizedBox({super.key}); // sizedbox의 목적! // 1. child 위젯의 크기를 조정하기 위한 목적! // 2. 위젯들 사이의 공간을 추가하기 위한 목적! @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Column( children: [ Container( width:..
2024.06.12 -
ex09. Container 실습
import 'package:flutter/material.dart';class ExExample extends StatelessWidget { const ExExample({Key? key}); @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Center( child: Column( children: [ Center( child: Row( mainAxisAlignment: MainAxisAlignment.center, c..
2024.06.12 -
ex08. Container
✅ 학습 목표✅ 오늘 새롭게 배울 위젯✅ Container Widgetimport 'package:flutter/material.dart';class ExContainer extends StatelessWidget { // 정적인 StatelessWidget / 동적 StatefulWidget const ExContainer({super.key}); @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Container( // 아무런 변화가 없음 // Container 생성 시 크기는 body의 영역만큼 생성이 된다! //..
2024.06.12 -
ex07. image
# 라이브러리를 연결하거나 이미지를 연결할 때 사용name: flutter0603description: "A new Flutter project."# The following line prevents the package from being accidentally published to# pub.dev using `flutter pub publish`. This is preferred for private packages.publish_to: 'none' # Remove this line if you wish to publish to pub.dev# The following defines the version and build number for your application.# A version num..
2024.06.12