Coder Social home page Coder Social logo

flutter_planets's Introduction

Hi there ๐Ÿ‘‹

kwangwooโ€™s github stats

flutter_planets's People

Contributors

ykw93 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.