ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

#1/Flutter

[flutter] ํ”Œ๋Ÿฌํ„ฐ BackdropFilter

_์ฟ ๋‚˜ 2021. 11. 24. 10:27
728x90

 

 

์ฐธ๊ณ : ๐Ÿ”—

 

๊ฒน์ณ์ ธ ์žˆ๋Š” ๋ฐฐ๊ฒฝ์— ํšจ๊ณผ๋ฅผ ์ฃผ๊ณ  ์‹ถ์„ ๋•Œ! ์ธ๋“ฏ..

 

BackdropFilter ์œ„์ ฏ์—์„œ๋Š” ImageFilter์™€ child๋ฅผ ๋ณ€์ˆ˜๋กœ ์‚ฌ์šฉํ•˜๊ณ  ํ•„ํ„ฐ๋ฅผ child ์•„๋ž˜ ์œ„์ ฏ์— ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.

BackdropFilter(
    filter: ImageFilter.blur(
        sigmaX: 5,
        sigmaY: 5,
    ),
    child: // ์—ฌ๊ธฐ๋งŒ ํ•„ํ„ฐ๊ฐ€ ์ ์šฉ๋œ๋‹ค๊ณ  ํ•˜๋Š”๋ฐ....
);

๋ฐฐ๊ฒฝ์— ํ•„ํ„ฐ๋ฅผ ์ ์šฉํ•ด์„œ ๊ทธ๋ฆผ์ด ๋ณด์ด์ง€ ์•Š๊ฒŒ ํ•˜๋ ค๋ฉด child์— ๋นˆ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”

BackdropFilter(
    filter: ImageFilter.blur(
        sigmaX: 5,
        sigmaY: 5,
    ),
    child: Container(
        color: Colors.black.withOpacity(0),
    )
);

๊ทธ๋ƒฅ filter๊ฐ€ ์œ„์— ๋ฎ์–ด ์”Œ์›Œ์ง„๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š” ํŽธ์ด ๋น ๋ฅผ ๋“ฏ..

 

โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—1:24์ดˆโ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—

 

BackdropFilter๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์œ„์ ฏ ์ž์ฒด์— ํ•„ํ„ฐ๋ฅผ ์ ์šฉํ•˜๋Š” ๋Œ€์‹  ์œ„์ ฏ ์•„๋ž˜์— ๊ทธ๋ ค์ง„ ๊ฐ๊ฐ์˜ ํ•ญ๋ชฉ์— ํ•„ํ„ฐ๋ฅผ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Œ → ๊ทธ ๋ ˆ์ด์–ด ๋ฐ‘์— ์žˆ๋Š” ๊ฑด ๋‹ค ์ ์šฉ๋˜๋Š” ๊ฒƒ ๊ฐ™๋”๋ผ๊ณ ...

Flutter์—์„œ๋Š” ImageFiltered๋ฅผ ์“ฐ๋Š” ๊ฒƒ์„ ๊ถŒ์žฅ

ImageFiltered: ํ•ด๋‹น ์œ„์ ฏ๋งŒ ํ•„ํ„ฐ๋ฅผ ์ ์šฉ์‹œ์ผœ์ค€๋‹ค.

ImageFiltered(
    imageFilter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
  child: Image.asset('images/pic1.jpg', width: 200),
)

 

 

 

 

728x90
๋Œ“๊ธ€
250x250
250x250
๊ณต์ง€์‚ฌํ•ญ
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€
Total
Today
Yesterday
๋งํฌ
ยซ   2024/07   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
๊ธ€ ๋ณด๊ด€ํ•จ