오늘은 이거를 한번 해보도록 합시다.
모두 쉽게하셨으리라 생각합니다!!!
appBar: AppBar(title: Text("StatefulWidget"),),
후 하하 아주 훌륭합니다! 저는 이렇게 만들었어요.
class _MyAppState extends State<MyApp> {
//state 존
var like = 0;
너무 소심하게 만들어졌네요. 그래도 갯수는 잘 올라갑니다.
body: Container( height: 100, color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text('킹정갯수=' + like.toString()),
Text('플러터짱'),
ElevatedButton(
child: Text('좋아요'),
onPressed:(){
setState(() {
like++;
});
},)
],
),),