/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-09-26 16:03:33
 * @LastEditTime : 2023-07-13 10:10:25
 * @Description  : Do not edit
 */
part of '../index.dart';

/// 作业扫描二维码
class _BuildScanQRCode extends StatelessWidget {
  const _BuildScanQRCode({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final colorScheme = WTheme.of(context).colorScheme;
    final store = Provider.of<PointFormStore>(context);

    return Wisdom.column(
      padding: EdgeInsets.all(15.pt),
      color: Colors.white,
      margin: EdgeInsets.only(bottom: 10.pt, right: 15.pt, left: 15.pt),
      borderRadius: BorderRadius.circular(10.pt),
      boxShadow: [
        BoxShadow(
          offset: Offset(0, 2.pt),
          color: Color(0x08000000),
          blurRadius: 10.pt,
          spreadRadius: 2.5.pt,
        ),
      ],
      children: [
        Wisdom.row(
          margin: EdgeInsets.only(
            bottom: 10.pt,
          ),
          children: <Widget>[
            WisText(
              '作业标准',
              color: colorScheme.mainTitle,
              size: 16.pt,
              bold: true,
            ),
          ],
        ),
        Wisdom.row(
          padding: EdgeInsets.fromLTRB(0, 72.pt, 0, 25.pt),
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Wisdom.stack(
              /// 扫码
              onTap: () => store.onScanQRcode(),
              children: [
                Wisdom(
                  gradient: LinearGradient(
                    colors: [Color(0xFF52BBFF), Color(0xFF2589F3)],
                    begin: Alignment.topCenter,
                    end: Alignment.bottomCenter,
                  ),
                  borderRadius: BorderRadius.circular(100.pt),
                  boxShadow: [
                    BoxShadow(
                      color: Color(0XFF0F67F8).withOpacity(0.35),
                      spreadRadius: 2,
                      blurRadius: 10,
                      offset: Offset(3, 8), // changes position of shadow
                    ),
                  ],
                  height: 120.pt,
                  width: 120.pt,
                ),
                Positioned(
                  left: 43.pt,
                  top: 45.pt,
                  child: Image(
                    image: AssetList.$smewm_png_image,
                    width: 34.pt,
                    height: 30.pt,
                  ),
                ),
              ],
            ),
          ],
        ),
        WisText(
          '扫描点位二维码',
          color: colorScheme.mainTitle,
          size: 14.pt,
          weight: FontWeight.w300,
        ),
        SizedBox(height: 72.pt),
      ],
    );
  }
}
