|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/widgets/system_app_bar.dart';
|
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
|
|
|
|
import '../../../res/colors.dart';
|
|
|
|
import '../../../utils/screen_util.dart';
|
|
|
|
import '../../../utils/utils.dart';
|
|
|
|
import '../../../widgets/MyDivider.dart';
|
|
|
|
import '../../online_check/photo_view_wiget.dart';
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* 邀请函主题选择页面
|
|
|
|
*/
|
|
|
|
|
|
|
|
class InvitationThemeHomePage extends StatefulWidget {
|
|
|
|
InvitationThemeHomePage({Key key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
_InvitationThemeHomePageState createState() =>
|
|
|
|
_InvitationThemeHomePageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
|
|
|
|
ScrollController controller = ScrollController();
|
|
|
|
|
|
|
|
_showPhotoView(BuildContext context, int index, List<String> imgs,
|
|
|
|
{isShow = false, List dashName}) async {
|
|
|
|
// if (imgs.length == 1 &&
|
|
|
|
// imgs[0] ==
|
|
|
|
// 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
|
|
|
|
// imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
|
|
|
|
// }
|
|
|
|
Utils.setBarStatus(false, color: Colors.black);
|
|
|
|
dynamic result = await showGeneralDialog(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
// barrierColor: Colors.red,
|
|
|
|
barrierLabel:
|
|
|
|
MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
|
|
|
transitionDuration: const Duration(milliseconds: 150),
|
|
|
|
pageBuilder: (BuildContext context, Animation animation,
|
|
|
|
Animation secondaryAnimation) {
|
|
|
|
Widget child = Stack(
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
children: <Widget>[
|
|
|
|
PhotoPreview(
|
|
|
|
initialIndex: index,
|
|
|
|
photoList: imgs,
|
|
|
|
isShow: isShow,
|
|
|
|
dashName: dashName),
|
|
|
|
Positioned(
|
|
|
|
bottom: w(20),
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(30), vertical: w(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.circular(r(30)),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
'应用主题',
|
|
|
|
style: TextStyle(
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
);
|
|
|
|
return child;
|
|
|
|
});
|
|
|
|
Utils.setBarStatus(true, color: Colors.white);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
appBar: SystemAppBar('客户通知设置'),
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(16), top: w(12), bottom: w(12), right: w(24)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'主题颜色选择',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Text(
|
|
|
|
'群青绿',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(11), vertical: w(4)),
|
|
|
|
child: Image.asset(
|
|
|
|
"assets/arrow_right_new.png",
|
|
|
|
width: w(9),
|
|
|
|
height: w(16),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
// RoundButton(
|
|
|
|
// text: '预览',
|
|
|
|
// gradientStart: MyColours.color_ffffff,
|
|
|
|
// gradientEnd: MyColours.color_ffffff,
|
|
|
|
// borderColor: MyColours.color_438E93,
|
|
|
|
// textColor: MyColours.color_438E93,
|
|
|
|
// radius: ScreenUtil().setWidth(22),
|
|
|
|
// fontSize: 24,
|
|
|
|
// width: w(72),
|
|
|
|
// height: ScreenUtil().setWidth(44),
|
|
|
|
// isBold: true,
|
|
|
|
// onPressed: () {
|
|
|
|
// NavigatorUtil.goMarkingPreviewPage(context);
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
]))),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: w(16)),
|
|
|
|
child: MyDivider(double.infinity, w(0.5),
|
|
|
|
color: MyColours.color_E7E7E7)),
|
|
|
|
VEmptyView(24),
|
|
|
|
Expanded(
|
|
|
|
child: GridView.builder(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(16)),
|
|
|
|
controller: controller,
|
|
|
|
// padding: EdgeInsets.only(top: ScreenUtil().getAdapterSize(10)),
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: 7,
|
|
|
|
//SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
//横轴元素个数
|
|
|
|
crossAxisCount: 2,
|
|
|
|
//纵轴间距
|
|
|
|
mainAxisSpacing: w(15),
|
|
|
|
//横轴间距
|
|
|
|
crossAxisSpacing: w(15),
|
|
|
|
//子组件宽高长度比例
|
|
|
|
childAspectRatio:
|
|
|
|
(ScreenUtil().screenWidth - w(62)) / 2 / 350),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_showPhotoView(context, 0, [
|
|
|
|
'https://qn.colorcun.com/i_theme_1.png',
|
|
|
|
'https://qn.colorcun.com/i_theme_1.png',
|
|
|
|
'https://qn.colorcun.com/i_theme_1.png'
|
|
|
|
]);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(10)),
|
|
|
|
border: Border.all(
|
|
|
|
color: true
|
|
|
|
? MyColours.color_005AA7
|
|
|
|
: MyColours.color_DBDBDB,
|
|
|
|
width: true ? w(2) : w(1))),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
CachedNetworkImage(
|
|
|
|
imageUrl:
|
|
|
|
'https://qn.colorcun.com/i_theme_1.png',
|
|
|
|
width:
|
|
|
|
(ScreenUtil().screenWidth - w(62)) / 2,
|
|
|
|
// height: w(388),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(vertical: w(6)),
|
|
|
|
child: Text(
|
|
|
|
'1 经典图片式',
|
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: font(14)),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
));
|
|
|
|
}))
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|