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

4
lib/community/community_view/class_details.dart

@ -180,7 +180,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
height: 24, height: 24,
), ),
onTap: () { 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, looping: false,
// //
allowFullScreen: true, allowFullScreen: false,
// //
materialProgressColors: chewie.ChewieProgressColors( materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white, playedColor: Colors.white,

4
lib/community/community_view/class_list_view.dart

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

8
lib/community/community_view/home_class.dart

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

Loading…
Cancel
Save