|
|
@ -4,6 +4,7 @@ import 'package:huixiang/utils/flutter_utils.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
|
|
|
|
import 'package:huixiang/view_widget/no_data_view.dart'; |
|
|
|
|
|
|
|
|
|
|
|
class ClassListView extends StatefulWidget { |
|
|
|
class ClassListView extends StatefulWidget { |
|
|
|
final List<CourseList> classList; |
|
|
|
final List<CourseList> classList; |
|
|
@ -19,7 +20,14 @@ class ClassListView extends StatefulWidget { |
|
|
|
class _ClassListView extends State<ClassListView> { |
|
|
|
class _ClassListView extends State<ClassListView> { |
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
|
return GridView.builder( |
|
|
|
return (widget.classList == null || widget.classList.length == 0) |
|
|
|
|
|
|
|
? NoDataView( |
|
|
|
|
|
|
|
src: "assets/image/xiao_fei.webp", |
|
|
|
|
|
|
|
isShowBtn: false, |
|
|
|
|
|
|
|
text: "当前分类暂无精彩内容", |
|
|
|
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
|
|
|
margin: EdgeInsets.only( left: 60.w, right: 60.w,bottom: 30), |
|
|
|
|
|
|
|
): GridView.builder( |
|
|
|
itemCount:widget.classList == null ? 0 : widget.classList.length, |
|
|
|
itemCount:widget.classList == null ? 0 : widget.classList.length, |
|
|
|
padding: EdgeInsets.only( |
|
|
|
padding: EdgeInsets.only( |
|
|
|
left: 16.w, |
|
|
|
left: 16.w, |
|
|
|