halfwing1998
@halfwing1998
Reviews Written
3
Average Rating
4.7
Posts
Q&A
ํฌ์คํฐ ์ด๋ฏธ์ง ์ฝ์ ํ๋๋ฐ ์ค๋ฅ๋จ๋ค์..
์๋ง ์ด๋ ๊ฒ ๋ฃ์ผ๋ฉด ์ด๋ฏธ์ง๊ฐ ์ ๋์ฌ ๊ฒ์ ๋๋ค ์ฐธ๊ณ ๋ฐ๋๋๋ค images = movies?.map((m) => Image.asset('../images/'+m.poster)).toList();
- 0
- 4
- 502
Q&A
({this.movies}); ์์ movies๊ฐ ์๋ฌ๋๋ ์ด์ ๋ฅผ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค ใ ใ
initState ๋ถ๋ถ๊น์ง ์ ๋๋ค. ํ๋ฌํฐ๊ฐ null ๊ฐ์ ์ ๊ฒฝ ๋ง์ด ์ฐ๋ค์ ์ฐธ๊ณ ๋ฐ๋๋๋ค import 'package:flutter/material.dart'; import 'package:fluuterandfirebase/model/model_movie.dart'; class CarouselImage extends StatefulWidget { final List Movie> ? movies; CarouselImage({this.movies}); _CarouselImageState createState() => _CarouselImageState(); } class _CarouselImageState extends StateCarouselImage> { ListMovie> ? movies; ListWidget> ? images; ListString> ? keywords; Listbool> ? likes; int _currenetPage =0; String ? _currentKeyword; @override void initState() { super.initState(); movies = widget.movies; images = movies?.map((e) => Image.asset(e.poster)).toList(); keywords = movies?.map((e) => e.keyword).toList(); likes = movies?.map((e) => e.like).toList(); _currentKeyword = keywords![0]; }
- 1
- 10
- 925




