import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_edit.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_item.dart';

class GoodsSharePreview extends StatefulWidget {
  @override
  _GoodsSharePreviewState createState() => _GoodsSharePreviewState();
}

class _GoodsSharePreviewState extends State<GoodsSharePreview> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        Navigator.pop(context);
      },
      child: Scaffold(
        backgroundColor: Colors.transparent,
        body: BackdropFilter(
          filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
          child: Column(
            children: <Widget>[
              Expanded(
                child: Container(),
              ),
              Container(
                width: double.infinity,
                padding: EdgeInsets.only(left: 12.5, right: 12.5, top: 15),
                decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(13),
                ),
                child: SafeArea(
                  top: false,
                  child: Column(
                    children: <Widget>[
                      Padding(
                        padding: const EdgeInsets.only(bottom: 8.0),
                        child: Text(
                          '预览模版',
                          style: TextStyle(
                            fontSize: 16,
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                      ),
                      GoodsShareItem(
                        child: GoodsShareEdit(
                          '至高减600【24期免息】xiaomi/小米10Pro 5G手机骁龙865智能游戏拍照手机官方旗舰店小米10青春正品k305g现货\n\n原价】3999元\n券后价】3989元\n【用智莺生活再省】19.74元\n-------------\n復製(FRH51Lu9hYF),\n用【Tao·寳】下单\n-------------\n商品链接】\nhttp://hsrj3.cn/ps/FRH51Lu9hYF.html)\n',
                        ),
                      ),
                      Padding(
                        padding: const EdgeInsets.only(top: 8),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: <Widget>[
                            Container(
                              margin: EdgeInsets.only(left: 5),
                              width: 110,
                              height: 36,
                              decoration: BoxDecoration(
                                color: Colors.orangeAccent,
                                borderRadius: BorderRadius.circular(18),
                              ),
                              child: Center(
                                child: Text(
                                  '返回编辑',
                                  style: TextStyle(color: Colors.white),
                                ),
                              ),
                            ),
                            Container(
                              margin: EdgeInsets.only(left: 40),
                              width: 110,
                              height: 36,
                              decoration: BoxDecoration(
                                color: Colors.orangeAccent,
                                borderRadius: BorderRadius.circular(18),
                              ),
                              child: Center(
                                child: Text(
                                  '保存模板',
                                  style: TextStyle(color: Colors.white),
                                ),
                              ),
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
