138 lines
4.0 KiB
Dart
Executable File
138 lines
4.0 KiB
Dart
Executable File
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
import '../../app_settings/app_colors.dart';
|
|
import '../../tools/titleAppBar.dart';
|
|
|
|
class SupportStaffPage extends StatefulWidget {
|
|
const SupportStaffPage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<SupportStaffPage> createState() => _SupportStaffPageState();
|
|
}
|
|
|
|
class _SupportStaffPageState extends State<SupportStaffPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: const Color(0xFFFFFFFF),
|
|
appBar: TitleAppBar(
|
|
barTitle: '客服'.tr,
|
|
haveBack: true,
|
|
backgroundColor: AppColors.mainColor),
|
|
body: Column(
|
|
children: <Widget>[
|
|
supportStaffItem(
|
|
'邮箱'.tr,
|
|
'786612630@qq.com',
|
|
true,
|
|
true,
|
|
'images/mine/icon_mine_supportStaff_openEmail.png', () async {
|
|
String url =
|
|
'mailto:smith@example.org?subject=News&body=New%20plugin';
|
|
_pushUrl(url);
|
|
}),
|
|
supportStaffItem(
|
|
'商务合作'.tr,
|
|
'www.starLock.com',
|
|
true,
|
|
true,
|
|
'images/mine/icon_mine_supportStaff_openEmail.png', () async {
|
|
const String url = 'tel:15080825640';
|
|
_pushUrl(url);
|
|
}),
|
|
supportStaffItem(
|
|
'电脑网页版'.tr,
|
|
'www.starLock.com',
|
|
true,
|
|
true,
|
|
'images/mine/icon_mine_supportStaff_jump.png', () async {
|
|
const String url = 'https://blog.csdn.net/shulianghan';
|
|
_pushUrl(url);
|
|
}),
|
|
supportStaffItem(
|
|
'电脑网页版'.tr,
|
|
'www.starLock.com',
|
|
false,
|
|
true,
|
|
'', () {}),
|
|
supportStaffItem(
|
|
'酒店系统'.tr,
|
|
'www.starLock.com',
|
|
false,
|
|
true,
|
|
'', () {}),
|
|
supportStaffItem(
|
|
'说明书网页版'.tr,
|
|
'www.starLock.com',
|
|
true,
|
|
true,
|
|
'images/mine/icon_mine_supportStaff_jump.png', () {}),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
_pushUrl(String url) async {
|
|
if (await canLaunch(url)) {
|
|
await launch(url);
|
|
} else {
|
|
throw 'Could not launch $url';
|
|
}
|
|
}
|
|
|
|
Widget supportStaffItem(
|
|
String? leftTitel,
|
|
String? rightTitle,
|
|
bool? isHaveRightImg,
|
|
bool? isHaveLine,
|
|
String? rightImg,
|
|
Function()? action,
|
|
) {
|
|
return GestureDetector(
|
|
onTap: action,
|
|
child: Column(
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
Container(
|
|
height: 80.h,
|
|
color: Colors.white,
|
|
padding: EdgeInsets.only(
|
|
left: 20.w, right: 10.w), // , top: 20.w, bottom: 20.w
|
|
child: Row(
|
|
children: <Widget>[
|
|
SizedBox(width: 20.w),
|
|
Expanded(
|
|
child: Text(leftTitel!, style: TextStyle(fontSize: 24.sp))),
|
|
SizedBox(width: 20.w),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: <Widget>[
|
|
Text(rightTitle!,
|
|
textAlign: TextAlign.end,
|
|
style: TextStyle(fontSize: 22.sp))
|
|
],
|
|
),
|
|
SizedBox(width: 5.w),
|
|
if (isHaveRightImg!) Image.asset(
|
|
rightImg!,
|
|
width: 36.w,
|
|
height: 36.w,
|
|
) else SizedBox(width: 10.w),
|
|
// SizedBox(width:10.w),
|
|
],
|
|
),
|
|
),
|
|
if (isHaveLine!) Container(
|
|
height: 0.5.h,
|
|
color: AppColors.greyLineColor,
|
|
) else Container()
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|