import 'package:e_commerce_training/res/R.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class ConfirmationPage extends StatefulWidget {
  @override
  _ConfirmationPageState createState() => _ConfirmationPageState();
}

class _ConfirmationPageState extends State<ConfirmationPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Confirmation"),
      ),
      body: Stack(
        children: [
          SingleChildScrollView(
            padding: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
            child: Column(
              children: [
                buildRowText(title: R.string.name_register.tr(), name: "CongNgoc"),
                SizedBox(height: 20),
                buildRowText(title: R.string.gender.tr(), name: "CongNgoc"),
                SizedBox(height: 20),
              ],
            ),
          )
        ],
      ),
    );
  }

  Row buildRowText({String? title, String? name}) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Text(
          title ?? "",
          style: TextStyle(
            fontSize: 16.sp,
            fontWeight: FontWeight.w600,
            color: R.color.black,
          ),
        ),
        Text(
          name ?? "",
          style: TextStyle(
            fontSize: 16.sp,
            fontWeight: FontWeight.w600,
            color: R.color.black,
          ),
        ),
      ],
    );
  }
}
