Browse Source

课程更改

ff_new
w-R 3 years ago
parent
commit
cd2b2b411d
  1. 2
      lib/community/community_course.dart
  2. 4
      lib/community/community_view/class_details.dart
  3. 4
      lib/community/community_view/class_list_view.dart
  4. 8
      lib/community/community_view/home_class.dart

2
lib/community/community_course.dart

@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/retrofit/data/banner.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@ -83,6 +84,7 @@ class _CommunityCourse extends State<CommunityCourse>
refreshController.refreshCompleted();
} else {
refreshController.refreshFailed();
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
EasyLoading.dismiss();
}

4
lib/community/community_view/class_details.dart

@ -180,7 +180,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
height: 24,
),
onTap: () {
Navigator.of(context).pop(course.viewers+1);
Navigator.of(context).pop(course != null ? course.viewers+1 :0);
},
),
],
@ -369,7 +369,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
//
looping: false,
//
allowFullScreen: true,
allowFullScreen: false,
//
materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white,

4
lib/community/community_view/class_list_view.dart

@ -38,7 +38,7 @@ class _ClassListView extends State<ClassListView> {
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio:
260 / (281 / 2 + (281 / 2) * AppUtils.textScale(context)),
225 / (281 / 2 + (281 / 2) * AppUtils.textScale(context)),
),
itemBuilder: (context, index) {
return GestureDetector(
@ -160,7 +160,7 @@ class _ClassListView extends State<ClassListView> {
],
),
Expanded(child:Container(
padding: EdgeInsets.all(10),
padding: EdgeInsets.all(5),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,

8
lib/community/community_view/home_class.dart

@ -65,7 +65,7 @@ class _HomeClass extends State<HomeClass> {
),
),),
Container(
height: 189,
height: 195,
margin: EdgeInsets.only(top:10),
child: ListView.builder(
scrollDirection: Axis.horizontal,
@ -92,7 +92,7 @@ class _HomeClass extends State<HomeClass> {
Widget classItem(CourseList collect) {
return Container(
width: 168,
height: 189,
height: 195,
decoration: BoxDecoration(
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(4),
@ -222,7 +222,7 @@ class _HomeClass extends State<HomeClass> {
),
Expanded(child:
Container(
padding: EdgeInsets.all(10),
padding: EdgeInsets.all(8),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
@ -243,7 +243,7 @@ class _HomeClass extends State<HomeClass> {
),),
],
),
SizedBox(height:5),
SizedBox(height:2),
Text(
"讲师:${collect.author.name}",
overflow: TextOverflow.ellipsis,

Loading…
Cancel
Save