/*
 * @Author: XianKaiQun
 * @Date: 2020-09-09 17:10:01
 * @LastEditors: ChenYaJin
 * @LastEditTime: 2023-04-06 10:00:02
 * @Description: 
 */
part of '../index.dart';

class _ExampleComponent extends StatelessWidget {
  const _ExampleComponent({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    final style = WTheme.of(context);
    final colorScheme = style.colorScheme;
    final images = [
      AssetList.$example_png_image,
      AssetList.$exampleError_png_image,
      AssetList.$exampleError2_png_image,
    ];
    final iconImages = [
      AssetList.$check_png_image,
      AssetList.$close_png_image,
      AssetList.$close_png_image,
    ];
    final text = [
      '正确示范',
      '没有入镜',
      '遮挡脸部',
    ];
// final store = Provider.of<PrivateExampleStore>(context, listen: false);
    return WisCard(
      isSliver: true,
      color: Colors.white,
      margin: EdgeInsets.symmetric(horizontal: 15.pt, vertical: 10.pt),
      elevation: 0,
      child: Wisdom.column(
        color: Colors.white,
        crossAxisAlignment: CrossAxisAlignment.stretch,
        padding: EdgeInsets.all(15.pt),
        children: [
          Text(
            '照片示范',
            style: TextStyle(
              fontWeight: FontWeight.bold,
              fontSize: 16.pt,
            ),
          ),
          SizedBox(height: 10.pt),
          Text(
            '请按正确示范添加照片',
            style: TextStyle(color: colorScheme.warning),
          ),
          SizedBox(height: 20.pt),
          Row(
            children: [
              for (var i = 0; i < images.length; i++)
                Wisdom.column(
                  padding: EdgeInsets.fromLTRB(0, 15.pt, 30.pt, 15.pt),
                  children: [
                    Wisdom.stack(
                      clipBehavior: Clip.none,
                      children: [
                        WImage(
                          image: images[i],
                          width: 60.pt,
                        ),
                        Positioned(
                          top: -10.pt,
                          right: -10.pt,
                          child: Wisdom(
                            color: colorScheme.primary,
                            borderRadius: BorderRadius.circular(15.pt),
                            child: WImage(image: iconImages[i], width: 20.pt),
                          ),
                        ),
                      ],
                    ),
                    SizedBox(height: 10.pt),
                    Text(
                      text[i],
                      style: TextStyle(color: colorScheme.minor),
                    ),
                  ],
                ),
            ],
          ),
        ],
      ),
    );
  }
}
