import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:uco_mobile_poc/app/core/extensions/build_context_ext.dart';
import 'package:uco_mobile_poc/app/custom_widgets/custom_app_bar.dart';

class QrViewScreen extends StatelessWidget {
  const QrViewScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: DashBoardAppBar(
        onBackButtonPressed: () {
          Get.back();
        },
      ),
      body: SizedBox(
        width: context.getWidth,
        height: context.getHeight,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            const Text("Qr View Screen"),
            const SizedBox(
              height: 20,
            ),
            QrImageView(
              data: '''
{
"channelCode":"01",
"porOrgacode":"0006",
"email":"",
"isOtpRequire":false,
"pinType":"C_TRANPIN"
}
''',
              version: QrVersions.auto,
              size: 200.0,
            ),
            const SizedBox(
              height: 20,
            ),
          ],
        ),
      ),
    );
  }
}
