Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
KLUGLUG
debugs
Commits
42ad3137
Commit
42ad3137
authored
Aug 07, 2019
by
susheel chebrolu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uploaded feedback File
parent
e8c1d1ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
0 deletions
+79
-0
Hostel Management System/source code/feedback.dart
Hostel Management System/source code/feedback.dart
+79
-0
No files found.
Hostel Management System/source code/feedback.dart
0 → 100644
View file @
42ad3137
import
'package:flutter/material.dart'
;
class
FeedbackPage
extends
StatefulWidget
{
static
String
tag
=
'feedback'
;
@override
Feedback
createState
()
=>
new
Feedback
();
}
class
Feedback
extends
State
<
FeedbackPage
>
{
int
_currentStep
=
0
;
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
body:
CustomScrollView
(
slivers:
<
Widget
>[
SliverAppBar
(
expandedHeight:
200.0
,
floating:
false
,
pinned:
true
,
flexibleSpace:
FlexibleSpaceBar
(
title:
Text
(
'FeedBack'
),
background:
Image
.
asset
(
'assets/post.jpg'
),
),
),
SliverFillRemaining
(
child:
Stepper
(
steps:
_mySteps
(),
currentStep:
this
.
_currentStep
,
onStepTapped:
(
step
){
setState
(()
{
this
.
_currentStep
=
step
;
});
},
onStepContinue:
(){
setState
(()
{
if
(
this
.
_currentStep
<
this
.
_mySteps
().
length
-
1
){
this
.
_currentStep
=
this
.
_currentStep
+
1
;
}
else
{
//Logic to check if everything is completed
print
(
'Completed, check fields.'
);
}
});
},
onStepCancel:
()
{
setState
(()
{
if
(
this
.
_currentStep
>
0
){
this
.
_currentStep
=
this
.
_currentStep
-
1
;
}
else
{
this
.
_currentStep
=
0
;
}
});
},
),
),
],
),
);
}
List
<
Step
>
_mySteps
(){
List
<
Step
>
_steps
=
[
Step
(
title:
Text
(
'Step 1'
),
content:
TextField
(),
isActive:
_currentStep
>=
0
,
),
Step
(
title:
Text
(
'Step 2'
),
content:
TextField
(),
isActive:
_currentStep
>=
1
,
),
Step
(
title:
Text
(
'Step 3'
),
content:
TextField
(),
isActive:
_currentStep
>=
2
,
)
];
return
_steps
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment