본문 바로가기

Flutter-플러터/플러터 공부

Flutter - ExpansionTile

반응형

 

 

Flutter는 모든게 위젯이다..!! 

너무 좋다..!!!!!

 

ExpansionTile 위젯

사용법은 

title :  기본 보여주기 

children: [] 넣고 싶은 값 보여주기

 

 

ExpansionTile(
                              title: Column(
                                children: [
                                  Row(
                                    mainAxisAlignment:
                                        MainAxisAlignment.spaceBetween,
                                    children: [
                                      Text("${vatItem.today}"),
                                      IconButton(
                                          onPressed: () {
                                            controller.deleteVatList(index);
                                          },
                                          icon: Icon(CupertinoIcons.delete))
                                    ],
                                  ),
                                  Row(
                                    mainAxisAlignment:
                                        MainAxisAlignment.spaceBetween,
                                    children: [
                                      Text("예상 부가세"),
                                      Text(
                                          "${NumberFormat.currency(locale: 'ko_KR', symbol: '', decimalDigits: 0).format(vatItem.totalVAT)} 원")
                                    ],
                                  )
                                ],
                              ),
                              children: [
                                Column(
                                  children: [
                                    Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceAround,
                                      children: [
                                        Container(
                                            width: 80.w,
                                            height: 15.h,
                                            child: Text(
                                              "매출",
                                              textAlign: TextAlign.end,
                                            )),
                                        Container(
                                          width: 100.w,
                                          height: 15.h,
                                          child: Text(
                                            '${NumberFormat.currency(locale: 'ko_KR', symbol: '', decimalDigits: 0).format(vatItem.sales)} 원',
                                            textAlign: TextAlign.end,
                                          ),
                                        ),
                                      ],
                                    ),
                                    Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceAround,
                                      children: [
                                        Container(
                                            width: 80.w,
                                            height: 15.h,
                                            child: Text(
                                              '식재료',
                                              textAlign: TextAlign.end,
                                            )),
                                        Container(
                                          width: 100.w,
                                          height: 15.h,
                                          child: Text(
                                            '${NumberFormat.currency(locale: 'ko_KR', symbol: '', decimalDigits: 0).format(vatItem.materials)} 원',
                                            textAlign: TextAlign.end,
                                          ),
                                        ),
                                      ],
                                    ),
                                    Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceAround,
                                      children: [
                                        Container(
                                            width: 80.w,
                                            height: 15.h,
                                            child: Text(
                                              '공산품',
                                              textAlign: TextAlign.end,
                                            )),
                                        Container(
                                          width: 100.w,
                                          height: 15.h,
                                          child: Text(
                                            '${NumberFormat.currency(locale: 'ko_KR', symbol: '', decimalDigits: 0).format(vatItem.goods)} 원',
                                            textAlign: TextAlign.end,
                                          ),
                                        ),
                                      ],
                                    ),
                                    Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceAround,
                                      children: [
                                        Container(
                                            width: 80.w,
                                            height: 15.h,
                                            child: Text(
                                              '매출 과세표준',
                                              textAlign: TextAlign.end,
                                            )),
                                        Container(
                                          width: 100.w,
                                          height: 15.h,
                                          child: Text(
                                            '${NumberFormat.currency(locale: 'ko_KR', symbol: '', decimalDigits: 0).format(vatItem.vatOnSales)} 원',
                                            textAlign: TextAlign.end,
                                          ),
                                        ),
                                      ],
                                    ),
                                    Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceAround,
                                      children: [
                                        Container(
                                            width: 80.w,
                                            height: 15.h,
                                            child: Text(
                                              "지출 과세표준",
                                              textAlign: TextAlign.end,
                                            )),
                                        Container(
                                          width: 100.w,
                                          height: 15.h,
                                          child: Text(
                                            '${NumberFormat.currency(locale: 'ko_KR', symbol: '', decimalDigits: 0).format(vatItem.vatOnMaterials)} 원',
                                            textAlign: TextAlign.end,
                                          ),
                                        ),
                                      ],
                                    ),
                                    Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceAround,
                                      children: [
                                        Container(
                                            width: 80.w,
                                            height: 15.h,
                                            child: Text(
                                              "의제매입공제",
                                              textAlign: TextAlign.end,
                                            )),
                                        Container(
                                          width: 100.w,
                                          height: 15.h,
                                          child: Text(
                                            '${NumberFormat.currency(locale: 'ko_KR', symbol: '', decimalDigits: 0).format(vatItem.inputDeduction)} 원',
                                            textAlign: TextAlign.end,
                                          ),
                                        ),
                                      ],
                                    ),
                                    Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceAround,
                                      children: [
                                        Container(
                                            width: 80.w,
                                            height: 15.h,
                                            child: Text(
                                              "신용카드공제",
                                              textAlign: TextAlign.end,
                                            )),
                                        Container(
                                          width: 100.w,
                                          height: 15.h,
                                          child: Text(
                                            '${NumberFormat.currency(locale: 'ko_KR', symbol: '', decimalDigits: 0).format(vatItem.creditCardDeduction)} 원',
                                            textAlign: TextAlign.end,
                                          ),
                                        ),
                                      ],
                                    ),
                                  ],
                                ),
                              ],
                            ),

 

728x90
반응형