import 'package:feelverapp/util/SizeConfig.dart';
import 'package:flutter/material.dart';

class ServiceSuccessPage extends StatefulWidget {
  @override
  _ServiceSuccessPageState createState() => _ServiceSuccessPageState();
}

class _ServiceSuccessPageState extends State<ServiceSuccessPage> {

  @override
  Widget build(BuildContext context) {
    SizeConfig(context);
    return Container(
      child: ListView(
        children: <Widget>[
          Card1(),
          Card2()
        ],
      ),
    );
  }

  Widget Card1(){
    return Card(
      margin: EdgeInsets.only(right: SizeConfig.getPadding(16),left: SizeConfig.getPadding(16),top: SizeConfig.getPadding(20),bottom: SizeConfig.getPadding(10)),
      child: Container(
          margin: EdgeInsets.only(right: 15,left: 15,bottom: 20,top: 20),
//                          color: Colors.yellow,
          child: Column(
            children: <Widget>[
              Row(
                children: <Widget>[
                  Expanded(
                    flex: 3,
                    child: Container(
//                          color: Colors.blue,
                      height: SizeConfig.getHeight(200),
                      child: Image.asset("assets/images/demo_img.png",
                        fit: BoxFit.cover,),
                    ),
                  ),
                  Expanded(
                    flex: 5,
                    child: Container(
                      margin: EdgeInsets.only(left: 15),
//                          color: Colors.yellow,
                      height: SizeConfig.getHeight(200),
                      child: Column(
                        children: <Widget>[

                          Container(
                            padding: EdgeInsets.all(10),
                            alignment: Alignment.topLeft,
//                                  color: Colors.red,
                            child: Column(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: <Widget>[
                                Text("Thai Body Balance",style: TextStyle(
                                    color: Colors.black,
                                    fontSize: SizeConfig.getFontSize(12),
                                    fontFamily: "SF_Pro_Text",
                                    fontWeight: FontWeight.w500),),
                                SizedBox(
                                  height: 5,
                                ),
                                Text("SPA Cenvaree @ Centara Grand CentralWorld Bangkok",style: TextStyle(
                                    color: Color(0xff969696),
                                    fontSize: SizeConfig.getFontSize(11),
                                    fontFamily: "SF_Pro_Text",
                                    fontWeight: FontWeight.w500),),
                              ],
                            ),
                          ),


                          Container(
                            padding: EdgeInsets.only(left: 10,right: 10),
                            alignment: Alignment.topLeft,
//                                  color: Colors.blue,
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.start,
                              children: <Widget>[
                                Row(
                                  crossAxisAlignment: CrossAxisAlignment.center,
                                  children: <Widget>[
                                    Icon(Icons.access_time,color: Color(0xffEEAFB7),),
                                    SizedBox(
                                      width: 5,
                                    ),
                                    Text("150 Min",style: TextStyle(
                                      color: Colors.black,
                                      fontSize: SizeConfig.getFontSize(13),
                                      fontFamily: "SF_Pro_Text",
                                    ),),
                                  ],
                                ),

                                SizedBox(
                                  height: 10,
                                ),

                                Row(
                                  crossAxisAlignment: CrossAxisAlignment.end,
                                  children: <Widget>[
                                    Text("฿599.0",style: TextStyle(fontSize: SizeConfig.getFontSize(12),decoration: TextDecoration.lineThrough,),),
                                    SizedBox(
                                      width: 15,
                                    ),
                                    Text("฿199.00",style: TextStyle(
                                        color: Colors.red,
                                        fontSize: SizeConfig.getFontSize(18),
                                        fontFamily: "SF_Pro_Text",
                                        fontWeight: FontWeight.w500),),
                                  ],
                                ),
                              ],
                            ),

                          ),

                          Expanded(
                            child: Container(
//                          color: Colors.blue,
                              padding: EdgeInsets.only(left: 10,right: 10,top: 10,bottom: 10),
                              alignment: Alignment.bottomLeft,
                              child: Text("",style: TextStyle(
                                  color: Color(0xff6AB3AA),
                                  fontSize: SizeConfig.getFontSize(14),
                                  fontFamily: "SF_Pro_Text",
                                  fontWeight: FontWeight.w500),),

                            ),
                          ),


                        ],
                      ),

                    ),
                  ),
                ],
              ),
              Container(
                width: double.infinity,
                padding: EdgeInsets.only(bottom: SizeConfig.getPadding(10),top: SizeConfig.getPadding(20),left: 0,right: 0),
                height: SizeConfig.getHeight(80),
//                  color: Colors.blue,
                child: RaisedButton(
                    shape: new RoundedRectangleBorder(
                        borderRadius: new BorderRadius.circular(180.0)),
                    child: Text(
                      "Ratings",
                      style: TextStyle(
                          color: Colors.white,
                          fontSize: SizeConfig.getFontSize(16),
                          fontFamily: "SF_Pro_Text",
                          fontWeight: FontWeight.w500),
                    ),
                    color: Color(0xffE8A6B4),
                    onPressed: () {

                    }
                ),
              ),
            ],
          )
      ),
    );
  }


  Widget Card2(){
    return Card(
      margin: EdgeInsets.only(right: SizeConfig.getPadding(16),left: SizeConfig.getPadding(16),top: SizeConfig.getPadding(20),bottom: SizeConfig.getPadding(10)),
      child: Container(
          margin: EdgeInsets.only(right: 15,left: 15,bottom: 20,top: 20),
//                          color: Colors.yellow,
          child: Column(
            children: <Widget>[
              Row(
                children: <Widget>[
                  Expanded(
                    flex: 3,
                    child: Container(
//                          color: Colors.blue,
                      height: SizeConfig.getHeight(200),
                      child: Image.asset("assets/images/demo_img.png",
                        fit: BoxFit.cover,),
                    ),
                  ),
                  Expanded(
                    flex: 5,
                    child: Container(
                      margin: EdgeInsets.only(left: 15),
//                          color: Colors.yellow,
                      height: SizeConfig.getHeight(200),
                      child: Column(
                        children: <Widget>[

                          Container(
                            padding: EdgeInsets.all(10),
                            alignment: Alignment.topLeft,
//                                  color: Colors.red,
                            child: Column(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: <Widget>[
                                Text("Thai Body Balance",style: TextStyle(
                                    color: Colors.black,
                                    fontSize: SizeConfig.getFontSize(12),
                                    fontFamily: "SF_Pro_Text",
                                    fontWeight: FontWeight.w500),),
                                SizedBox(
                                  height: 5,
                                ),
                                Text("SPA Cenvaree @ Centara Grand CentralWorld Bangkok",style: TextStyle(
                                    color: Color(0xff969696),
                                    fontSize: SizeConfig.getFontSize(11),
                                    fontFamily: "SF_Pro_Text",
                                    fontWeight: FontWeight.w500),),
                              ],
                            ),
                          ),


                          Container(
                            padding: EdgeInsets.only(left: 10,right: 10),
                            alignment: Alignment.topLeft,
//                                  color: Colors.blue,
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.start,
                              children: <Widget>[
                                Row(
                                  crossAxisAlignment: CrossAxisAlignment.center,
                                  children: <Widget>[
                                    Icon(Icons.access_time,color: Color(0xffEEAFB7),),
                                    SizedBox(
                                      width: 5,
                                    ),
                                    Text("150 Min",style: TextStyle(
                                      color: Colors.black,
                                      fontSize: SizeConfig.getFontSize(13),
                                      fontFamily: "SF_Pro_Text",
                                    ),),
                                  ],
                                ),

                                SizedBox(
                                  height: 10,
                                ),

                                Row(
                                  crossAxisAlignment: CrossAxisAlignment.end,
                                  children: <Widget>[
                                    Text("฿599.0",style: TextStyle(fontSize: SizeConfig.getFontSize(12),decoration: TextDecoration.lineThrough,),),
                                    SizedBox(
                                      width: 15,
                                    ),
                                    Text("฿199.00",style: TextStyle(
                                        color: Colors.red,
                                        fontSize: SizeConfig.getFontSize(18),
                                        fontFamily: "SF_Pro_Text",
                                        fontWeight: FontWeight.w500),),
                                  ],
                                ),
                              ],
                            ),

                          ),

                          Expanded(
                            child: Container(
//                          color: Colors.blue,
                              padding: EdgeInsets.only(left: 10,right: 10,top: 10,bottom: 10),
                              alignment: Alignment.bottomLeft,
                              child: Text("",style: TextStyle(
                                  color: Color(0xff6AB3AA),
                                  fontSize: SizeConfig.getFontSize(14),
                                  fontFamily: "SF_Pro_Text",
                                  fontWeight: FontWeight.w500),),

                            ),
                          ),


                        ],
                      ),

                    ),
                  ),
                ],
              ),
              Container(
                width: double.infinity,
                padding: EdgeInsets.only(bottom: SizeConfig.getPadding(10),top: SizeConfig.getPadding(20),left: 0,right: 0),
                height: SizeConfig.getHeight(80),
//                  color: Colors.blue,
                child: RaisedButton(
                    shape: new RoundedRectangleBorder(
                        borderRadius: new BorderRadius.circular(180.0)),
                    child: Text(
                      "View shop scores",
                      style: TextStyle(
                          color: Colors.white,
                          fontSize: SizeConfig.getFontSize(16),
                          fontFamily: "SF_Pro_Text",
                          fontWeight: FontWeight.w500),
                    ),
                    color: Color(0xff3694A3),
                    onPressed: () {

                    }
                ),
              ),
            ],
          )
      ),
    );
  }
}
