bodyContent method

List<Widget> bodyContent(
  1. double height,
  2. bool isLandscape,
  3. BuildContext context,
  4. String selectedLanguage,
)

Implementation

List<Widget> bodyContent(
  double height,
  bool isLandscape,
  BuildContext context,
  String selectedLanguage,
) {
  return [
    SizedBox(height: isLandscape ? height / 4 : 0),
    Stack(
      children: [
        Align(
          alignment: Alignment.center,
          child: Container(
            width: 208,
            height: 226,
            margin: const EdgeInsets.only(top: 5),
            decoration: BoxDecoration(
              color: imageBackgroundColor,
              borderRadius: BorderRadius.circular(30),
            ),
            child: Container(),
          ),
        ),
        Align(
          alignment: Alignment.center,
          child: Image.network(
            frameIcon,
            width: 220,
            height: 239,
          ),
        ),
      ],
    ),
    SizedBox(height: isLandscape ? height / 3 : 0),
    Text(
      instructionText[selectedLanguage]!,
      textAlign: TextAlign.center,
      style: const TextStyle(
        color: selfieTextColor,
        fontWeight: FontWeight.w400,
        fontSize: 20,
      ),
    ),
    SizedBox(height: isLandscape ? height / 3 : 0),
    Container(
      width: double.infinity,
      height: 62,
      margin: const EdgeInsets.only(bottom: 40),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(5),
        gradient: const LinearGradient(colors: buttonGradient),
      ),
      child: ElevatedButton(
        style: ElevatedButton.styleFrom(
          backgroundColor: Colors.transparent,
          shadowColor: Colors.transparent,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(5),
          ),
        ),
        onPressed: () {
          Navigator.of(context).push(
            MaterialPageRoute(
              builder: (routeContext) => const FaceVerificationPage(),
            ),
          );
        },
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Image.network(
              cameraIcon,
              height: 24,
              width: 24,
            ),
            const SizedBox(width: 5),
            Text(
              buttonContent[selectedLanguage]!,
              style: const TextStyle(
                color: white,
                fontWeight: FontWeight.w500,
                fontSize: 16,
              ),
            )
          ],
        ),
      ),
    ),
  ];
}