Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

import 'package:bmi_app/input_data.

dart';
import 'package:flutter/material.dart';
class Result extends StatefulWidget {

Result({this.bmiresult,this.feedback,this.suggestion});
String bmiresult;
String feedback;
String suggestion;

@override
_ResultState createState() => _ResultState();
}

class _ResultState extends State<Result> {


@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF24233d),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(height: 20),
Text("YOUR RESULT",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white
),
),

SizedBox(height: 5),
Text(widget.feedback,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.pinkAccent
),
),

SizedBox(height: 5),
Text(widget.bmiresult,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white
),
),

SizedBox(height: 5),
Text(widget.suggestion,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white
),
),
Padding(padding: EdgeInsets.only(top: 350)),
GestureDetector(
onTap: (){
Navigator.push(context, MaterialPageRoute(builder:(context){
return BMICalc();
}));
},
child: Container(
height:35,
width: 265,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: Colors.pinkAccent
),
child: Center(
child: Text("Recalculate",
style: TextStyle(
color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.bold
),
),
),
),
),
],
),
) ,
);
}
}

You might also like