flutter_planets's Introduction
flutter_planets's People
flutter_planets's Issues
Lesson 4 ์ ๋ฆฌ
ListView ์์ฑ
- itemExtent: listview ์์ ์๋ ์์ดํ
ํ์ ํฌ๊ธฐ๊ฐ ๊ฐ๋ค๋ฉด itemExtent ์ง์ ์ ํตํด ๋์ ์ฑ๋ฅ์ ๋ผ ์ ์๋ค.
ex) itemExtent : ํ์ ๋์ด ์ง์
ListView ์ฌ์ฉ ์ ์ฃผ์์ - Column ์์ listview๋ฅผ ์ฌ์ฉ ์ ListView ๋์ด๋ฅผ ์ธก์ ํ ์ ์์ด ์๋ฌ๊ฐ ๋ฐ์ํ๋ค.
ํด๊ฒฐ๋ฐฉ๋ฒ์ ListView๋ฅผ ๊ฐ์ธ๊ณ ์๋ ์์ ฏ์ ์ง์ ๋ ๋์ด๋ฅผ ์ฃผ๋ ๋ฐฉ๋ฒ์ด ์์ง๋ง ์ด๊ฑด ๋๋ฐ์ด์ค ๋ง๋ค ๋์ด๊ฐ ๋ค๋ฅธ ๋ฌธ์ ์ ์ด ์๋ค ์ ์ผ ์ฌ์ด ๋ฐฉ๋ฒ์ ListView๋ฅผ Expanded ์์ ฏ์ผ๋ก ๊ฐ์ธ์ ํด๊ฒฐ! - Expanded ์์ ฏ์ ๋ด๋ถ ์์ ฏ ํฌ๊ธฐ๋ฅผ ๊ณ์ฐ ํ ๋จ์ ๊ณต๊ฐ์ ๋ชจ๋ ํ๋ณดํ๋ฏ๋ก ListView์ ์ ์ ํ ํฌ๊ธฐ๋ฅผ ๋ถ์ฌ ํ ์ ์๋ค.
Sliver..
- Sliver์ ๋ํ ์์ ฏ์ CustomScrollView ๋ด๋ถ์ ๋ฐฐ์นํด์ผ ํ๋ค.
Sliver ์ข ๋ฅ
- SliverAppBar: used to create a collapsable material AppBar.
- SliverList: a linear list of items.
- SliverFixedExtentList: similar to the previous one, but for items with fixed height.
(๋ฆฌ์คํธ ์์ดํ ์ ํฌ๊ธฐ๊ฐ ๊ฐ๋ค๋ฉด ์ฌ์ฉ) - SliverToBoxAdapter: a sliver with a single child with a defined size.
- SliverPadding: a simple sliver that contains antoher Sliver and allows us to apply a padding.
์ฐธ๊ณ
Lesson 6 ์ ๋ฆฌ
BoxFit์ ๋ํด
- BoxFit.contain : ๊ฐ๋ก์ธ๋ก ๋น์จ ๋ณํ ์์ (์๋ณธ)
- BoxFit.fill : ์ง์ ํ ์์ญ์ ๊ฝ ์ฑ์. (๋น์จ ๋ณ๊ฒฝ๋จ)
- BoxFit.fitWidth : ๋๋น์ ๋ง๊ฒ ํ๋ ๋๋ ์ถ์. ์ํ์ผ๋ก ํฌ๊ธฐ๊ฐ ์ง์ ๋๊ธฐ ๋๋ฌธ์ ์์๋ ์ฌ๋ฐฑ ๋ฐ์ ๊ฐ๋ฅ.
- BoxFit.fitHeight : ๋์ด์ ๋ง๊ฒ ํ๋ ๋๋ ์ถ์. ์์ง์ผ๋ก ํฌ๊ธฐ๊ฐ ์ง์ ๋๊ธฐ ๋๋ฌธ์ ์ํ์ผ๋ก ์ฌ๋ฐฑ ๋ฐ์ ๊ฐ๋ฅ.
- BoxFit.cover : ์ง์ ํ ์์ญ์ ๊ฝ ์ฑ์. (๋น์จ ์ ์ง)
- BoxFit.none : ์๋ณธ์ผ๋ก๋ถํฐ ํด๋น ์์ญ ํฌ๊ธฐ๋งํผ ๊ฐ์ด๋ฐ๋ฅผ ์ถ๋ ฅ. (๊ธฐ๋ณธ ์ต์ , ์๋ณธ ํฌ๊ธฐ ์ ์ง)
Flutter Named Constructor ์ ๋ํด
class Player {
String name;
String color;
// basic Contructor
Player({this.name, this.color});
// Named Constructor ex) ํด๋์ค๋ช
.name
// ์ฝ๋ก ์ ํตํด ๊ฐ๊ฐ ๋ฐ์ดํฐ๋ฅผ ์ง์ ์ด๊ธฐํ
Player.fromPlayer(Player another) : // ์ฒซ๋ฒ์งธ ์ฌ์ฉ๋ฒ
color = another.color,
name = another.name;
Player.fromPlayer(Player another) { // ๋๋ฒ์งธ ์ฌ์ฉ๋ฒ
color = another.color;
name = another.name;
}
}
Lesson 5 ์ ๋ฆฌ
-
ํ๋ฌํฐ์์ ๊ฐ๊ฐ์ ํ๋ฉด์ Route๋ผ๊ณ ๋ถ๋ฅด๋ฉฐ ํ๋ฉด์ ์ด๋ํ๊ธฐ ์ํด์๋ Navigator๋ฅผ ์ฌ์ฉํ๋ค.
(์๋๋ก์ด๋๊ฐ ํ๋ฉด ์ด๋ ์ ์กํฐ๋นํฐ๋ค์ด ์กํฐ๋นํฐ ์คํ์ ์์ด๋ ๊ฒ์ฒ๋ผ ํ๋ฌํฐ๋ Navigator ์คํ์ Route๊ฐ ์์ด๊ฒ ๋๊ณ push, pop์ ํตํด ํ๋ฉด์ ์กฐ์ํ๋ค.) -
Container์ ๊ฐ์ด ๋ณ๋์ ์ ์ค์ณ ๊ธฐ๋ฅ์ ์ ๊ณตํ์ง ์๋ ์์ ฏ์ ์ ์ค์ณ ๊ธฐ๋ฅ์ ์ถ๊ฐํ๊ณ ์ ํ ๋ InkWell, GestureDetector ์์ ฏ์ Wrapping ํ์ฌ onTab, onDoubleTap, onLongPress ๋ฑ ๋ค์ํ ๊ธฐ๋ฅ์ ์ฌ์ฉ
(InkWell์ ์ฌ์ฉํ๋ฉด ์๋๋ก์ด๋์ ์๋ ripple effect ํจ๊ณผ๋ฅผ ์ค ์ ์์)
-Hero ์์ ฏ์ ํ๋ฉด ์ฌ์ด์ ์ฌ์ด ์ ๋๋ฉ์ด์ ์ ์ ๊ณต (https://www.youtube.com/watch?v=Be9UH1kXFDw)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.