增加占位图展示
This commit is contained in:
parent
5cf1946996
commit
18b1468db4
BIN
circle_app/assets/images/base/no_result.png
Normal file
BIN
circle_app/assets/images/base/no_result.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
@ -1,5 +1,5 @@
|
|||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
// import 'package:flutter_install_app/flutter_install_app.dart';
|
import 'package:flutter_install_app/flutter_install_app.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ class AboutappLogic extends GetxController {
|
|||||||
// SmartDialog.dismiss();
|
// SmartDialog.dismiss();
|
||||||
// print(error);
|
// print(error);
|
||||||
// });
|
// });
|
||||||
// await AppInstaller.installApk(filePath, actionRequired: false);
|
await AppInstaller.installApk(filePath, actionRequired: false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,8 @@ class BlacklistLogic extends GetxController {
|
|||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
int page = 1;
|
int page = 1;
|
||||||
List<User> lists = [];
|
List<User> lists = [];
|
||||||
|
|
||||||
|
bool isLoad = true;
|
||||||
@override
|
@override
|
||||||
void onInit() async{
|
void onInit() async{
|
||||||
super.onInit();
|
super.onInit();
|
||||||
@ -31,6 +33,7 @@ class BlacklistLogic extends GetxController {
|
|||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
lists.addAll(bean.data.lists);
|
lists.addAll(bean.data.lists);
|
||||||
}
|
}
|
||||||
|
isLoad = false;
|
||||||
update();
|
update();
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
refreshController.refreshCompleted();
|
refreshController.refreshCompleted();
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class BlacklistPage extends StatelessWidget {
|
|||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(centerTitle: '黑名单',),
|
appBar: MyAppBar(centerTitle: '黑名单',),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: SmartRefresher(
|
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
},
|
},
|
||||||
index: controller.state.index,
|
index: controller.state.index,
|
||||||
itemCount: logic.circle.lists.length,
|
itemCount: logic.circle.lists.length,
|
||||||
viewportFraction: 0.95,
|
viewportFraction: 0.93,
|
||||||
// scale: 0.9,
|
// scale: 0.9,
|
||||||
loop: false,
|
loop: false,
|
||||||
// pagination: new SwiperPagination(),//如果不填则不显示指示点
|
// pagination: new SwiperPagination(),//如果不填则不显示指示点
|
||||||
@ -105,7 +105,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
List<String> urlList = [];
|
List<String> urlList = [];
|
||||||
List infoList = [];
|
List infoList = [];
|
||||||
if (logic.statistics != null) {
|
if (logic.statistics != null) {
|
||||||
infoList = logic.statistics!["users"];
|
infoList = logic.statistics!["last_visit_users"];
|
||||||
if (infoList.isNotEmpty) {
|
if (infoList.isNotEmpty) {
|
||||||
for (var element in infoList) {
|
for (var element in infoList) {
|
||||||
urlList.add(element["avatar"]);
|
urlList.add(element["avatar"]);
|
||||||
@ -119,24 +119,17 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
var element = urlList[i];
|
var element = urlList[i];
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: 15.sp * i,
|
left: 15.sp * i,
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
logic.pushHome(infoList[i]['id'].toString());
|
|
||||||
},
|
|
||||||
child: circleWidget(element),
|
child: circleWidget(element),
|
||||||
),
|
),
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
if (urlList.length == 3) {
|
if (logic.statistics != null) {
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: 15.sp * 3,
|
left: 15.sp * urlList.length,
|
||||||
child: GestureDetector(
|
child: circleWidget(logic.statistics!['visit_count'].toString()),
|
||||||
onTap: () {
|
|
||||||
|
|
||||||
},
|
|
||||||
child: circleWidget(logic.statistics!['total'].toString()),
|
|
||||||
),
|
),
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
return Container(
|
return Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
@ -147,13 +140,18 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
children: [
|
children: [
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
child: Container(
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(AppRoutes.FriendsActivity,arguments: '2');
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
|
||||||
width: 30.sp * widgets.length,
|
width: 30.sp * widgets.length,
|
||||||
height: 44.sp,
|
height: 44.sp,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
children: widgets,
|
children: widgets,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
ShaderMask(
|
ShaderMask(
|
||||||
|
|||||||
@ -117,7 +117,7 @@ class _InfoListViewState extends State<InfoListView> {
|
|||||||
listLogic.refreshData();
|
listLogic.refreshData();
|
||||||
},
|
},
|
||||||
child: listLogic.lists.isEmpty
|
child: listLogic.lists.isEmpty
|
||||||
? loaddingWidget(true)
|
? !listLogic.callOutMore ? noResultWidget() : loaddingWidget(true)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
|
|||||||
@ -17,152 +17,157 @@ class FeedbackPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder(builder: (FeedbackLogic controller) {
|
return GetBuilder(builder: (FeedbackLogic controller) {
|
||||||
return Container(
|
return GestureDetector(
|
||||||
decoration: BoxDecoration(
|
onTap: () {
|
||||||
image: DecorationImage(
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
image: AssetImage(getBaseImage("home_back")),
|
},
|
||||||
fit: BoxFit.cover,
|
child: Container(
|
||||||
),
|
decoration: BoxDecoration(
|
||||||
),
|
image: DecorationImage(
|
||||||
child: Scaffold(
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
backgroundColor: Colors.transparent,
|
fit: BoxFit.cover,
|
||||||
appBar: MyAppBar(
|
|
||||||
centerTitle: '意见反馈',
|
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
),
|
||||||
child: SafeArea(
|
child: Scaffold(
|
||||||
child: Column(
|
backgroundColor: Colors.transparent,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
appBar: MyAppBar(
|
||||||
children: [
|
centerTitle: '意见反馈',
|
||||||
Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
height: 200,
|
|
||||||
margin: EdgeInsets.symmetric(
|
|
||||||
horizontal: 16, vertical: 20),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(13),
|
|
||||||
color: Color(
|
|
||||||
0xFF4C3E5F), // Use your desired background color
|
|
||||||
),
|
|
||||||
padding: EdgeInsets.all(13),
|
|
||||||
child: TextField(
|
|
||||||
maxLength: 200,
|
|
||||||
|
|
||||||
onChanged: (msg){
|
|
||||||
print(msg);
|
|
||||||
controller.state.maxMsg = '${msg.length}/200';
|
|
||||||
controller.update();
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintText: '请补充详细问题和意见,我们会认真看完的哦~',
|
|
||||||
counterText: '',
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
color: Color(0xFFB7BECC), fontSize: 14.sp),
|
|
||||||
border: InputBorder.none,
|
|
||||||
),
|
|
||||||
maxLines: null,
|
|
||||||
inputFormatters: [
|
|
||||||
LengthLimitingTextInputFormatter(200),
|
|
||||||
],
|
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
right: 30.sp,
|
|
||||||
bottom: 30.sp,
|
|
||||||
child: Text(
|
|
||||||
controller.state.maxMsg,
|
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 120.sp,
|
|
||||||
margin: EdgeInsets.only(left: 16.sp, right: 16.sp),
|
|
||||||
child: GridView.builder(
|
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 3, // 每行显示的项目数量
|
|
||||||
),
|
|
||||||
itemCount:controller.state.imaglist.length<3 ? controller.state.imaglist.length+1: controller.state.imaglist.length, // Replace with your item count
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
|
|
||||||
if (index == 0&&controller.state.imaglist.length<3) {
|
|
||||||
// 第一个项目,显示固定的图片
|
|
||||||
return GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
controller.getImageFile();
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.all(5.sp),
|
|
||||||
child: Image(
|
|
||||||
image:
|
|
||||||
AssetImage(getMineImage("icon_img_add")),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// 后续项目,根据接口获取数据
|
|
||||||
// 假设通过接口获取到的数据存储在一个名为 data 的列表中
|
|
||||||
// var itemData = data[index - 1]; // 减去第一个固定图片的索引
|
|
||||||
return Container(
|
|
||||||
margin: EdgeInsets.all(5.sp),
|
|
||||||
child: Center(
|
|
||||||
child: _buildImageItem(controller.state.imaglist.length<3 ?
|
|
||||||
controller.state.imaglist[index-1]: controller.state.imaglist[index], // Replace with your item count
|
|
||||||
controller,controller.state.imaglist.length<3 ? index-1:index ),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: 16, top: 10),
|
|
||||||
child: Text(
|
|
||||||
'最多选择3张图片',
|
|
||||||
style:
|
|
||||||
TextStyle(color: Color(0xFFB7BECC), fontSize: 12),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 50),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
// showToast("完善资料");
|
|
||||||
Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
|
|
||||||
// controller.onInit();
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(21),
|
|
||||||
gradient: LinearGradient(
|
|
||||||
colors: [
|
|
||||||
Color(0xFF06F9FA),
|
|
||||||
Color(0xFFDC5BFD),
|
|
||||||
],
|
|
||||||
begin: Alignment.centerLeft,
|
|
||||||
end: Alignment.centerRight,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: 14.sp, bottom: 14.sp, left: 95.sp, right: 95.sp),
|
|
||||||
child: Text(
|
|
||||||
"提交",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 12,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)),
|
body: SingleChildScrollView(
|
||||||
|
child: SafeArea(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 200,
|
||||||
|
margin: EdgeInsets.symmetric(
|
||||||
|
horizontal: 16, vertical: 20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(13),
|
||||||
|
color: Color(
|
||||||
|
0xFF4C3E5F), // Use your desired background color
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(13),
|
||||||
|
child: TextField(
|
||||||
|
maxLength: 200,
|
||||||
|
|
||||||
|
onChanged: (msg){
|
||||||
|
print(msg);
|
||||||
|
controller.state.maxMsg = '${msg.length}/200';
|
||||||
|
controller.update();
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: '请补充详细问题和意见,我们会认真看完的哦~',
|
||||||
|
counterText: '',
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Color(0xFFB7BECC), fontSize: 14.sp),
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
|
maxLines: null,
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(200),
|
||||||
|
],
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
right: 30.sp,
|
||||||
|
bottom: 30.sp,
|
||||||
|
child: Text(
|
||||||
|
controller.state.maxMsg,
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 120.sp,
|
||||||
|
margin: EdgeInsets.only(left: 16.sp, right: 16.sp),
|
||||||
|
child: GridView.builder(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 3, // 每行显示的项目数量
|
||||||
|
),
|
||||||
|
itemCount:controller.state.imaglist.length<3 ? controller.state.imaglist.length+1: controller.state.imaglist.length, // Replace with your item count
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
|
||||||
|
if (index == 0&&controller.state.imaglist.length<3) {
|
||||||
|
// 第一个项目,显示固定的图片
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.getImageFile();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Image(
|
||||||
|
image:
|
||||||
|
AssetImage(getMineImage("icon_img_add")),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// 后续项目,根据接口获取数据
|
||||||
|
// 假设通过接口获取到的数据存储在一个名为 data 的列表中
|
||||||
|
// var itemData = data[index - 1]; // 减去第一个固定图片的索引
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Center(
|
||||||
|
child: _buildImageItem(controller.state.imaglist.length<3 ?
|
||||||
|
controller.state.imaglist[index-1]: controller.state.imaglist[index], // Replace with your item count
|
||||||
|
controller,controller.state.imaglist.length<3 ? index-1:index ),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 16, top: 10),
|
||||||
|
child: Text(
|
||||||
|
'最多选择3张图片',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Color(0xFFB7BECC), fontSize: 12),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 50),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// showToast("完善资料");
|
||||||
|
Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
|
||||||
|
// controller.onInit();
|
||||||
|
},
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(21),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 14.sp, bottom: 14.sp, left: 95.sp, right: 95.sp),
|
||||||
|
child: Text(
|
||||||
|
"提交",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ class FriendslistLogic extends GetxController {
|
|||||||
final type = Get.arguments as String;
|
final type = Get.arguments as String;
|
||||||
int page = 1;
|
int page = 1;
|
||||||
int isVip = 0;
|
int isVip = 0;
|
||||||
|
bool isLoad = true;
|
||||||
List<UserInfo> lists = [];
|
List<UserInfo> lists = [];
|
||||||
@override
|
@override
|
||||||
void onInit() async{
|
void onInit() async{
|
||||||
@ -34,6 +35,7 @@ class FriendslistLogic extends GetxController {
|
|||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
lists.addAll(bean.data.lists);
|
lists.addAll(bean.data.lists);
|
||||||
}
|
}
|
||||||
|
isLoad = false;
|
||||||
update();
|
update();
|
||||||
if(page == 1){
|
if(page == 1){
|
||||||
refreshController.refreshCompleted();
|
refreshController.refreshCompleted();
|
||||||
@ -50,6 +52,7 @@ class FriendslistLogic extends GetxController {
|
|||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
lists.addAll(bean.data.lists);
|
lists.addAll(bean.data.lists);
|
||||||
}
|
}
|
||||||
|
isLoad = false;
|
||||||
update();
|
update();
|
||||||
if(page == 1){
|
if(page == 1){
|
||||||
refreshController.refreshCompleted();
|
refreshController.refreshCompleted();
|
||||||
@ -66,6 +69,8 @@ class FriendslistLogic extends GetxController {
|
|||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
lists.addAll(bean.data.lists);
|
lists.addAll(bean.data.lists);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isLoad = false;
|
||||||
update();
|
update();
|
||||||
if(page == 1){
|
if(page == 1){
|
||||||
refreshController.refreshCompleted();
|
refreshController.refreshCompleted();
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class FriendslistPage extends StatelessWidget {
|
|||||||
centerTitle: _getTitleName(logic.type),
|
centerTitle: _getTitleName(logic.type),
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: SmartRefresher(
|
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
onRefresh: _onRefresh,
|
onRefresh: _onRefresh,
|
||||||
onLoading: _onLoading,
|
onLoading: _onLoading,
|
||||||
|
|||||||
@ -61,7 +61,7 @@ class _My_circlePageState extends State<My_circlePage>
|
|||||||
},
|
},
|
||||||
index: logic.circle.lists.isNotEmpty ? 0 : controller.state.index,
|
index: logic.circle.lists.isNotEmpty ? 0 : controller.state.index,
|
||||||
itemCount: logic.circle.lists.length,
|
itemCount: logic.circle.lists.length,
|
||||||
viewportFraction: 0.95,
|
viewportFraction: 0.93,
|
||||||
// scale: 0.9,
|
// scale: 0.9,
|
||||||
loop: false,
|
loop: false,
|
||||||
onIndexChanged: (index) {
|
onIndexChanged: (index) {
|
||||||
|
|||||||
@ -16,141 +16,146 @@ class ReportPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder(builder: (ReportLogic controller) {
|
return GetBuilder(builder: (ReportLogic controller) {
|
||||||
return Container(
|
return GestureDetector(
|
||||||
decoration: BoxDecoration(
|
onTap: () {
|
||||||
image: DecorationImage(
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
image: AssetImage(getBaseImage("home_back")),
|
},
|
||||||
fit: BoxFit.cover,
|
child: Container(
|
||||||
),
|
decoration: BoxDecoration(
|
||||||
),
|
image: DecorationImage(
|
||||||
child: Scaffold(
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
backgroundColor: Colors.transparent,
|
fit: BoxFit.cover,
|
||||||
appBar: MyAppBar(
|
|
||||||
centerTitle: '举报',
|
|
||||||
actionWdiget: Text(
|
|
||||||
"提交",
|
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
),
|
),
|
||||||
onPressed: () {
|
|
||||||
logic.onSubmit();
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
body: Column(
|
child: Scaffold(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
backgroundColor: Colors.transparent,
|
||||||
children: [
|
appBar: MyAppBar(
|
||||||
Padding(
|
centerTitle: '举报',
|
||||||
padding: EdgeInsets.only(left: 16, top: 16),
|
actionWdiget: Text(
|
||||||
child: Text(
|
"提交",
|
||||||
'举报类目',
|
style: TextStyle(color: Colors.white),
|
||||||
style: TextStyle(
|
),
|
||||||
color: Colors.white,
|
onPressed: () {
|
||||||
fontSize: 16,
|
logic.onSubmit();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 16, top: 16),
|
||||||
|
child: Text(
|
||||||
|
'举报类目',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Container(
|
||||||
Container(
|
height: 120.sp,
|
||||||
height: 120.sp,
|
child: _reportAdapter(controller),
|
||||||
child: _reportAdapter(controller),
|
),
|
||||||
),
|
Expanded(
|
||||||
Expanded(
|
child: Padding(
|
||||||
child: Padding(
|
padding: EdgeInsets.fromLTRB(16, 20, 16, 0),
|
||||||
padding: EdgeInsets.fromLTRB(16, 20, 16, 0),
|
child: ListView(
|
||||||
child: ListView(
|
children: [
|
||||||
children: [
|
Text(
|
||||||
Text(
|
'详细截图(请至少上传一张图片,帮助审核处理)',
|
||||||
'详细截图(请至少上传一张图片,帮助审核处理)',
|
style: TextStyle(
|
||||||
style: TextStyle(
|
color: Colors.white70,
|
||||||
color: Colors.white70,
|
fontSize: 16,
|
||||||
fontSize: 16,
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 20),
|
||||||
SizedBox(height: 20),
|
// 添加 RecyclerView(ListView) 的内容
|
||||||
// 添加 RecyclerView(ListView) 的内容
|
// 例如: MyRecyclerViewWidget(),
|
||||||
// 例如: MyRecyclerViewWidget(),
|
Container(
|
||||||
Container(
|
height: 130.sp,
|
||||||
height: 130.sp,
|
child: _imageAdapter(controller)),
|
||||||
child: _imageAdapter(controller)),
|
Text(
|
||||||
Text(
|
'补充说明',
|
||||||
'补充说明',
|
style: TextStyle(
|
||||||
style: TextStyle(
|
color: Colors.white,
|
||||||
color: Colors.white,
|
fontSize: 14,
|
||||||
fontSize: 14,
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 30),
|
||||||
SizedBox(height: 30),
|
Container(
|
||||||
Container(
|
// margin: EdgeInsets.only(left: 10, right: 10),
|
||||||
// margin: EdgeInsets.only(left: 10, right: 10),
|
height: 200,
|
||||||
height: 200,
|
width: double.infinity,
|
||||||
width: double.infinity,
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
color: Color(0xFF4C3E5F),
|
||||||
color: Color(0xFF4C3E5F),
|
borderRadius: BorderRadius.circular(10),
|
||||||
borderRadius: BorderRadius.circular(10),
|
),
|
||||||
),
|
padding: EdgeInsets.all(16.sp),
|
||||||
padding: EdgeInsets.all(16.sp),
|
child: Stack(
|
||||||
child: Stack(
|
children: [
|
||||||
children: [
|
Container(
|
||||||
Container(
|
height: 200.sp,
|
||||||
height: 200.sp,
|
child: TextField(
|
||||||
child: TextField(
|
controller: controller.textEditingController,
|
||||||
controller: controller.textEditingController,
|
onChanged: (value) {
|
||||||
onChanged: (value) {
|
controller.update();
|
||||||
controller.update();
|
},
|
||||||
},
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white, fontSize: 14.0.sp),
|
|
||||||
maxLines: 32,
|
|
||||||
maxLength: 200,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
color: Color.fromRGBO(
|
|
||||||
255, 255, 255, 0.6),
|
|
||||||
fontSize: 14.sp),
|
|
||||||
hintText: '违规补充说明,帮助审核处理,选填',
|
|
||||||
border: InputBorder.none,
|
|
||||||
|
|
||||||
counter: Text('')),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
// right: 1.sp,
|
|
||||||
top: 160.sp,
|
|
||||||
child: Text(
|
|
||||||
'${controller.textEditingController.text.length}/200',
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white, fontSize: 12.sp),
|
color: Colors.white, fontSize: 14.0.sp),
|
||||||
)),
|
maxLines: 32,
|
||||||
|
maxLength: 200,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Color.fromRGBO(
|
||||||
|
255, 255, 255, 0.6),
|
||||||
|
fontSize: 14.sp),
|
||||||
|
hintText: '违规补充说明,帮助审核处理,选填',
|
||||||
|
border: InputBorder.none,
|
||||||
|
|
||||||
|
counter: Text('')),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
// right: 1.sp,
|
||||||
|
top: 160.sp,
|
||||||
|
child: Text(
|
||||||
|
'${controller.textEditingController.text.length}/200',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 12.sp),
|
||||||
|
)),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// Stack(
|
// Stack(
|
||||||
// children: [
|
// children: [
|
||||||
// TextField(
|
// TextField(
|
||||||
// decoration: InputDecoration.collapsed(
|
// decoration: InputDecoration.collapsed(
|
||||||
// hintText: '违规补充说明,帮助审核处理,选填',
|
// hintText: '违规补充说明,帮助审核处理,选填',
|
||||||
// border: InputBorder.none,
|
// border: InputBorder.none,
|
||||||
// hintStyle: TextStyle(
|
// hintStyle: TextStyle(
|
||||||
// color: Color(0xFFB7BECC),
|
// color: Color(0xFFB7BECC),
|
||||||
// fontSize: 12,
|
// fontSize: 12,
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// maxLength: 200,
|
// maxLength: 200,
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// color: Color(0xFFFFFFFF),
|
// color: Color(0xFFFFFFFF),
|
||||||
// fontSize: 12,
|
// fontSize: 12,
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ],
|
// ],
|
||||||
// ),
|
// ),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -169,7 +169,7 @@ class Api {
|
|||||||
|
|
||||||
|
|
||||||
//发现页统计
|
//发现页统计
|
||||||
static const getInterestsCount = 'up-service/interest/statistics';
|
static const getInterestsCount = 'user-service/my/statistics';
|
||||||
|
|
||||||
|
|
||||||
// /up-service/my/interests /up-service/interest/statistics
|
// /up-service/my/interests /up-service/interest/statistics
|
||||||
|
|||||||
@ -74,6 +74,20 @@ loaddingWidget(bool isMore) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
noResultWidget() {
|
||||||
|
return Container(
|
||||||
|
width: Get.width,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(getBaseImage('no_result'),width: 200.sp,),
|
||||||
|
SizedBox(height: 8.sp,),
|
||||||
|
Text('正在等待被填充~',style: TextStyle(color: Color(0xffdbdbdb),fontSize: 15.sp),),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
///value: 文本内容;fontSize : 文字的大小;fontWeight:文字权重;maxWidth:文本框的最大宽度;maxLines:文本支持最大多少行
|
///value: 文本内容;fontSize : 文字的大小;fontWeight:文字权重;maxWidth:文本框的最大宽度;maxLines:文本支持最大多少行
|
||||||
double calculateTextHeight(String value, fontSize, FontWeight fontWeight,
|
double calculateTextHeight(String value, fontSize, FontWeight fontWeight,
|
||||||
double maxWidth, int maxLines) {
|
double maxWidth, int maxLines) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user