增加占位图展示
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: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:get/get.dart';
|
||||
|
||||
@ -42,7 +42,7 @@ class AboutappLogic extends GetxController {
|
||||
// SmartDialog.dismiss();
|
||||
// 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();
|
||||
int page = 1;
|
||||
List<User> lists = [];
|
||||
|
||||
bool isLoad = true;
|
||||
@override
|
||||
void onInit() async{
|
||||
super.onInit();
|
||||
@ -31,6 +33,7 @@ class BlacklistLogic extends GetxController {
|
||||
if (bean.isSuccess()) {
|
||||
lists.addAll(bean.data.lists);
|
||||
}
|
||||
isLoad = false;
|
||||
update();
|
||||
if (page == 1) {
|
||||
refreshController.refreshCompleted();
|
||||
|
||||
@ -34,7 +34,7 @@ class BlacklistPage extends StatelessWidget {
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(centerTitle: '黑名单',),
|
||||
body: SafeArea(
|
||||
child: SmartRefresher(
|
||||
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
||||
controller: logic.refreshController,
|
||||
child: ListView.builder(
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
},
|
||||
index: controller.state.index,
|
||||
itemCount: logic.circle.lists.length,
|
||||
viewportFraction: 0.95,
|
||||
viewportFraction: 0.93,
|
||||
// scale: 0.9,
|
||||
loop: false,
|
||||
// pagination: new SwiperPagination(),//如果不填则不显示指示点
|
||||
@ -105,7 +105,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
List<String> urlList = [];
|
||||
List infoList = [];
|
||||
if (logic.statistics != null) {
|
||||
infoList = logic.statistics!["users"];
|
||||
infoList = logic.statistics!["last_visit_users"];
|
||||
if (infoList.isNotEmpty) {
|
||||
for (var element in infoList) {
|
||||
urlList.add(element["avatar"]);
|
||||
@ -119,24 +119,17 @@ class _CirclePageState extends State<CirclePage>
|
||||
var element = urlList[i];
|
||||
widgets.add(Positioned(
|
||||
left: 15.sp * i,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
logic.pushHome(infoList[i]['id'].toString());
|
||||
},
|
||||
|
||||
child: circleWidget(element),
|
||||
),
|
||||
));
|
||||
);
|
||||
}
|
||||
if (urlList.length == 3) {
|
||||
if (logic.statistics != null) {
|
||||
widgets.add(Positioned(
|
||||
left: 15.sp * 3,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
child: circleWidget(logic.statistics!['total'].toString()),
|
||||
left: 15.sp * urlList.length,
|
||||
child: circleWidget(logic.statistics!['visit_count'].toString()),
|
||||
),
|
||||
));
|
||||
);
|
||||
}
|
||||
return Container(
|
||||
width: Get.width,
|
||||
@ -147,6 +140,10 @@ class _CirclePageState extends State<CirclePage>
|
||||
children: [
|
||||
Positioned(
|
||||
left: 0,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.FriendsActivity,arguments: '2');
|
||||
},
|
||||
child: Container(
|
||||
|
||||
width: 30.sp * widgets.length,
|
||||
@ -155,6 +152,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
alignment: Alignment.centerLeft,
|
||||
children: widgets,
|
||||
),
|
||||
),
|
||||
)),
|
||||
ShaderMask(
|
||||
shaderCallback: (Rect bounds) {
|
||||
|
||||
@ -117,7 +117,7 @@ class _InfoListViewState extends State<InfoListView> {
|
||||
listLogic.refreshData();
|
||||
},
|
||||
child: listLogic.lists.isEmpty
|
||||
? loaddingWidget(true)
|
||||
? !listLogic.callOutMore ? noResultWidget() : loaddingWidget(true)
|
||||
: ListView.builder(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
scrollDirection: Axis.vertical,
|
||||
|
||||
@ -17,7 +17,11 @@ class FeedbackPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder(builder: (FeedbackLogic controller) {
|
||||
return Container(
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(getBaseImage("home_back")),
|
||||
@ -163,6 +167,7 @@ class FeedbackPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ class FriendslistLogic extends GetxController {
|
||||
final type = Get.arguments as String;
|
||||
int page = 1;
|
||||
int isVip = 0;
|
||||
bool isLoad = true;
|
||||
List<UserInfo> lists = [];
|
||||
@override
|
||||
void onInit() async{
|
||||
@ -34,6 +35,7 @@ class FriendslistLogic extends GetxController {
|
||||
if (bean.isSuccess()) {
|
||||
lists.addAll(bean.data.lists);
|
||||
}
|
||||
isLoad = false;
|
||||
update();
|
||||
if(page == 1){
|
||||
refreshController.refreshCompleted();
|
||||
@ -50,6 +52,7 @@ class FriendslistLogic extends GetxController {
|
||||
if (bean.isSuccess()) {
|
||||
lists.addAll(bean.data.lists);
|
||||
}
|
||||
isLoad = false;
|
||||
update();
|
||||
if(page == 1){
|
||||
refreshController.refreshCompleted();
|
||||
@ -66,6 +69,8 @@ class FriendslistLogic extends GetxController {
|
||||
if (bean.isSuccess()) {
|
||||
lists.addAll(bean.data.lists);
|
||||
}
|
||||
|
||||
isLoad = false;
|
||||
update();
|
||||
if(page == 1){
|
||||
refreshController.refreshCompleted();
|
||||
|
||||
@ -31,7 +31,7 @@ class FriendslistPage extends StatelessWidget {
|
||||
centerTitle: _getTitleName(logic.type),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: SmartRefresher(
|
||||
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
||||
controller: logic.refreshController,
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
|
||||
@ -61,7 +61,7 @@ class _My_circlePageState extends State<My_circlePage>
|
||||
},
|
||||
index: logic.circle.lists.isNotEmpty ? 0 : controller.state.index,
|
||||
itemCount: logic.circle.lists.length,
|
||||
viewportFraction: 0.95,
|
||||
viewportFraction: 0.93,
|
||||
// scale: 0.9,
|
||||
loop: false,
|
||||
onIndexChanged: (index) {
|
||||
|
||||
@ -16,7 +16,11 @@ class ReportPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder(builder: (ReportLogic controller) {
|
||||
return Container(
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(getBaseImage("home_back")),
|
||||
@ -153,6 +157,7 @@ class ReportPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:文本支持最大多少行
|
||||
double calculateTextHeight(String value, fontSize, FontWeight fontWeight,
|
||||
double maxWidth, int maxLines) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user