본문 바로가기
728x90

DART10

LabeledCheckbox -> CheckTileList CheckTileList 를 사용할 때마다 문제점이 생기는데, 이렇게 사용하면 문제 될 일이 없어보인다. https://api.flutter-io.cn/flutter/material/CheckboxListTile-class.html CheckboxListTile class - material library - Dart API A ListTile with a Checkbox. In other words, a checkbox with a label. The entire list tile is interactive: tapping anywhere in the tile toggles the checkbox. The value, onChanged, activeColor and checkColor propertie.. 2023. 6. 23.
ChatGpt 사용해서 flutter dart 코딩하기 질문 In flutter, horizontal listview, which when I click most left circle button, the other 5 buttons will be appear with 0.5 second animation and when I click the other buttons, the most left circle button will be change to clicked button. The other buttons is circle and indicate 5 colors. 답: import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidg.. 2023. 2. 4.
sublist 오류 막기 import 'dart:math'; void main() { var a = [1,2,3,4,5,6]; var c = [1]; var b= a.sublist(0,2); var d= c.sublist(0,2); 다음과 같은 식은 오류가 발생한다. 왜냐? c는 2보다 작은 데 사이즈를 2크기로 잘라서 그렇다. 그렇다면, 해결해주려면 어떻게 해야할까? 이렇게 해결해 줄 수 있다! var d= c.sublist(0,min(2, 0)); 2022. 12. 30.
dart 2차 정렬하기 (twice ordering) https://stackoverflow.com/questions/55920677/how-to-sort-a-list-based-on-two-values How to sort a list based on two values I have a list in which I want to sort based on two values date and the status like this: pollsList.sort((a, b) => b.active.compareTo(a.active)); pollsList.sort((a, b) { return b. stackoverflow.com pollsList.sort((a, b) { int cmp = b.actualStartDatetime.compareTo(a.actualStar.. 2022. 12. 16.
728x90