From cd2b2b411dd46487d63e03e3db3a9e8d2eace683 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Fri, 5 Nov 2021 18:43:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/community/community_course.dart | 2 ++ lib/community/community_view/class_details.dart | 4 ++-- lib/community/community_view/class_list_view.dart | 4 ++-- lib/community/community_view/home_class.dart | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/community/community_course.dart b/lib/community/community_course.dart index 93ba3cf5..a3b14de2 100644 --- a/lib/community/community_course.dart +++ b/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 refreshController.refreshCompleted(); } else { refreshController.refreshFailed(); + // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } EasyLoading.dismiss(); } diff --git a/lib/community/community_view/class_details.dart b/lib/community/community_view/class_details.dart index 706c4a34..3fdee0d4 100644 --- a/lib/community/community_view/class_details.dart +++ b/lib/community/community_view/class_details.dart @@ -180,7 +180,7 @@ class _ClassDetails extends State 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 with WidgetsBindingObserver{ //自动播放 looping: false, //循环播放 - allowFullScreen: true, + allowFullScreen: false, // 拖动条样式颜色 materialProgressColors: chewie.ChewieProgressColors( playedColor: Colors.white, diff --git a/lib/community/community_view/class_list_view.dart b/lib/community/community_view/class_list_view.dart index 884b6b50..4622a8e8 100644 --- a/lib/community/community_view/class_list_view.dart +++ b/lib/community/community_view/class_list_view.dart @@ -38,7 +38,7 @@ class _ClassListView extends State { 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 { ], ), Expanded(child:Container( - padding: EdgeInsets.all(10), + padding: EdgeInsets.all(5), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/community/community_view/home_class.dart b/lib/community/community_view/home_class.dart index a48984ea..8f330c45 100644 --- a/lib/community/community_view/home_class.dart +++ b/lib/community/community_view/home_class.dart @@ -65,7 +65,7 @@ class _HomeClass extends State { ), ),), Container( - height: 189, + height: 195, margin: EdgeInsets.only(top:10), child: ListView.builder( scrollDirection: Axis.horizontal, @@ -92,7 +92,7 @@ class _HomeClass extends State { 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 { ), 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 { ),), ], ), - SizedBox(height:5), + SizedBox(height:2), Text( "讲师:${collect.author.name}", overflow: TextOverflow.ellipsis,