Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flutter0430
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kim daeun
flutter0430
Commits
dc69b6fe
Commit
dc69b6fe
authored
2 months ago
by
김다은
Browse files
Options
Downloads
Patches
Plain Diff
checklist
parent
ee6b8a7a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/checklist_Item.dart
+35
-0
35 additions, 0 deletions
lib/checklist_Item.dart
lib/checklist_view.dart
+21
-1
21 additions, 1 deletion
lib/checklist_view.dart
with
56 additions
and
1 deletion
lib/checklist_Item.dart
0 → 100644
+
35
−
0
View file @
dc69b6fe
import
'package:flutter/material.dart'
;
class
CheckListItem
extends
StatefulWidget
{
final
String
title
;
CheckListItem
({
required
this
.
title
});
@override
State
<
StatefulWidget
>
createState
()
=
>
_CheckListItem
();
}
class
_CheckListItem
extends
State
<
CheckListItem
>
{
bool
_isChecked
=
false
;
void
_check
(){
setState
(()
{
_isChecked
=!
_isChecked
;
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
GestureDetector
(
onTap:
_check
,
child:
Container
(
height:
32
,
child:
Text
(
widget
.
title
,
style:
TextStyle
(
color:
_isChecked
?
Colors
.
grey
:
Colors
.
black
,
decoration:
_isChecked
?
TextDecoration
.
lineThrough
:
null
),),
),
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lib/checklist_view.dart
+
21
−
1
View file @
dc69b6fe
// checklist_view.dart
import
'package:flutter/material.dart'
;
import
'package:flutter_application_0430/checklist_Item.dart'
;
class
ChecklistView
extends
StatefulWidget
{
const
ChecklistView
({
super
.
key
});
...
...
@@ -9,12 +10,31 @@ class ChecklistView extends StatefulWidget {
}
class
_ChecklistViewState
extends
State
<
ChecklistView
>
{
List
<
String
>
checkList
=
[
"실전코딩 플러터 기본 과제"
,
"PPT 만들기"
,
"재맞고 수료증 출력 후 제출"
];
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'checklist'
)),
body:
Container
(),
body:
Container
(
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
40
,
vertical:
20
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
<
Widget
>
.
generate
(
checkList
.
length
,(
index
)
{
return
CheckListItem
(
title:
checkList
[
index
]);
},),
),
),
);
}
}
class
string
{
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment