Browse Source

2.12.0

ff_new
fengmeikan@hotmail.com 3 years ago
parent
commit
25915a9500
  1. 4
      android/app/build.gradle
  2. 1
      android/app/src/main/AndroidManifest.xml
  3. 90
      lib/address/address_map_page.dart
  4. 63
      lib/address/edit_address_page.dart
  5. 10
      lib/article/hot_article_item.dart
  6. 10
      lib/article/video_playback_page.dart
  7. 12
      lib/community/community_child_list.dart
  8. 18
      lib/community/community_child_page.dart
  9. 26
      lib/community/community_course.dart
  10. 38
      lib/community/community_details.dart
  11. 132
      lib/community/community_list.dart
  12. 5
      lib/community/community_page.dart
  13. 62
      lib/community/community_view/class_details.dart
  14. 147
      lib/community/community_view/class_details_video.dart
  15. 4
      lib/community/community_view/class_list_view.dart
  16. 2
      lib/community/community_view/class_title_tab.dart
  17. 2
      lib/community/community_view/community_comment.dart
  18. 64
      lib/community/community_view/community_dynamic.dart
  19. 2
      lib/community/community_view/course_banner.dart
  20. 16
      lib/community/community_view/home_class.dart
  21. 4
      lib/community/headlines/activity_top_list.dart
  22. 10
      lib/community/headlines/article_list.dart
  23. 14
      lib/community/headlines/article_page.dart
  24. 2
      lib/community/headlines/headlines_banner.dart
  25. 4
      lib/community/headlines/headlines_collection.dart
  26. 16
      lib/community/headlines/headlines_column_details.dart
  27. 37
      lib/community/release_dynamic.dart
  28. 13
      lib/generated/intl/messages_all.dart
  29. 1289
      lib/generated/intl/messages_en.dart
  30. 1279
      lib/generated/intl/messages_zh_CN.dart
  31. 1279
      lib/generated/intl/messages_zh_Hans_CN.dart
  32. 1277
      lib/generated/intl/messages_zh_Hant_CN.dart
  33. 1279
      lib/generated/intl/messages_zh_TW.dart
  34. 43
      lib/generated/l10n.dart
  35. 12
      lib/main.dart
  36. 26
      lib/mine/mine_page.dart
  37. 27
      lib/mine/mine_view/mine_view.dart
  38. 12
      lib/retrofit/retrofit_api.dart
  39. 26
      lib/view_widget/keyboard/keyboard_widget.dart
  40. 22
      lib/view_widget/mine_vip_view.dart
  41. 31
      lib/web/web_view/comment_list.dart
  42. 129
      pubspec.lock
  43. 22
      pubspec.yaml

4
android/app/build.gradle

@ -90,7 +90,7 @@ def mfph = [
]
android {
compileSdkVersion 30
compileSdkVersion 32
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -106,7 +106,7 @@ android {
defaultConfig {
applicationId "com.zsw.huixiang"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 32
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

1
android/app/src/main/AndroidManifest.xml

@ -134,6 +134,5 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>

90
lib/address/address_map_page.dart

@ -34,21 +34,21 @@ class _AddressMapPage extends State<AddressMapPage> {
//
void _loadCustomData() async {
setState(() {
_mapController.setCustomMapStyle('assets/map_style/chatian.sty', 0);
_mapController?.setCustomMapStyle('assets/map_style/chatian.sty', 0);
});
}
LocationFlutterPlugin aMapFlutterLocation;
String city = "武汉市";
String keyWord = "";
LocationFlutterPlugin? aMapFlutterLocation;
String? city = "武汉市";
String? keyWord = "";
@override
void dispose() {
super.dispose();
aMapFlutterLocation.stopLocation();
aMapFlutterLocation?.stopLocation();
}
ApiService apiService;
ApiService? apiService;
@override
void initState() {
@ -56,35 +56,38 @@ class _AddressMapPage extends State<AddressMapPage> {
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString('token')),
context: context, token: value.getString('token')!),
});
if (aMapFlutterLocation == null) {
aMapFlutterLocation = LocationFlutterPlugin();
aMapFlutterLocation.requestPermission();
aMapFlutterLocation.onResultCallback().listen((event) {
aMapFlutterLocation!.requestPermission();
aMapFlutterLocation!.onResultCallback().listen((event) {
print("event: ${jsonEncode(event)}");
event = event as Map<String, Object>;
if (event != null &&
event["latitude"] != null &&
event["longitude"] != null) {
city = event["city"];
city = event["city"] as String;
BMFCoordinate latLng;
if (event["latitude"] is String && event["longitude"] is String) {
latLng = BMFCoordinate(double.tryParse(event["latitude"]),
double.tryParse(event["longitude"]));
latLng = BMFCoordinate(
double.tryParse(event["latitude"] as String)!,
double.tryParse(event["longitude"] as String)!
);
} else {
latLng = BMFCoordinate(event["latitude"], event["longitude"]);
latLng = BMFCoordinate(event["latitude"] as double, event["longitude"] as double);
}
BMFCalculateUtils.coordConvert(
coordinate: latLng,
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL)
coordinate: latLng,
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL)
.then((value) {
saveLatLng(value);
if (_mapController != null) {
this.latLng = Platform.isIOS ? value : latLng;
this.latLng = Platform.isIOS ? value! : latLng;
addMarker();
_mapController.updateMapOptions(
_mapController?.updateMapOptions(
BMFMapOptions(
center: latLng,
zoomLevel: 15,
@ -134,15 +137,15 @@ class _AddressMapPage extends State<AddressMapPage> {
Map iosMap = iosOption.getMap();
aMapFlutterLocation.prepareLoc(androidMap, iosMap);
aMapFlutterLocation?.prepareLoc(androidMap, iosMap);
}
List<Address> poiList;
List<Address>? poiList;
searchPoi(BMFCoordinate latLng) async {
keyWord = textEditingController.text;
print("keyWord: ${keyWord}");
var addressPoi = await apiService.searchPoi(
var addressPoi = await apiService!.searchPoi(
"${latLng.latitude}", "${latLng.longitude}", keyWord, 20, 1);
List<dynamic> poi = addressPoi['pois'];
poiList = poi
@ -199,11 +202,11 @@ class _AddressMapPage extends State<AddressMapPage> {
requestDialog();
} else if (await Permission.location.isGranted) {
// EasyLoading.show(status: S.of(context).zhengzaijiazai);
aMapFlutterLocation.startLocation();
aMapFlutterLocation?.startLocation();
Future.delayed(Duration(seconds: 6), () {
EasyLoading.dismiss();
});
} else if (await Permission.location.isUndetermined) {
} else if (await Permission.location.isLimited) {
await Permission.location.request();
} else {
if (Platform.isIOS) {
@ -261,18 +264,18 @@ class _AddressMapPage extends State<AddressMapPage> {
});
}
BMFMapController _mapController;
BMFCoordinate bmfCoordinate;
BMFMapController? _mapController;
BMFCoordinate? bmfCoordinate;
void onMapCreated(BMFMapController controller) {
controller.setMapRegionDidChangeCallback(callback: (status) {
BMFMapStatus bmfMapStatus = status;
print("status: ${bmfMapStatus.toMap()}");
if (bmfCoordinate != null &&
bmfCoordinate.longitude == status.targetGeoPt.longitude &&
bmfCoordinate.latitude == status.targetGeoPt.latitude) {
bmfCoordinate!.longitude == status.targetGeoPt?.longitude &&
bmfCoordinate!.latitude == status.targetGeoPt?.latitude) {
if ((DateTime.now().millisecondsSinceEpoch - time) > 1000) {
center = status.targetGeoPt;
center = status.targetGeoPt!;
searchPoi(center);
time = DateTime.now().millisecondsSinceEpoch;
}
@ -283,14 +286,14 @@ class _AddressMapPage extends State<AddressMapPage> {
setState(() {
_mapController = controller;
_mapController.showUserLocation(true);
_mapController?.showUserLocation(true);
_loadCustomData();
addMarker();
});
}
BMFCoordinate latLng;
BMFMarker bmfMarker;
BMFCoordinate? latLng;
BMFMarker? bmfMarker;
addMarker() {
if (latLng == null) return;
@ -299,7 +302,7 @@ class _AddressMapPage extends State<AddressMapPage> {
print("map_hei: ${MediaQuery.of(context).size.height}");
bmfMarker = BMFMarker(
position: latLng,
position: latLng!,
screenPointToLock: BMFPoint(
(Platform.isIOS
? MediaQuery.of(context).size.width
@ -314,9 +317,9 @@ class _AddressMapPage extends State<AddressMapPage> {
icon: "assets/image/icon_address_location.png",
draggable: false,
);
_mapController.addMarker(bmfMarker);
_mapController!.addMarker(bmfMarker!);
}
bmfMarker.updateIsLockedToScreen(
bmfMarker?.updateIsLockedToScreen(
true,
BMFPoint(
(Platform.isIOS
@ -329,7 +332,8 @@ class _AddressMapPage extends State<AddressMapPage> {
4));
}
saveLatLng(BMFCoordinate latLng) async {
saveLatLng(BMFCoordinate? latLng) async {
if(latLng == null) return;
SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setString("latitude", "${latLng.latitude}");
await prefs.setString("longitude", "${latLng.longitude}");
@ -339,11 +343,11 @@ class _AddressMapPage extends State<AddressMapPage> {
SharedPreferences.getInstance().then((value) => {
setState(() {
if (_mapController != null) {
_mapController.updateMapOptions(
_mapController!.updateMapOptions(
BMFMapOptions(
center: BMFCoordinate(
double.tryParse(value.getString("latitude")),
double.tryParse(value.getString("longitude")),
double.tryParse(value.getString("latitude")!)!,
double.tryParse(value.getString("longitude")!)!,
),
zoomLevel: 15,
),
@ -353,7 +357,7 @@ class _AddressMapPage extends State<AddressMapPage> {
});
}
BMFMapWidget map;
BMFMapWidget? map;
BMFCoordinate center = BMFCoordinate(30.553111, 114.342366);
@override
@ -433,16 +437,16 @@ class _AddressMapPage extends State<AddressMapPage> {
child: Container(
child: ListView.separated(
padding: EdgeInsets.symmetric(vertical: 0),
itemCount: poiList != null ? poiList.length : 0,
itemCount: poiList != null ? poiList!.length : 0,
itemBuilder: (context, position) {
return InkWell(
onTap: () {
Navigator.of(context).pop(poiList[position].toJson());
Navigator.of(context).pop(poiList![position].toJson());
},
child: addressItem(poiList[position]),
child: addressItem(poiList![position]),
);
},
separatorBuilder: (contetx, position) {
separatorBuilder: (context, position) {
return Container(
height: 1,
margin: EdgeInsets.symmetric(horizontal: 16.w),

63
lib/address/edit_address_page.dart

@ -10,9 +10,9 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class EditAddressPage extends StatefulWidget {
final Map<String, dynamic> arguments;
final Map<String, dynamic>? arguments;
EditAddressPage({this.arguments});
EditAddressPage({required this.arguments});
@override
State<StatefulWidget> createState() {
@ -26,7 +26,7 @@ class _EditAddressPage extends State<EditAddressPage> {
TextEditingController addressController = TextEditingController();
TextEditingController houseNumberController = TextEditingController();
ApiService apiService;
ApiService? apiService;
@override
void initState() {
@ -34,21 +34,21 @@ class _EditAddressPage extends State<EditAddressPage> {
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString('token')),
context: context, token: value.getString('token')!),
queryAddress(),
});
}
Address preAddress;
Address? preAddress;
queryAddress() async {
if (widget.arguments == null) return;
preAddress = Address.fromJson(widget.arguments);
nameController.text = preAddress.username;
mobileController.text = preAddress.phone;
preAddress = Address.fromJson(widget.arguments!);
nameController.text = preAddress!.username;
mobileController.text = preAddress!.phone;
addressController.text =
"${preAddress.province}${preAddress.city}${preAddress.area}";
houseNumberController.text = preAddress.address;
"${preAddress!.province}${preAddress!.city}${preAddress!.area}";
houseNumberController.text = preAddress!.address;
setState(() {});
}
@ -86,13 +86,13 @@ class _EditAddressPage extends State<EditAddressPage> {
children: [
editItem(
S.of(context).xingming,
preAddress != null ? preAddress.username : "",
preAddress != null ? preAddress!.username : "",
S.of(context).qingtianxiexingming,
nameController,
false),
editItem(
S.of(context).dianhua,
preAddress != null ? preAddress.phone : "",
preAddress != null ? preAddress!.phone : "",
S.of(context).qingtianxieshoujihao,
mobileController,
false),
@ -102,14 +102,14 @@ class _EditAddressPage extends State<EditAddressPage> {
},
child: editItem(
S.of(context).dizhi,
preAddress != null ? preAddress.address : "",
preAddress != null ? preAddress!.address : "",
S.of(context).shouhuodizhi,
addressController,
true),
),
editItem(
S.of(context).xiangxidizhi,
preAddress != null ? preAddress.address : "",
preAddress != null ? preAddress!.address : "",
S.of(context).menpaihao,
houseNumberController,
false),
@ -142,21 +142,22 @@ class _EditAddressPage extends State<EditAddressPage> {
);
}
Map addressMap;
Map? addressMap;
toMap() async {
Navigator.of(context).pushNamed('/router/address_map_page').then(
(value) => {
if (value != null)
{
value as Map,
addressMap = value,
addressController.text =
"${(value as Map)['province']}${(value as Map)['city']}${(value as Map)['area']}",
if (preAddress != null)
{
preAddress.province = addressMap['province'],
preAddress.city = addressMap['city'],
preAddress.area = addressMap['area'],
preAddress!.province = addressMap?['province'],
preAddress!.city = addressMap?['city'],
preAddress!.area = addressMap?['area'],
},
houseNumberController.text = "${(value as Map)['address']}",
}
@ -188,32 +189,32 @@ class _EditAddressPage extends State<EditAddressPage> {
}
BaseData baseData;
if (preAddress == null) {
baseData = await apiService.addAddress({
baseData = await apiService!.addAddress({
"address": address,
"area": addressMap != null ? addressMap['area'] : "",
"city": addressMap != null ? addressMap['city'] : "",
"area": addressMap != null ? addressMap!['area'] : "",
"city": addressMap != null ? addressMap!['city'] : "",
"cityInfo": "",
"isDefault": true,
"latitude": addressMap != null ? addressMap['latitude'] : 0,
"longitude": addressMap != null ? addressMap['longitude'] : 0,
"latitude": addressMap != null ? addressMap!['latitude'] : 0,
"longitude": addressMap != null ? addressMap!['longitude'] : 0,
"phone": mobile,
"province": addressMap != null ? addressMap['province'] : "",
"province": addressMap != null ? addressMap!['province'] : "",
"tag": "",
"username": name
});
} else {
baseData = await apiService.updateAddress({
baseData = await apiService!.updateAddress({
"address": address,
"area": preAddress != null ? preAddress.area : "",
"city": preAddress != null ? preAddress.city : "",
"province": preAddress != null ? preAddress.province : "",
"area": preAddress != null ? preAddress!.area : "",
"city": preAddress != null ? preAddress!.city : "",
"province": preAddress != null ? preAddress!.province : "",
"cityInfo": "",
"isDefault": true,
"latitude": preAddress != null ? preAddress.latitude : 0,
"longitude": preAddress != null ? preAddress.longitude : 0,
"latitude": preAddress != null ? preAddress!.latitude : 0,
"longitude": preAddress != null ? preAddress!.longitude : 0,
"phone": mobile,
"tag": "",
"id": preAddress != null ? preAddress.id : 0,
"id": preAddress != null ? preAddress!.id : 0,
"username": name
});
}

10
lib/article/hot_article_item.dart

@ -24,7 +24,7 @@ class TouTiao extends StatefulWidget {
}
class _TouTiao extends State<TouTiao> {
ApiService apiService;
ApiService? apiService;
List<BannerData> bannerData = [];
@override
@ -38,7 +38,7 @@ class _TouTiao extends State<TouTiao> {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(), context: context, token: value.getString("token")),
apiService = ApiService(Dio(), context: context, token: value.getString("token")!),
queryArticle(),
});
}
@ -54,7 +54,7 @@ class _TouTiao extends State<TouTiao> {
List<Article> articles = [];
queryArticle() async {
BaseData<PageInfo<Article>> baseData = await apiService.queryArticle({
BaseData<PageInfo<Article>> baseData = await apiService!.queryArticle({
"pageNum": pageNum,
"pageSize": 10,
"searchKey": "",
@ -90,12 +90,12 @@ class _TouTiao extends State<TouTiao> {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
showLoading: true
);
}
BaseData<PageInfo<BannerData>> baseData =
await apiService.queryBanner({
await apiService!.queryBanner({
"model": {"type": "COURSE_BANNER"},
}).catchError((onError) {
refreshController.refreshFailed();

10
lib/article/video_playback_page.dart

@ -13,8 +13,8 @@ class VideoPlaybackPage extends StatefulWidget {
class _VideoPlaybackPage extends State<VideoPlaybackPage> {
var controller = new ScrollController();
VideoPlayerController videoPlayerController;
ChewieController chewieController;
VideoPlayerController? videoPlayerController;
ChewieController? chewieController;
@override
void initState() {
@ -26,7 +26,7 @@ class _VideoPlaybackPage extends State<VideoPlaybackPage> {
videoPlayerController = VideoPlayerController.network(
'https://www.runoob.com/try/demo_source/movie.mp4');
chewieController = ChewieController(
videoPlayerController: videoPlayerController,
videoPlayerController: videoPlayerController!,
aspectRatio: 3 / 2,
//
autoPlay: !true,
@ -48,7 +48,7 @@ class _VideoPlaybackPage extends State<VideoPlaybackPage> {
/**
*
*/
videoPlayerController.dispose();
videoPlayerController?.dispose();
super.dispose();
}
@ -65,7 +65,7 @@ class _VideoPlaybackPage extends State<VideoPlaybackPage> {
Container(
height: 274.h,
child: Chewie(
controller: chewieController,
controller: chewieController!,
),
),
Container(

12
lib/community/community_child_list.dart

@ -25,9 +25,9 @@ class CommunityChildList extends StatefulWidget {
class _CommunityChildList extends State<CommunityChildList> {
RefreshController refreshController = RefreshController();
final ScrollController scrollController = ScrollController();
ApiService apiService;
ApiService? apiService;
int pageNum = 1;
String userId;
String? userId;
bool isLoadMore = false;
List<ComunityComment> comments = [];
@ -50,14 +50,14 @@ class _CommunityChildList extends State<CommunityChildList> {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
if(isLoadMore){
pageNum += 1;
isLoadMore = false;
}else pageNum = 1;
BaseData<PageInfo<ComunityComment>> baseData = await apiService.trendList({
BaseData<PageInfo<ComunityComment>> baseData = await apiService!.trendList({
"onlyFollow": widget.typeStr == "关注" ? true : false,
"onlyMe": false,
"pageNum": pageNum,
@ -78,7 +78,7 @@ class _CommunityChildList extends State<CommunityChildList> {
comments.addAll(baseData.data.list);
// comments.sort((a,b)=>b.createTime.compareTo(a.createTime));
// print("comments: ${comments.length}");
if (int.tryParse(baseData.data.total) < (pageNum * 10)) {
if ((int.tryParse(baseData.data.total) ?? 0) < (pageNum * 10)) {
refreshController.loadNoData();
}
});
@ -117,7 +117,7 @@ class _CommunityChildList extends State<CommunityChildList> {
children: [
CommunityList(
comments,
userId,
userId!,
0,
isList: true,
exitFull: () {

18
lib/community/community_child_page.dart

@ -28,9 +28,9 @@ class CommunityChildPage extends StatefulWidget {
class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAliveClientMixin {
RefreshController refreshController = RefreshController();
ApiService apiService;
ApiService? apiService;
int pageNum = 1;
String userId;
String? userId;
bool isLoadMore = false;
List<Article> articles = [];
@ -53,7 +53,7 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
if(isLoadMore){
@ -61,7 +61,7 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl
isLoadMore = false;
}
else pageNum = 1;
BaseData<PageInfo<ComunityComment>> baseData = await apiService.trendList({
BaseData<PageInfo<ComunityComment>> baseData = await apiService!.trendList({
"onlyFollow": widget.typeStr == "关注" ? true : false,
"onlyMe": false,
"pageNum": pageNum,
@ -84,18 +84,18 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl
article.content = jsonEncode(element.subjectInfo);
article.mainTitle =element.subject;
article.isFollow = element.selfFollow;
article.authorHeadImg = element.memberInfo?.avatar;
article.authorHeadImg = element.memberInfo?.avatar ?? "";
article.authorName = element.memberInfo?.nickname;
article.createTime = element.createTime;
article.updateUser = element.memberInfo?.mid;
article.viewers = element?.viewers;
article.likes = element?.likes;
article.comments = element?.comments;
article.viewers = element?.viewers ?? 0;
article.likes = element?.likes ?? 0;
article.comments = element?.comments ?? 0;
articles.add(article);
});
// comments.sort((a,b)=>b.createTime.compareTo(a.createTime));
// print("comments: ${comments.length}");
if (int.tryParse(baseData.data.total) < (pageNum * 10)) {
if ((int.tryParse(baseData.data.total) ?? 0) < (pageNum * 10)) {
refreshController.loadNoData();
}
}

26
lib/community/community_course.dart

@ -36,7 +36,7 @@ class _CommunityCourse extends State<CommunityCourse>
final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController();
ApiService apiService;
ApiService? apiService;
List<GlobalKey> globaKeys = [];
List<Brand> brands = [];
List<BannerData> bannerData = [];
@ -69,11 +69,11 @@ class _CommunityCourse extends State<CommunityCourse>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<PageInfo<BannerData>> baseData =
await apiService.queryBanner({
await apiService!.queryBanner({
"model": {"type": "COURSE_BANNER"},
}).catchError((onError) {
refreshController.refreshFailed();
@ -96,10 +96,10 @@ class _CommunityCourse extends State<CommunityCourse>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<List<CategorySelectList>> baseData = await apiService.categoryList().catchError((onError) {});
BaseData<List<CategorySelectList>> baseData = await apiService!.categoryList().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
classSelectList = baseData.data;
@ -116,10 +116,10 @@ class _CommunityCourse extends State<CommunityCourse>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<PageInfo<CourseList>> baseData = await apiService.courseList({
BaseData<PageInfo<CourseList>> baseData = await apiService!.courseList({
"categoryId":categoryId,
"pageNum": 1,
"pageSize":10,
@ -158,10 +158,10 @@ class _CommunityCourse extends State<CommunityCourse>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<List<CollectClassList>> baseData = await apiService.collectList().catchError((onError) {});
BaseData<List<CollectClassList>> baseData = await apiService!.collectList().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
collectList.clear();
@ -181,18 +181,18 @@ class _CommunityCourse extends State<CommunityCourse>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<List<CourseList>> baseData = await apiService.collect(collectId).catchError((error) {
BaseData<List<CourseList>> baseData = await apiService!.collect(collectId).catchError((error) {
});
if (baseData != null && baseData.isSuccess) {
setState(() {
if(!collectMap.containsKey(collectId)){
collectMap[collectId] = [];
}
collectMap[collectId].clear();
collectMap[collectId].addAll(baseData.data);
collectMap[collectId]?.clear();
collectMap[collectId]?.addAll(baseData.data);
});
}
}

38
lib/community/community_details.dart

@ -18,7 +18,7 @@ import 'package:shared_preferences/shared_preferences.dart';
class CommunityDetails extends StatefulWidget {
final Map<String, dynamic> arguments;
CommunityDetails({this.arguments});
CommunityDetails({required this.arguments});
@override
State<StatefulWidget> createState() {
@ -35,19 +35,19 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
final ScrollController scrollController = ScrollController();
List<MemberCommentList> memberList = [];
ApiService apiService;
ApiService? apiService;
var commentFocus = FocusNode();
String hintText = S.current.liuxianinjingcaidepinglunba;
bool isKeyBoardShow = false;
int commentTotal = 0;
Article article;
String businessId;
Article? article;
String? businessId;
@override
void didChangeMetrics() {
WidgetsBinding.instance.addPostFrameCallback((_) {
WidgetsBinding.instance?.addPostFrameCallback((_) {
if (!mounted) return;
if (MediaQuery
.of(context)
@ -75,7 +75,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
super.initState();
// comunity = widget.arguments["comment"];
businessId = widget.arguments["businessId"];
WidgetsBinding.instance.addObserver(this);
WidgetsBinding.instance?.addObserver(this);
_queryMemberCommentList();
queryDetails(businessId);
@ -88,9 +88,9 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
BaseData<Article> baseData = await apiService.informationInfo(id)
BaseData<Article> baseData = await apiService!.informationInfo(id)
.catchError((onError) {
debugPrint(onError.toString());
});
@ -122,7 +122,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
children: [
if(article != null)
CommunityDynamic(
article,
article!,
0,
exitFull: () {
setState(() {});
@ -196,15 +196,15 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
////
_queryInformationLikes() async {
BaseData baseData = await apiService.informationLikes(businessId).catchError((onError) {});
BaseData baseData = await apiService!.informationLikes(businessId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
commentKey.currentState.setState(() {});
commentKey.currentState?.setState(() {});
setState(() {
if (article?.liked ?? false)
article?.likes -= 1;
else
article?.likes += 1;
article?.liked = !(article.liked ?? false);
article?.liked = !(article?.liked ?? false);
});
} else {
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
@ -213,14 +213,14 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
///
_queryMemberComment(String content) async {
BaseData baseData = await apiService.memberComment({
BaseData baseData = await apiService!.memberComment({
"content": content,
"parentId": parenId,
"relationalId": businessId,
"relationalType":4
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
CommentListState state = commentKey.currentState;
CommentListState state = commentKey.currentState as CommentListState;
state.queryMemberCommentList();
commentTextController.text = "";
FocusScope.of(context).unfocus();
@ -231,7 +231,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
///
_toComment() {
if (commentKey.currentContext == null) return;
RenderBox firstRenderBox = commentKey.currentContext.findRenderObject();
RenderBox firstRenderBox = commentKey.currentContext!.findRenderObject() as RenderBox;
Offset first = firstRenderBox.localToGlobal(Offset.zero);
scrollController.animateTo(
first.dy +
@ -273,9 +273,9 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
///
delComment(memberComment) async {
BaseData baseData = await apiService.delComment(memberComment.id);
BaseData baseData = await apiService!.delComment(memberComment.id);
if (baseData != null && baseData.isSuccess) {
CommentListState state = commentKey.currentState;
CommentListState state = commentKey.currentState as CommentListState;
state.queryMemberCommentList();
}
}
@ -294,11 +294,11 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
apiService = ApiService(
Dio(),
context: context,
token: sharedPreferences.getString("token"),
token: sharedPreferences.getString("token") ?? "",
showLoading: false,
);
BaseData<PageInfo<MemberCommentList>> baseData =
await apiService.memberCommentList({
await apiService!.memberCommentList({
"pageNum": 1,
"pageSize": 100,
"relationalId": businessId,

132
lib/community/community_list.dart

@ -19,19 +19,11 @@ class CommunityList extends StatefulWidget {
final String userId;
final int commentType;
final bool isList;
final Function exitFull;
final Function removalDynamic;
final Function? exitFull;
final Function? removalDynamic;
CommunityList(
this.comments,
this.userId,
this.commentType,{
this.isList = false,
this.exitFull,
this.removalDynamic
}
);
CommunityList(this.comments, this.userId, this.commentType,
{this.isList = false, this.exitFull, this.removalDynamic});
@override
State<StatefulWidget> createState() {
@ -40,7 +32,7 @@ class CommunityList extends StatefulWidget {
}
class _CommunityList extends State<CommunityList> {
ApiService apiService;
ApiService? apiService;
@override
void initState() {
@ -48,15 +40,17 @@ class _CommunityList extends State<CommunityList> {
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString("token")),
context: context, token: value.getString("token")??""),
});
}
////
_vipFollow(followId, isFollow) async {
BaseData baseData = await apiService.follow(followId);
BaseData baseData = await apiService!.follow(followId);
if (baseData != null && baseData.isSuccess) {
widget.exitFull();
if(widget.exitFull != null) {
widget.exitFull!();
}
SmartDialog.showToast(isFollow ? "关注成功" : "取关成功",
alignment: Alignment.center);
setState(() {});
@ -67,9 +61,11 @@ class _CommunityList extends State<CommunityList> {
///
_deleteDynamic(id) async {
BaseData baseData = await apiService.deleteTrend(id);
BaseData baseData = await apiService!.deleteTrend(id);
if (baseData != null && baseData.isSuccess) {
widget.exitFull();
if(widget.exitFull != null) {
widget.exitFull!();
}
SmartDialog.showToast("删除成功", alignment: Alignment.center);
setState(() {});
} else {
@ -96,14 +92,15 @@ class _CommunityList extends State<CommunityList> {
Navigator.of(context)
.pushNamed('/router/new_community_details', arguments: {
"commentsId": widget.comments[position].id,
"userId":widget.userId,
"userId": widget.userId,
// exitFull: () {
// setState(() {});
// },
}).then((value) {
widget.exitFull();
setState(() {
});
if(widget.exitFull != null) {
widget.exitFull!();
}
setState(() {});
});
setState(() {});
},
@ -116,7 +113,7 @@ class _CommunityList extends State<CommunityList> {
}
///
Widget buildMedia(SubjectInfo subjectInfo, position) {
Widget buildMedia(SubjectInfo? subjectInfo, position) {
if (subjectInfo == null) {
return Container();
}
@ -139,7 +136,7 @@ class _CommunityList extends State<CommunityList> {
fit: BoxFit.contain,
radius: BorderRadius.circular(2),
width: MediaQuery.of(context).size.width / 1.5,
height: MediaQuery.of(context).size.width/1.5,
height: MediaQuery.of(context).size.width / 1.5,
errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png",
)),
@ -305,54 +302,55 @@ class _CommunityList extends State<CommunityList> {
),
),
if ((comments?.memberInfo?.mid ?? "") != (widget.userId))
GestureDetector(
onTap: () {
setState(() {
if (widget.commentType == 0) {
comments.selfFollow = !(comments.selfFollow ?? false);
_vipFollow(comments?.memberInfo?.mid,comments?.selfFollow ?? false);
} else {
showDeleteDialog(position);
}
});
},
child:
(widget.commentType == 0) ?
Container(
width: 56.w,
height: 25.h,
alignment: Alignment.center,
child: RoundButton(
GestureDetector(
onTap: () {
setState(() {
if (widget.commentType == 0) {
comments.selfFollow =
!(comments.selfFollow ?? false);
_vipFollow(comments?.memberInfo?.mid,
comments?.selfFollow ?? false);
} else {
showDeleteDialog(position);
}
});
},
child: (widget.commentType == 0)
? Container(
width: 56.w,
height: 25.h,
backgroup: (comments?.selfFollow ?? false)
? Color(0xFFE6E6E6)
: Color(0xFF32A060),
textColor: (comments?.selfFollow ?? false)
? Color(0xFF808080)
: Colors.white,
text: (comments?.selfFollow ?? false)
? "已关注"
: "关注",
radius: 20,
icons: Icon(
(comments?.selfFollow ?? false)
? Icons.check
: Icons.add,
color: (comments?.selfFollow ?? false)
alignment: Alignment.center,
child: RoundButton(
height: 25.h,
backgroup: (comments?.selfFollow ?? false)
? Color(0xFFE6E6E6)
: Color(0xFF32A060),
textColor: (comments?.selfFollow ?? false)
? Color(0xFF808080)
: Colors.white,
size: 15,
text: (comments?.selfFollow ?? false)
? "已关注"
: "关注",
radius: 20,
icons: Icon(
(comments?.selfFollow ?? false)
? Icons.check
: Icons.add,
color: (comments?.selfFollow ?? false)
? Color(0xFF808080)
: Colors.white,
size: 15,
),
))
: Padding(
padding: EdgeInsets.all(20),
child: Icon(
Icons.close,
color: Colors.black,
size: 16,
),
))
: Padding(
padding: EdgeInsets.all(20),
child: Icon(
Icons.close,
color: Colors.black,
size: 16,
),
),
),
),
],
),
SizedBox(

5
lib/community/community_page.dart

@ -19,9 +19,9 @@ class CommunityPage extends StatefulWidget {
class _CommunityPage extends State<CommunityPage>
with SingleTickerProviderStateMixin {
TabController tabcontroller;
TabController? tabcontroller;
CommunityChildPage guanzhu,tuijian ;
CommunityChildPage? guanzhu,tuijian ;
List<String> lables = [
"关注",
@ -95,6 +95,7 @@ class _CommunityPage extends State<CommunityPage>
child: TabBarView(
physics: BouncingScrollPhysics(),
children: lables.map((e) {
e as String
if (e == "关于我们") {
return BrandPage();
}else if(e == "头条"){

62
lib/community/community_view/class_details.dart

@ -20,7 +20,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class ClassDetails extends StatefulWidget {
final Map<String, dynamic> arguments;
ClassDetails({this.arguments});
ClassDetails({required this.arguments});
@override
State<StatefulWidget> createState() {
@ -29,7 +29,7 @@ class ClassDetails extends StatefulWidget {
}
class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
ApiService apiService;
ApiService? apiService;
final GlobalKey commentKey = GlobalKey();
final GlobalKey videoKey = GlobalKey();
final ScrollController scrollController = ScrollController();
@ -40,7 +40,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
final GlobalKey inputKey = GlobalKey();
final TextEditingController commentTextController = TextEditingController();
int commentTotal = 0;
CourseDetails course;
CourseDetails? course;
List<Chapter> chapterList = [];
bool isShowImg = true;
int chapterIndex = 0;
@ -50,7 +50,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
WidgetsBinding.instance?.addObserver(this);
courseDetails(widget.arguments["id"]);
queryChapterList(widget.arguments["id"]);
}
@ -62,17 +62,17 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<List<Chapter>> baseData =
await apiService.catalogList(courseId).catchError((onError) {});
await apiService!.catalogList(courseId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
chapterList.clear();
chapterList.addAll(baseData.data);
chapterIndex = 0;
ClassDetailsVideoState state = videoKey.currentState;
ClassDetailsVideoState state = videoKey.currentState as ClassDetailsVideoState;
state.initVideo(chapterList[chapterIndex].content.fileUrl);
// initVideo(chapterList[chapterIndex].content.fileUrl);
});
@ -87,11 +87,11 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<CourseDetails> baseData =
await apiService.course(id).catchError((error) {});
await apiService!.course(id).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
course = baseData.data;
@ -101,7 +101,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
@override
void didChangeMetrics() {
WidgetsBinding.instance.addPostFrameCallback((_) {
WidgetsBinding.instance?.addPostFrameCallback((_) {
if (!mounted) return;
if (MediaQuery.of(context).viewInsets.bottom == 0) {
if (isKeyBoardShow) {
@ -171,7 +171,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
),
onTap: () {
Navigator.of(context).pop(
course != null ? course.viewers + 1 : 0);
course != null ? course!.viewers + 1 : 0);
},
),
],
@ -212,9 +212,9 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
),
),
child: Text(
(course?.tags != null &&
course.tags.length > 0)
? course.tags[0]
(course != null && course!.tags != null &&
course!.tags.length > 0)
? course!.tags[0]
: "",
overflow:TextOverflow.ellipsis,
style: TextStyle(
@ -229,7 +229,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
),
Expanded(
child: Text(
course != null ? course.subject : "",
course != null ? course!.subject : "",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
@ -251,7 +251,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
children: [
Expanded(
child: Text(
"讲师:${course != null ? course.author.name : ""}",
"讲师:${course != null ? course!.author.name : ""}",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
@ -273,7 +273,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
),
Text(
course != null
? course.viewers.toString()
? course!.viewers.toString()
: "",
overflow: TextOverflow.ellipsis,
maxLines: 2,
@ -290,7 +290,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
height: 10.h,
),
Text(
course != null ? course.introduce : "",
course != null ? course!.introduce : "",
overflow: isShowMore
? TextOverflow.visible
: TextOverflow.ellipsis,
@ -381,7 +381,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
_toComment,
_queryMemberComment,
_queryCourseLikes,
isLike: course?.selfLiked,
isLike: course!.selfLiked,
),
],
),
@ -432,7 +432,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
setState(() {
chapterIndex = position;
isShowImg = true;
ClassDetailsVideoState state = videoKey.currentState;
ClassDetailsVideoState state = videoKey.currentState as ClassDetailsVideoState;
state.initVideo(chapterList[position].content.fileUrl);
// initVideo(chapterList[position].content.fileUrl);
});
@ -475,18 +475,18 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
///
_queryCourseLikes() async {
BaseData baseData = await apiService
BaseData baseData = await apiService!
.courseLikes(widget.arguments["id"])
.catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
if (course.selfLiked ?? false)
course.likes -= 1;
if (course?.selfLiked ?? false)
course?.likes -= 1;
else
course.likes += 1;
course.selfLiked = !course.selfLiked ?? false;
course?.likes += 1;
course?.selfLiked = !(course?.selfLiked ?? false);
});
commentKey.currentState.setState(() {});
commentKey.currentState?.setState(() {});
} else {
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
@ -494,14 +494,14 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
///
_queryMemberComment(String content) async {
BaseData baseData = await apiService.memberComment({
BaseData baseData = await apiService!.memberComment({
"content": content,
"parentId": parenId,
"relationalId": widget.arguments["id"],
"relationalType": 3
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
CommentListState state = commentKey.currentState;
CommentListState state = commentKey.currentState as CommentListState;
state.queryMemberCommentList();
commentTextController.text = "";
FocusScope.of(context).unfocus();
@ -512,7 +512,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
///
_toComment() {
if (commentKey.currentContext == null) return;
RenderBox firstRenderBox = commentKey.currentContext.findRenderObject();
RenderBox firstRenderBox = commentKey.currentContext!.findRenderObject() as RenderBox;
Offset first = firstRenderBox.localToGlobal(Offset.zero);
scrollController.animateTo(
first.dy +
@ -532,9 +532,9 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
///
delComment(memberComment) async {
BaseData baseData = await apiService.delComment(memberComment.id);
BaseData baseData = await apiService!.delComment(memberComment.id);
if (baseData != null && baseData.isSuccess) {
CommentListState state = commentKey.currentState;
CommentListState state = commentKey.currentState as CommentListState;
state.queryMemberCommentList();
}
}

147
lib/community/community_view/class_details_video.dart

@ -6,23 +6,22 @@ import 'package:huixiang/view_widget/custom_image.dart';
import 'package:video_player/video_player.dart';
class ClassDetailsVideo extends StatefulWidget {
final Function(bool isShowImg) changeShowImg;
final Function(double height) heightFun;
final bool isShowImg;
final Function exitFull;
final String coverImg;
final String videoUrl;
final Function(bool isShowImg)? changeShowImg;
final Function(double height)? heightFun;
final bool? isShowImg;
final Function? exitFull;
final String? coverImg;
final String? videoUrl;
ClassDetailsVideo(
{
Key key,
this.changeShowImg,
this.isShowImg,
this.exitFull,
this.heightFun,
this.coverImg,
this.videoUrl
}) : super(key: key);
{Key? key,
this.changeShowImg,
this.isShowImg,
this.exitFull,
this.heightFun,
this.coverImg,
this.videoUrl})
: super(key: key);
@override
State<StatefulWidget> createState() {
@ -31,9 +30,9 @@ class ClassDetailsVideo extends StatefulWidget {
}
class ClassDetailsVideoState extends State<ClassDetailsVideo> {
VideoPlayerController videoPlayerController;
ChewieController chewieAudioController;
Chewie chewies;
VideoPlayerController? videoPlayerController;
ChewieController? chewieAudioController;
Chewie? chewies;
GlobalKey globalKey = GlobalKey();
double height = 0;
@ -43,7 +42,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]);
if(widget.videoUrl != null){
if (widget.videoUrl != null) {
initVideo(widget.videoUrl);
}
}
@ -51,56 +50,61 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
@override
void didChangeDependencies() {
if (widget.heightFun != null)
WidgetsBinding.instance.addPostFrameCallback(_getContainerHeight);
WidgetsBinding.instance?.addPostFrameCallback(_getContainerHeight);
super.didChangeDependencies();
}
_getContainerHeight(_) {
if (globalKey.currentContext != null)
height = globalKey.currentContext.size.height;
if (widget.heightFun != null) widget.heightFun(height);
height = globalKey.currentContext!.size!.height;
if (widget.heightFun != null) widget.heightFun!(height);
print("height: $height");
}
initVideo(videoUrl) async {
if (videoPlayerController != null) {
videoPlayerController.pause();
videoPlayerController.dispose();
videoPlayerController!.pause();
videoPlayerController!.dispose();
}
videoPlayerController = VideoPlayerController.network(
videoUrl,
)..initialize().then((value) {
chewieAudioController = ChewieController(
videoPlayerController: videoPlayerController,
aspectRatio: videoPlayerController.value.aspectRatio,
//
autoPlay: false,
//
looping: false,
//
allowFullScreen: true,
//
materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white,
handleColor: Colors.white,
backgroundColor: Colors.grey,
bufferedColor: Colors.transparent,
),
autoInitialize: true,
);
chewieAudioController.addListener(_fullScreenListener);
if (mounted) setState(() {});
});
chewieAudioController = ChewieController(
videoPlayerController: videoPlayerController!,
aspectRatio: videoPlayerController!.value.aspectRatio,
//
autoPlay: false,
//
looping: false,
//
allowFullScreen: true,
//
materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white,
handleColor: Colors.white,
backgroundColor: Colors.grey,
bufferedColor: Colors.transparent,
),
autoInitialize: true,
);
chewieAudioController!.addListener(_fullScreenListener);
if (mounted) setState(() {});
});
}
@override
Widget build(BuildContext context) {
return Container(
key: globalKey,child:(videoPlayerController?.value?.isInitialized ?? false) ?videoWidget(
MediaQuery.of(context).size.width,
(MediaQuery.of(context).size.width/videoPlayerController.value.aspectRatio)-43,
widget.coverImg,
):Container());
key: globalKey,
child: (videoPlayerController?.value.isInitialized ?? false)
? videoWidget(
MediaQuery.of(context).size.width,
(MediaQuery.of(context).size.width /
videoPlayerController!.value.aspectRatio) -
43,
widget.coverImg,
)
: Container());
}
@override
@ -108,16 +112,15 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
super.dispose();
if (chewieAudioController != null) {
chewieAudioController.pause();
chewieAudioController.dispose();
chewieAudioController!.pause();
chewieAudioController!.dispose();
chewieAudioController = null;
}
if (videoPlayerController != null) {
videoPlayerController.pause();
videoPlayerController.dispose();
videoPlayerController!.pause();
videoPlayerController!.dispose();
}
}
Widget videoWidget(double width, double height, src) {
@ -129,26 +132,26 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
child: Stack(children: [
(chewieAudioController != null
? Container(
color: Colors.black,
width: width,
// height: width / 7 * 5,
height: height,
child: chewies = Chewie(
controller: chewieAudioController,
),
)
color: Colors.black,
width: width,
// height: width / 7 * 5,
height: height,
child: chewies = Chewie(
controller: chewieAudioController!,
),
)
: Container(
width: width,
// height:width / 7 * 5,
height: height,
)),
if (widget.isShowImg)
width: width,
// height:width / 7 * 5,
height: height,
)),
if (widget.isShowImg ?? false)
GestureDetector(
onTap: () {
setState(() {
widget.changeShowImg(false);
widget.changeShowImg!(false);
if (chewieAudioController != null)
chewieAudioController.play();
chewieAudioController!.play();
});
},
child: Container(
@ -185,9 +188,9 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
}
Future<void> _fullScreenListener() async {
if (!chewieAudioController.isFullScreen) {
if (!chewieAudioController!.isFullScreen) {
Future.delayed(Duration(seconds: 1), () {
widget.exitFull();
widget.exitFull!();
});
}
}

4
lib/community/community_view/class_list_view.dart

@ -45,7 +45,9 @@ class _ClassListView extends State<ClassListView> {
onTap: () {
Navigator.of(context).pushNamed('/router/class_details',
arguments: {"id": widget.classList[index].id})
.then((value) => {widget.classList[index].viewers = value != null?value:widget.classList[index].viewers+1});
.then((value) => {
widget.classList[index].viewers = value != null ? value as int : widget.classList[index].viewers+1
});
},
child: classListItem(widget.classList[index]),
);

2
lib/community/community_view/class_title_tab.dart

@ -20,7 +20,7 @@ class ClassTitleTab extends StatefulWidget {
class _ClassTitleTab extends State<ClassTitleTab>
with SingleTickerProviderStateMixin {
TabController tabController;
TabController? tabController;
@override
void initState() {

2
lib/community/community_view/community_comment.dart

@ -122,7 +122,7 @@ class _CommunityComment extends State<CommunityComment> {
: widget.memberList.liked;
},
likeCount: widget.memberList.likes,
countBuilder: (int count, bool isLiked, String text) {
countBuilder: (int? count, bool isLiked, String text) {
return Text(
text,
style: TextStyle(

64
lib/community/community_view/community_dynamic.dart

@ -21,19 +21,19 @@ import '../photo_view_gallery_screen.dart';
class CommunityDynamic extends StatefulWidget {
final int itemCount;
final Function(double height) heightFun;
final Function(double height)? heightFun;
final bool isDetails;
final int commentType;
final Function removalDynamic;
final Function exitFull;
final Function? removalDynamic;
final Function? exitFull;
final bool isList;
final Article article;
final String userId;
final String? userId;
CommunityDynamic(
this.article,
this.commentType, {
Key key,
Key? key,
this.itemCount = 9,
this.heightFun,
this.isDetails = false,
@ -52,11 +52,11 @@ class CommunityDynamic extends StatefulWidget {
class _CommunityDynamic extends State<CommunityDynamic> {
GlobalKey globalKey = GlobalKey();
double height = 0;
ApiService apiService;
ApiService? apiService;
VideoPlayerController videoPlayerController;
ChewieController chewieAudioController;
Chewie chewies;
VideoPlayerController? videoPlayerController;
ChewieController? chewieAudioController;
Chewie? chewies;
@override
void initState() {
@ -66,14 +66,14 @@ class _CommunityDynamic extends State<CommunityDynamic> {
apiService = ApiService(
Dio(),
context: context,
token: value.getString('token'),
token: value.getString('token')!,
),
},
);
initVideo();
}
String filePath;
String? filePath;
initVideo() async {
if (widget?.article?.content == null) return;
@ -88,8 +88,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
cnt["video"],
)..initialize().then((value) {
chewieAudioController = ChewieController(
videoPlayerController: videoPlayerController,
aspectRatio: videoPlayerController.value.aspectRatio,
videoPlayerController: videoPlayerController!,
aspectRatio: videoPlayerController!.value.aspectRatio,
//
autoPlay: false,
//
@ -105,7 +105,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
),
autoInitialize: true,
);
chewieAudioController.addListener(_fullScreenListener);
chewieAudioController!.addListener(_fullScreenListener);
if (mounted) setState(() {});
});
}
@ -114,9 +114,9 @@ class _CommunityDynamic extends State<CommunityDynamic> {
////
_vipFollow(followId, isFollow) async {
BaseData baseData = await apiService.follow(followId);
BaseData baseData = await apiService!.follow(followId);
if (baseData != null && baseData.isSuccess) {
widget.exitFull();
widget.exitFull!();
SmartDialog.showToast(isFollow ? "关注成功" : "取关成功",
alignment: Alignment.center);
setState(() {});
@ -127,9 +127,9 @@ class _CommunityDynamic extends State<CommunityDynamic> {
///
_deleteDynamic(id) async {
BaseData baseData = await apiService.deleteTrend(id);
BaseData baseData = await apiService!.deleteTrend(id);
if (baseData != null && baseData.isSuccess) {
widget.exitFull();
widget.exitFull!();
SmartDialog.showToast("删除成功", alignment: Alignment.center);
setState(() {});
} else {
@ -222,7 +222,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
],
),
),
if (widget?.article?.updateUser != widget.userId ?? "")
if (widget?.article?.updateUser != (widget.userId ?? ""))
GestureDetector(
onTap: () {
setState(() {
@ -342,7 +342,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
}
///
Widget buildMedia(String subjectInfo) {
Widget buildMedia(String? subjectInfo) {
if (subjectInfo == null || !subjectInfo.startsWith("{")) {
return Container();
}
@ -425,7 +425,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
MediaQuery.of(context).size.width - 32,
videoPlayerController != null
? (MediaQuery.of(context).size.width - 32) /
videoPlayerController.value.aspectRatio
videoPlayerController!.value.aspectRatio
: MediaQuery.of(context).size.width / 2,
cnt["video"].replaceAll(".mp4", "_poster.jpg"),
);
@ -448,14 +448,14 @@ class _CommunityDynamic extends State<CommunityDynamic> {
super.dispose();
if (chewieAudioController != null) {
chewieAudioController.pause();
chewieAudioController.dispose();
chewieAudioController!.pause();
chewieAudioController!.dispose();
chewieAudioController = null;
}
if (videoPlayerController != null) {
videoPlayerController.pause();
videoPlayerController.dispose();
videoPlayerController!.pause();
videoPlayerController!.dispose();
}
}
@ -470,7 +470,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
width: width,
height: height,
child: chewies = Chewie(
controller: chewieAudioController,
controller: chewieAudioController!,
),
)
: Container(
@ -489,7 +489,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
child: MImage(
src,
aspectRatio: videoPlayerController != null
? videoPlayerController.value.aspectRatio
? videoPlayerController!.value.aspectRatio
: (width / 7 * 5),
fit: BoxFit.cover,
errorSrc: "assets/image/default_2_1.png",
@ -510,9 +510,9 @@ class _CommunityDynamic extends State<CommunityDynamic> {
}
Future<void> _fullScreenListener() async {
if (!chewieAudioController.isFullScreen) {
if (!chewieAudioController!.isFullScreen) {
Future.delayed(Duration(seconds: 1), () {
widget.exitFull();
widget.exitFull!();
});
}
}
@ -595,14 +595,14 @@ class _CommunityDynamic extends State<CommunityDynamic> {
@override
void didChangeDependencies() {
if (widget.heightFun != null)
WidgetsBinding.instance.addPostFrameCallback(_getContainerHeight);
WidgetsBinding.instance?.addPostFrameCallback(_getContainerHeight);
super.didChangeDependencies();
}
_getContainerHeight(_) {
if (globalKey.currentContext != null)
height = globalKey.currentContext.size.height;
if (widget.heightFun != null) widget.heightFun(height);
height = globalKey.currentContext!.size!.height;
if (widget.heightFun != null) widget.heightFun!(height);
print("height: $height");
}
}

2
lib/community/community_view/course_banner.dart

@ -24,7 +24,7 @@ class CourseBanner extends StatefulWidget {
}
class _CourseBanner extends State<CourseBanner> {
ApiService apiService;
ApiService? apiService;
final RefreshController refreshController = RefreshController();
List<BannerData> bannerData = [];

16
lib/community/community_view/home_class.dart

@ -21,8 +21,8 @@ class HomeClass extends StatefulWidget {
}
class _HomeClass extends State<HomeClass> {
ApiService apiService;
BMFCoordinate latLng;
ApiService? apiService;
BMFCoordinate? latLng;
final TextEditingController editingController = TextEditingController();
@ -76,23 +76,23 @@ class _HomeClass extends State<HomeClass> {
padding: EdgeInsets.symmetric(horizontal: 10),
itemCount: widget.collectMap[collectList.id] == null
? 0
: widget.collectMap[collectList.id].length,
: widget.collectMap[collectList.id]!.length,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/class_details',
arguments: {
"id": widget.collectMap[collectList.id][position].id
"id": widget.collectMap[collectList.id]![position].id
}).then((value) => {
widget.collectMap[collectList.id][position].viewers =
widget.collectMap[collectList.id]![position].viewers =
value != null
? value
: widget.collectMap[collectList.id][position]
? value as int
: widget.collectMap[collectList.id]![position]
.viewers +
1
});
},
child: classItem(widget.collectMap[collectList.id][position]),
child: classItem(widget.collectMap[collectList.id]![position]),
);
},
),

4
lib/community/headlines/activity_top_list.dart

@ -24,8 +24,8 @@ class ActivityTopList extends StatefulWidget {
}
class _ActivityTopList extends State<ActivityTopList> {
ApiService apiService;
BMFCoordinate latLng;
ApiService? apiService;
BMFCoordinate? latLng;
final TextEditingController editingController = TextEditingController();

10
lib/community/headlines/article_list.dart

@ -22,7 +22,7 @@ class ArticleList extends StatefulWidget {
}
class _ArticleList extends State<ArticleList> {
ApiService apiService;
ApiService? apiService;
int pageNum = 0;
@override
@ -31,7 +31,7 @@ class _ArticleList extends State<ArticleList> {
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString("token")),
context: context, token: value.getString("token")!),
});
}
@ -141,7 +141,7 @@ class _ArticleList extends State<ArticleList> {
),
Expanded(
child: Text(
"${widget?.articles[position]?.viewers}" ?? "",
"${widget.articles[position].viewers}" ?? "",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
@ -149,7 +149,7 @@ class _ArticleList extends State<ArticleList> {
),
)),
Text(
widget?.articles[position]?.createTime?.split(" ")[0] ??
widget.articles[position].createTime.split(" ")[0] ??
"",
style: TextStyle(
fontSize: 12.sp,
@ -164,7 +164,7 @@ class _ArticleList extends State<ArticleList> {
)),
SizedBox(width: 12),
MImage(
widget?.articles[position]?.coverImg ?? "",
widget.articles[position].coverImg ?? "",
fit: BoxFit.cover,
radius: BorderRadius.all(Radius.circular(2)),
width: 100,

14
lib/community/headlines/article_page.dart

@ -36,7 +36,7 @@ class _ArticlePage extends State<ArticlePage>
final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController();
ApiService apiService;
ApiService? apiService;
List<GlobalKey> globaKeys = [];
List<Brand> brands = [];
List<BannerData> bannerData = [];
@ -74,10 +74,10 @@ class _ArticlePage extends State<ArticlePage>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<PageInfo<BannerData>> baseData = await apiService.queryBanner({
BaseData<PageInfo<BannerData>> baseData = await apiService!.queryBanner({
"model": {"type": "INFORMATION"},
}).catchError((onError) {
refreshController.refreshFailed();
@ -100,10 +100,10 @@ class _ArticlePage extends State<ArticlePage>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<PageInfo<Article>> baseData = await apiService.queryArticle({
BaseData<PageInfo<Article>> baseData = await apiService!.queryArticle({
"pageNum": pageNum,
"pageSize": 10,
"searchKey": "",
@ -147,11 +147,11 @@ class _ArticlePage extends State<ArticlePage>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<List<HeadlinesList>> baseData =
await apiService.headlinesList().catchError((onError) {});
await apiService!.headlinesList().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
headlines.clear();

2
lib/community/headlines/headlines_banner.dart

@ -24,7 +24,7 @@ class HeadlinesBanner extends StatefulWidget {
}
class _HeadlinesBanner extends State<HeadlinesBanner> {
ApiService apiService;
ApiService? apiService;
final RefreshController refreshController = RefreshController();
List<BannerData> bannerData = [];

4
lib/community/headlines/headlines_collection.dart

@ -24,8 +24,8 @@ class HeadlinesCollection extends StatefulWidget {
}
class _HeadlinesCollection extends State<HeadlinesCollection> {
ApiService apiService;
BMFCoordinate latLng;
ApiService? apiService;
BMFCoordinate? latLng;
final TextEditingController editingController = TextEditingController();

16
lib/community/headlines/headlines_column_details.dart

@ -18,7 +18,7 @@ import 'package:shared_preferences/shared_preferences.dart';
class HeadlinesColumnDetails extends StatefulWidget {
final Map<String, dynamic> arguments;
HeadlinesColumnDetails({this.arguments});
HeadlinesColumnDetails({required this.arguments});
@override
State<StatefulWidget> createState() {
@ -28,9 +28,9 @@ class HeadlinesColumnDetails extends StatefulWidget {
class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
with WidgetsBindingObserver {
ApiService apiService;
ApiService? apiService;
List<Article> articles = [];
HeadlinesListDetails headlinesListDetails;
HeadlinesListDetails? headlinesListDetails;
List<HeadlinesList> headlines = [];
final RefreshController refreshController = RefreshController();
final ScrollController scrollController = ScrollController();
@ -39,7 +39,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
WidgetsBinding.instance?.addObserver(this);
_onRefresh();
}
@ -50,11 +50,11 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<HeadlinesListDetails> baseData =
await apiService.headlinesDetails(id).catchError((error) {});
await apiService!.headlinesDetails(id).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
headlinesListDetails = baseData.data;
@ -69,10 +69,10 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData<PageInfo<Article>> baseData = await apiService.queryArticle({
BaseData<PageInfo<Article>> baseData = await apiService!.queryArticle({
"pageNum": pageNum,
"pageSize": 10,
"searchKey": "",

37
lib/community/release_dynamic.dart

@ -29,7 +29,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
bool isRelease = false;
int dynamicType = 0;
TextEditingController textEditingController = TextEditingController();
ApiService apiService;
ApiService? apiService;
@override
void initState() {
@ -39,7 +39,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
showLoading: false,
);
});
@ -167,9 +167,9 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
subjectType = "video";
}
List<String> remoteImageUrls = [];
String remoteVideoUrl = "";
String remoteVideoCoverImg = "";
List<String?> remoteImageUrls = [];
String? remoteVideoUrl = "";
String? remoteVideoCoverImg = "";
if (mediaPaths.length > 0) {
if (dynamicType == 1) {
remoteImageUrls = mediaPaths.map((e) => e.remotePath).toList();
@ -179,7 +179,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
}
}
BaseData<bool> baseData = await apiService.trend({
BaseData<bool> baseData = await apiService!.trend({
"images": remoteImageUrls,
"subject": dynamicText,
"subjectType": subjectType,
@ -202,18 +202,19 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
Future<void> fileUpload() async {
if (mediaPaths != null && mediaPaths.length > 0) {
await Future.forEach(mediaPaths, (element) async {
element = (element as Medias);
if ((element.remotePath == null || element.remotePath == "") &&
(element != null &&
element.path != null &&
element.path != "" &&
await File(element.path).exists())) {
File file = File(element.path);
await File(element.path!).exists())) {
File file = File(element.path!);
if (dynamicType == 2) {
String thumbnail;
if (element.thumbPath != null &&
element.thumbPath != "" &&
await File(element.thumbPath).exists()) {
thumbnail = element.thumbPath;
await File(element.thumbPath!).exists()) {
thumbnail = element.thumbPath!;
} else {
thumbnail = await Thumbnails.getThumbnail(
videoFile: file.path,
@ -224,7 +225,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
if (thumbnail != null &&
thumbnail != "" &&
await File(thumbnail).exists()) {
BaseData<UploadResult> baseData = await apiService.upload(
BaseData<UploadResult> baseData = await apiService!.upload(
File(thumbnail),
123123123,
dynamicType == 2
@ -236,7 +237,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
}
}
}
BaseData<UploadResult> baseData = await apiService.upload(
BaseData<UploadResult> baseData = await apiService!.upload(
file,
123123123,
dynamicType == 2
@ -265,8 +266,8 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
borderRadius: BorderRadius.circular(4),
child: Image.file(
File(media.galleryMode == GalleryMode.video
? media.thumbPath
: media.path),
? media.thumbPath!
: media.path!),
fit: BoxFit.cover,
width: double.infinity,
height: double.infinity,
@ -523,8 +524,8 @@ class Medias {
this.galleryMode = media.galleryMode;
}
String thumbPath;
String path;
GalleryMode galleryMode;
String remotePath;
String? thumbPath;
String? path;
GalleryMode? galleryMode;
String? remotePath;
}

13
lib/generated/intl/messages_all.dart

@ -30,7 +30,7 @@ Map<String, LibraryLoader> _deferredLibraries = {
'zh_TW': () => new Future.value(null),
};
MessageLookupByLibrary _findExact(String localeName) {
MessageLookupByLibrary? _findExact(String localeName) {
switch (localeName) {
case 'en':
return messages_en.messages;
@ -50,9 +50,8 @@ MessageLookupByLibrary _findExact(String localeName) {
/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) async {
var availableLocale = Intl.verifiedLocale(
localeName,
(locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return new Future.value(false);
}
@ -71,9 +70,9 @@ bool _messagesExistFor(String locale) {
}
}
MessageLookupByLibrary _findGeneratedMessagesFor(String locale) {
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
onFailure: (_) => null);
MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}

1289
lib/generated/intl/messages_en.dart

File diff suppressed because it is too large Load Diff

1279
lib/generated/intl/messages_zh_CN.dart

File diff suppressed because it is too large Load Diff

1279
lib/generated/intl/messages_zh_Hans_CN.dart

File diff suppressed because it is too large Load Diff

1277
lib/generated/intl/messages_zh_Hant_CN.dart

File diff suppressed because it is too large Load Diff

1279
lib/generated/intl/messages_zh_TW.dart

File diff suppressed because it is too large Load Diff

43
lib/generated/l10n.dart

@ -10,28 +10,43 @@ import 'intl/messages_all.dart';
// ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars
// ignore_for_file: join_return_with_assignment, prefer_final_in_for_each
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes
class S {
S();
static S current;
static S? _current;
static const AppLocalizationDelegate delegate =
AppLocalizationDelegate();
static S get current {
assert(_current != null,
'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.');
return _current!;
}
static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
static Future<S> load(Locale locale) {
final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString();
final name = (locale.countryCode?.isEmpty ?? false)
? locale.languageCode
: locale.toString();
final localeName = Intl.canonicalizedLocale(name);
return initializeMessages(localeName).then((_) {
Intl.defaultLocale = localeName;
S.current = S();
final instance = S();
S._current = instance;
return S.current;
return instance;
});
}
static S of(BuildContext context) {
final instance = S.maybeOf(context);
assert(instance != null,
'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?');
return instance!;
}
static S? maybeOf(BuildContext context) {
return Localizations.of<S>(context, S);
}
@ -5653,8 +5668,10 @@ class AppLocalizationDelegate extends LocalizationsDelegate<S> {
return const <Locale>[
Locale.fromSubtags(languageCode: 'en'),
Locale.fromSubtags(languageCode: 'zh', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant', countryCode: 'CN'),
Locale.fromSubtags(
languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'),
Locale.fromSubtags(
languageCode: 'zh', scriptCode: 'Hant', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'),
];
}
@ -5667,11 +5684,9 @@ class AppLocalizationDelegate extends LocalizationsDelegate<S> {
bool shouldReload(AppLocalizationDelegate old) => false;
bool _isSupported(Locale locale) {
if (locale != null) {
for (var supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode) {
return true;
}
for (var supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode) {
return true;
}
}
return false;

12
lib/main.dart

@ -109,7 +109,7 @@ void main() async {
}
ImgCachePath();
initSdk();
bool isFirst = sharedPreferences.getBool("isFirst");
bool isFirst = sharedPreferences.getBool("isFirst") ?? true;
runApp(MyApp(locale, isFirst));
// FlutterBugly.postCatchedException((){
@ -199,9 +199,9 @@ class MyApp extends StatelessWidget {
S.delegate
],
localeListResolutionCallback:
(List<Locale> locales, Iterable<Locale> supportedLocales) {
print("locale: ${locales[0]}");
return appLocale ?? locales[0];
(List<Locale>? locales, Iterable<Locale> supportedLocales) {
print("locale: ${locales?[0]}");
return appLocale ?? locales?[0];
},
supportedLocales: S.delegate.supportedLocales,
home: (isFirst ?? true) ? GuidePage() : LoginPage(),
@ -217,8 +217,8 @@ class MyApp extends StatelessWidget {
},
),
onGenerateRoute: (settings) {
final String name = settings.name;
final Function pageContentBuilder = routers[name];
final String? name = settings.name;
final Function? pageContentBuilder = routers[name];
if (pageContentBuilder != null) {
final Route route = CupertinoPageRoute(
builder: (context) {

26
lib/mine/mine_page.dart

@ -33,10 +33,10 @@ class MinePage extends StatefulWidget {
}
class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
ApiService apiService;
UserInfo userInfo;
ApiService? apiService;
UserInfo? userInfo;
List<Rank> ranks = [];
SocialInfo infoNumber;
SocialInfo? infoNumber;
final RefreshController _refreshController = RefreshController();
_toUserInfo() async {
@ -80,17 +80,17 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
if (value.containsKey('user') &&
value.getString('user') != null &&
value.getString('user') != "") {
userInfo = UserInfo.fromJson(jsonDecode(value.getString('user')));
userInfo = UserInfo.fromJson(jsonDecode(value.getString('user')!));
}
apiService = ApiService(
Dio(),
context: context,
token: value.getString('token'),
token: value.getString('token')!,
showLoading: false,
);
BaseData<List<Rank>> rankData =
await apiService.rankList().catchError((onError) {
await apiService!.rankList().catchError((onError) {
_refreshController.refreshFailed();
});
if (rankData != null && rankData.isSuccess) {
@ -99,7 +99,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
}
BaseData<UserInfo> baseDate =
await apiService.queryInfo().catchError((onError) {
await apiService!.queryInfo().catchError((onError) {
_refreshController.refreshFailed();
});
if (baseDate != null && baseDate.isSuccess) {
@ -127,12 +127,12 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
showLoading: false,
);
BaseData<SocialInfo> baseData =
await apiService.socialInfo().catchError((onError) {
await apiService!.socialInfo().catchError((onError) {
_refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
@ -202,7 +202,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
ranks: ranks,
userInfo: userInfo,
rank: double.tryParse(
userInfo?.expendAmount ?? "0")
userInfo?.expendAmount ?? "0")!
.toInt(),
rankMax:
userInfo?.memberRankVo?.nextOrigin ?? 0,
@ -345,7 +345,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
child: Column(
children: [
Text(
infoNumber != null ? infoNumber.follow.toString() : "0",
infoNumber != null ? infoNumber!.follow.toString() : "0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
@ -382,7 +382,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
child: Column(
children: [
Text(
infoNumber != null ? infoNumber.fans.toString() : "0",
infoNumber != null ? infoNumber!.fans.toString() : "0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
@ -420,7 +420,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
children: [
Text(
infoNumber != null
? infoNumber.achievementNumber.toString()
? infoNumber!.achievementNumber.toString()
: "0",
style: TextStyle(
color: Color(0xFF000000),

27
lib/mine/mine_view/mine_view.dart

@ -19,7 +19,7 @@ import 'package:shared_preferences/shared_preferences.dart';
// import 'package:qrscan/qrscan.dart' as scanner;
class MineView extends StatefulWidget {
final UserInfo userInfo;
final UserInfo? userInfo;
final GestureTapCallback toUserInfo;
final GestureTapCallback toIntegralPage;
@ -32,7 +32,7 @@ class MineView extends StatefulWidget {
}
class _MineView extends State<MineView> {
ApiService apiService;
ApiService? apiService;
///
queryWiped(memberCouponId) async {
@ -41,10 +41,10 @@ class _MineView extends State<MineView> {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
token: value.getString("token")!,
);
}
BaseData baseData = await apiService.wiped(memberCouponId);
BaseData baseData = await apiService!.wiped(memberCouponId);
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("核销成功", alignment: Alignment.center);
} else {
@ -125,16 +125,17 @@ class _MineView extends State<MineView> {
///
activityShowAlertDialog(result.toString());
return;
}if(result.toString().contains("type\":\"wiped")){
}
if(result.toString().contains("type\":\"wiped")){
///
queryWiped(jsonDecode(result.toString())["memberCouponId"]);
return;
}
// String result = await scanner.scan();
Uri uri = Uri.parse(result);
String tableId = uri.queryParameters["tableId"];
String tenantCode = uri.queryParameters["tenantCode"];
String shopId = uri.queryParameters["shopId"];
Uri uri = Uri.parse("$result");
String? tableId = uri.queryParameters["tableId"];
String? tenantCode = uri.queryParameters["tenantCode"];
String? shopId = uri.queryParameters["shopId"];
if (tableId != null &&
tableId != "" &&
tenantCode != null &&
@ -183,7 +184,7 @@ class _MineView extends State<MineView> {
child: Stack(
children: [
MImage(
widget.userInfo == null ? "" : widget.userInfo.headimg,
widget.userInfo == null ? "" : widget.userInfo!.headimg,
isCircle: true,
width: 50,
height: 50,
@ -237,7 +238,7 @@ class _MineView extends State<MineView> {
child: Text(
widget.userInfo == null
? S.of(context).denglu
: "${widget.userInfo.nickname}",
: "${widget.userInfo!.nickname}",
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
@ -245,7 +246,7 @@ class _MineView extends State<MineView> {
),
),
),
if(widget.userInfo.level != 1)
if(widget.userInfo != null && widget.userInfo!.level != 1)
Image.asset(
"assets/image/icon_user.png",
width: 18.w,
@ -265,7 +266,7 @@ class _MineView extends State<MineView> {
: Text(
widget.userInfo == null
? ""
: "我的积分:${widget.userInfo.points}",
: "我的积分:${widget.userInfo!.points}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,

12
lib/retrofit/retrofit_api.dart

@ -56,14 +56,14 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.236:8766/app/"; ///
// const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/";
@ -173,7 +173,7 @@ abstract class ApiService {
@GET(
"https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location={lat},{lng}&keywords={keywords}&offset={size}&page={page}&extensions=all")
Future<dynamic> searchPoi(@Path("lat") String lat, @Path("lng") String lng,
@Path("keywords") String keywords, int size, int page);
@Path("keywords") String? keywords, int size, int page);
///
@POST("/auth/platform/memberLogin")
@ -354,7 +354,7 @@ abstract class ApiService {
////
@GET("/information/likes/{id}")
Future<BaseData> informationLikes(@Path("id") String id);
Future<BaseData> informationLikes(@Path("id") String? id);
///
@POST("/memberComment")

26
lib/view_widget/keyboard/keyboard_widget.dart

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:huixiang/view_widget/keyboard/custom_keyboard_button.dart';
import 'package:huixiang/view_widget/keyboard/pay_password.dart';
import 'package:huixiang/view_widget/keyboard/pay_password.dart' as K;
///
class MyKeyboard extends StatefulWidget {
@ -22,52 +22,52 @@ class MyKeyboardStat extends State<MyKeyboard> {
var backMethod;
void onCommitChange() {
widget.callback(KeyEvent("commit"));
widget.callback(K.KeyEvent("commit"));
}
void onOneChange(BuildContext cont) {
widget.callback(KeyEvent("1"));
widget.callback(K.KeyEvent("1"));
}
void onTwoChange(BuildContext cont) {
widget.callback(KeyEvent("2"));
widget.callback(K.KeyEvent("2"));
}
void onThreeChange(BuildContext cont) {
widget.callback(KeyEvent("3"));
widget.callback(K.KeyEvent("3"));
}
void onFourChange(BuildContext cont) {
widget.callback(KeyEvent("4"));
widget.callback(K.KeyEvent("4"));
}
void onFiveChange(BuildContext cont) {
widget.callback(KeyEvent("5"));
widget.callback(K.KeyEvent("5"));
}
void onSixChange(BuildContext cont) {
widget.callback(KeyEvent("6"));
widget.callback(K.KeyEvent("6"));
}
void onSevenChange(BuildContext cont) {
widget.callback(KeyEvent("7"));
widget.callback(K.KeyEvent("7"));
}
void onEightChange(BuildContext cont) {
widget.callback(KeyEvent("8"));
widget.callback(K.KeyEvent("8"));
}
void onNineChange(BuildContext cont) {
widget.callback(KeyEvent("9"));
widget.callback(K.KeyEvent("9"));
}
void onZeroChange(BuildContext cont) {
widget.callback(KeyEvent("0"));
widget.callback(K.KeyEvent("0"));
}
///
void onDeleteChange() {
widget.callback(KeyEvent("del"));
widget.callback(K.KeyEvent("del"));
}
@override

22
lib/view_widget/mine_vip_view.dart

@ -14,12 +14,12 @@ class MineVipView extends StatelessWidget {
final int rankMax;
final int rank;
final String createTime;
final String tag;
final String? tag;
final double padding;
final UserInfo userInfo;
final List<Rank> ranks;
final bool showRank;
final String price;
final UserInfo? userInfo;
final List<Rank>? ranks;
final bool? showRank;
final String? price;
MineVipView({
this.vipLevel = 1,
@ -48,10 +48,10 @@ class MineVipView extends StatelessWidget {
Color textColor = Colors.white;
if (userInfo != null &&
userInfo.memberRankVo != null &&
userInfo!.memberRankVo != null &&
ranks != null &&
ranks.length > 0) {
curLevel = (ranks.indexWhere((element) => element.id == userInfo.memberRankVo.id) + 1);
ranks!.length > 0) {
curLevel = (ranks!.indexWhere((element) => element.id == userInfo!.memberRankVo.id) + 1);
vipLevel = curLevel;
}
@ -330,9 +330,9 @@ class MineVipView extends StatelessWidget {
Navigator.of(context)
.pushNamed('/router/mine_vip_core', arguments: {
"rankLevel": curLevel,
"userInfo":userInfo.masterCardRankName,
"createTime": (userInfo != null) ? "${userInfo.createTime}" : "",
"expendAmount": double.tryParse(userInfo?.expendAmount??"0").toInt(),
"userInfo":userInfo!.masterCardRankName,
"createTime": (userInfo != null) ? "${userInfo!.createTime}" : "",
"expendAmount": double.tryParse(userInfo?.expendAmount??"0")!.toInt(),
});
});
}

31
lib/web/web_view/comment_list.dart

@ -16,18 +16,18 @@ import 'package:like_button/like_button.dart';
import 'package:shared_preferences/shared_preferences.dart';
class CommentList extends StatefulWidget {
final bool isKeyBoardShow;
final Function reply;
final Function delCommentTips;
final double fontSize;
final String relationalId;
final String? relationalId;
final int relationalType;
final int like;
final Function requestApiFinish;
final Function? requestApiFinish;
CommentList(Key key, this.like, this.relationalId,this.relationalType,
this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize,{this.requestApiFinish})
CommentList(Key key, this.like, this.relationalId, this.relationalType,
this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize,
{this.requestApiFinish})
: super(key: key);
@override
@ -39,17 +39,18 @@ class CommentList extends StatefulWidget {
class CommentListState extends State<CommentList> {
int commentTotal = 0;
List<MemberCommentList> memberList = [];
ApiService apiService;
ApiService? apiService;
//
queryCommentLike(String id) async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
String token = sharedPreferences.getString("token");
String token = sharedPreferences.getString("token") ?? "";
if (token == null || token == "") {
LoginTipsDialog().show(context);
return;
}
BaseData baseData = await apiService.commentLike(id).catchError((error) {});
BaseData baseData =
await apiService!.commentLike(id).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
memberList.forEach((element) {
if (element.id == id) {
@ -59,7 +60,6 @@ class CommentListState extends State<CommentList> {
} else {
element.likes += 1;
element.liked = true;
}
}
});
@ -198,18 +198,17 @@ class CommentListState extends State<CommentList> {
//
queryMemberCommentList() async {
if(widget?.relationalId == null || widget.relationalId.isEmpty)
return;
if (widget?.relationalId == null || widget.relationalId!.isEmpty) return;
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
Dio(),
context: context,
token: sharedPreferences.getString("token"),
token: sharedPreferences.getString("token") ?? "",
showLoading: false,
);
BaseData<PageInfo<MemberCommentList>> baseData =
await apiService.memberCommentList({
await apiService!.memberCommentList({
"pageNum": 1,
"pageSize": 100,
"relationalId": widget.relationalId,
@ -219,7 +218,9 @@ class CommentListState extends State<CommentList> {
setState(() {
memberList.clear();
commentTotal = baseData.data.size;
widget.requestApiFinish(commentTotal);
if (widget.requestApiFinish != null) {
widget.requestApiFinish!(commentTotal);
}
memberList.addAll(baseData.data.list);
contentHeight();
setState(() {});
@ -351,7 +352,7 @@ class CommentListState extends State<CommentList> {
: memberList.liked;
},
likeCount: memberList.likes,
countBuilder: (int count, bool isLiked, String text) {
countBuilder: (int? count, bool isLiked, String text) {
return Text(
text,
style: TextStyle(

129
pubspec.lock

@ -8,6 +8,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
amap_flutter_location:
dependency: "direct main"
description:
name: amap_flutter_location
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
android_intent_plus:
dependency: "direct main"
description:
@ -21,7 +28,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.6.1"
version: "2.8.2"
barcode:
dependency: transitive
description:
@ -56,14 +63,14 @@ packages:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
version: "1.3.1"
chewie:
dependency: transitive
description:
@ -92,20 +99,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.5"
version: "3.0.1"
csslib:
dependency: transitive
description:
@ -173,35 +173,35 @@ packages:
name: flutter_baidu_mapapi_base
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "3.0.0"
flutter_baidu_mapapi_map:
dependency: "direct main"
description:
name: flutter_baidu_mapapi_map
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "3.0.0+2"
flutter_baidu_mapapi_search:
dependency: "direct main"
description:
name: flutter_baidu_mapapi_search
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "3.0.0"
flutter_baidu_mapapi_utils:
dependency: "direct main"
description:
name: flutter_baidu_mapapi_utils
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "3.0.0"
flutter_bmflocation:
dependency: "direct main"
description:
name: flutter_bmflocation
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.4"
version: "2.0.0-nullsafety.1"
flutter_easyloading:
dependency: "direct main"
description:
@ -248,7 +248,7 @@ packages:
name: flutter_plugin_android_lifecycle
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.11"
version: "2.0.5"
flutter_screenutil:
dependency: "direct main"
description:
@ -398,14 +398,21 @@ packages:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
version: "1.7.0"
nested:
dependency: transitive
description:
@ -461,7 +468,21 @@ packages:
name: path_provider
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
version: "2.0.9"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.9"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.7"
path_provider_linux:
dependency: transitive
description:
@ -469,6 +490,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.5"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
path_provider_platform_interface:
dependency: transitive
description:
@ -489,14 +517,14 @@ packages:
name: permission_handler
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.1.0+2"
version: "8.3.0"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.2"
version: "3.7.0"
petitparser:
dependency: transitive
description:
@ -524,7 +552,7 @@ packages:
name: plugin_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
version: "2.1.2"
process:
dependency: transitive
description:
@ -690,7 +718,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
version: "0.4.8"
thumbnails:
dependency: "direct main"
description:
@ -734,14 +762,7 @@ packages:
name: url_launcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.7.10"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+4"
version: "5.4.0"
url_launcher_macos:
dependency: transitive
description:
@ -755,35 +776,28 @@ packages:
name: url_launcher_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.9"
version: "1.0.1"
url_launcher_web:
dependency: transitive
dependency: "direct main"
description:
name: url_launcher_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.5+3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+3"
version: "0.1.1+5"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.2"
version: "3.0.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.1.1"
video_player:
dependency: "direct main"
description:
@ -846,7 +860,28 @@ packages:
name: webview_flutter
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.13"
version: "2.8.0"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.8.3"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.1"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.7.1"
win32:
dependency: transitive
description:
@ -869,5 +904,5 @@ packages:
source: hosted
version: "5.1.2"
sdks:
dart: ">=2.13.0 <3.0.0"
flutter: ">=2.2.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"

22
pubspec.yaml

@ -6,7 +6,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
@ -30,13 +30,17 @@ dependencies:
flutter_staggered_grid_view: ^0.4.0 # Null safety
pull_to_refresh: ^2.0.0 # Null safety
permission_handler: ^5.0.1+1
url_launcher_web: ^0.1.1+5
flutter_bmflocation: ^1.0.3
flutter_baidu_mapapi_base: ^2.0.1
flutter_baidu_mapapi_map: ^2.0.1
flutter_baidu_mapapi_search: ^2.0.1
flutter_baidu_mapapi_utils: ^2.0.1
permission_handler: 8.3.0
flutter_bmflocation: ^2.0.0-nullsafety.1
flutter_baidu_mapapi_base: ^3.0.0
flutter_baidu_mapapi_map: ^3.0.0+2
flutter_baidu_mapapi_search: ^3.0.0
flutter_baidu_mapapi_utils: ^3.0.0
amap_flutter_location: ^3.0.0
dio: ^3.0.10
rxdart: ^0.26.0
@ -64,7 +68,7 @@ dependencies:
# qrscan: ^0.3.1
scan: ^1.5.0
path_provider: ^1.2.0
path_provider: ^2.0.9
network_to_file_image: ^2.0.0
flutter_html: ^2.1.5 #2.1.0
@ -78,7 +82,7 @@ dependencies:
package_info: ^2.0.2
sharesdk_plugin: ^1.3.0
sharesdk_plugin: ^1.3.2
flutter_spinkit: ^5.0.0
flutter_easyloading: ^3.0.0

Loading…
Cancel
Save