New project started, Single step page started
This commit is contained in:
@@ -89,6 +89,13 @@ class Queries{
|
|||||||
static String colData = "data";
|
static String colData = "data";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ProjectStep{
|
||||||
|
ProjectStep(this.stepName,this.eta);
|
||||||
|
|
||||||
|
String stepName;
|
||||||
|
int eta;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -270,7 +270,15 @@ class NewProject2 extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _NewProject2State extends State<NewProject2> {
|
class _NewProject2State extends State<NewProject2> {
|
||||||
|
bool knowEta = false;
|
||||||
int etaHours = 1;
|
int etaHours = 1;
|
||||||
|
List<ProjectStep> steps = [
|
||||||
|
ProjectStep('Step 1', 3),
|
||||||
|
ProjectStep('Step 2', 2),
|
||||||
|
ProjectStep('Ez Step', 1),
|
||||||
|
ProjectStep('Very hard', 10),
|
||||||
|
ProjectStep('Finishing', 5)
|
||||||
|
];
|
||||||
DateTime deadline = DateTime.now().add(Duration(days:7));
|
DateTime deadline = DateTime.now().add(Duration(days:7));
|
||||||
late String? projectName;
|
late String? projectName;
|
||||||
_NewProject2State({String? pName}) {
|
_NewProject2State({String? pName}) {
|
||||||
@@ -294,7 +302,28 @@ class _NewProject2State extends State<NewProject2> {
|
|||||||
? Column(
|
? Column(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
children: [Text("eeeeeeee")],
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
child: Text('List your steps down')
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
color: Colors.white10,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
child:Column(
|
||||||
|
children: printSteps(),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@@ -307,10 +336,15 @@ class _NewProject2State extends State<NewProject2> {
|
|||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Text(
|
||||||
"Estimated Time to reach target")),
|
"Estimated Time to reach target")),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showDurationSelector(context,selectedHour: etaHours, onChange: (newVal){
|
showDurationSelector(context,selectedHour: etaHours, onChange: (newVal){
|
||||||
etaHours = newVal.inHours;
|
etaHours = newVal.inHours;
|
||||||
|
knowEta=true;
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -319,16 +353,35 @@ class _NewProject2State extends State<NewProject2> {
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white10,
|
color: (knowEta) ? Colors.green:Colors.white10,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(30),
|
BorderRadius.circular(30),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 100, vertical: 10),
|
horizontal: 50, vertical: 10),
|
||||||
child: Text("$etaHours Hours"),
|
child: Text("${(knowEta)?etaHours:'?'} Hours"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),InkWell(
|
||||||
|
onTap: (){
|
||||||
|
knowEta=false;
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
color: (knowEta) ? Colors.white10 :Colors.redAccent
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 20,vertical: 10),
|
||||||
|
child: Text("I have no idea"),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
@@ -415,4 +468,15 @@ class _NewProject2State extends State<NewProject2> {
|
|||||||
))
|
))
|
||||||
])));
|
])));
|
||||||
}
|
}
|
||||||
|
int selectedStep = 0;
|
||||||
|
List<Widget> printSteps(){
|
||||||
|
List<Widget> _steps = [];
|
||||||
|
|
||||||
|
for(int i=0; i < steps.)
|
||||||
|
_steps.add(
|
||||||
|
InkWell(onTap:(){se},child: Container(padding:EdgeInsets.symmetric(horizontal: 10,vertical: 2),child: Row(mainAxisSize:MainAxisSize.max,mainAxisAlignment: MainAxisAlignment.spaceBetween,children: [Text(value.stepName), Icon(Icons.timelapse), Text(value.eta.toString() + " Hours")],))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return _steps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user