upgrade ios sdk to 12.1(need fix)

对接直播列表接口
master
laiiihz 5 years ago
parent 4825d97a4a
commit 732ba96872

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '9.3'
platform :ios, '12.1'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -1,24 +1,84 @@
PODS:
- AlipaySDK-iOS (15.6.8)
- AMap3DMap-NO-IDFA (7.6.0):
- AMapFoundation-NO-IDFA (~> 1.6.3)
- amap_core_fluttify (0.0.1):
- AMapFoundation (~> 1.6)
- AMapFoundation-NO-IDFA (~> 1.6.4)
- Flutter
- foundation_fluttify
- amap_location_fluttify (0.0.1):
- amap_core_fluttify
- AMapLocation (~> 2.6.3)
- AMapLocation-NO-IDFA (= 2.6.7)
- Flutter
- foundation_fluttify
- AMapFoundation (1.6.3)
- AMapLocation (2.6.5):
- AMapFoundation (~> 1.6.3)
- amap_map_fluttify (0.0.1):
- AMap3DMap-NO-IDFA (= 7.6.0)
- amap_core_fluttify
- amap_location_fluttify
- amap_search_fluttify
- Flutter
- foundation_fluttify
- url_launcher
- amap_search_fluttify (0.0.1):
- amap_core_fluttify
- AMapSearch-NO-IDFA (~> 7.3.0)
- Flutter
- foundation_fluttify
- AMapFoundation-NO-IDFA (1.6.4)
- AMapLocation-NO-IDFA (2.6.7):
- AMapFoundation-NO-IDFA (~> 1.6.4)
- AMapSearch-NO-IDFA (7.3.0):
- AMapFoundation-NO-IDFA (~> 1.6.3)
- Bugly (2.5.5)
- camera (0.0.1):
- Flutter
- core_location_fluttify (0.0.1):
- Flutter
- foundation_fluttify
- DKImagePickerController/Core (4.3.2):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
- DKImagePickerController/ImageDataManager (4.3.2)
- DKImagePickerController/PhotoGallery (4.3.2):
- DKImagePickerController/Core
- DKPhotoGallery
- DKImagePickerController/Resource (4.3.2)
- DKPhotoGallery (0.0.17):
- DKPhotoGallery/Core (= 0.0.17)
- DKPhotoGallery/Model (= 0.0.17)
- DKPhotoGallery/Preview (= 0.0.17)
- DKPhotoGallery/Resource (= 0.0.17)
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Core (0.0.17):
- DKPhotoGallery/Model
- DKPhotoGallery/Preview
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Model (0.0.17):
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Preview (0.0.17):
- DKPhotoGallery/Model
- DKPhotoGallery/Resource
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Resource (0.0.17):
- SDWebImage
- SwiftyGif
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Flutter (1.0.0)
- flutter_bugly (0.0.1):
- Bugly
- Flutter
- flutter_ffmpeg (0.2.10):
- Flutter
- flutter_ffmpeg/https (= 0.2.10)
- flutter_ffmpeg/https (0.2.10):
- Flutter
- mobile-ffmpeg-https (= 4.3.1)
- flutter_image_compress (0.0.1):
- Flutter
- Mantle
@ -45,6 +105,15 @@ PODS:
- LBXScan/Types (2.5.1)
- LBXZBarSDK (1.3.5)
- libOpenInstallSDK (2.3.1)
- libwebp (1.1.0):
- libwebp/demux (= 1.1.0)
- libwebp/mux (= 1.1.0)
- libwebp/webp (= 1.1.0)
- libwebp/demux (1.1.0):
- libwebp/webp
- libwebp/mux (1.1.0):
- libwebp/demux
- libwebp/webp (1.1.0)
- Mantle (2.1.1):
- Mantle/extobjc (= 2.1.1)
- Mantle/extobjc (2.1.1)
@ -105,6 +174,7 @@ PODS:
- mob_sharesdk/ShareSDK
- MOBFoundation (>= 3.2.9)
- MOBFoundation (3.2.17)
- mobile-ffmpeg-https (4.3.1)
- openinstall_flutter_plugin (0.0.1):
- Flutter
- libOpenInstallSDK
@ -116,6 +186,9 @@ PODS:
- Flutter
- photo_manager (0.0.1):
- Flutter
- SDWebImage (5.9.2):
- SDWebImage/Core (= 5.9.2)
- SDWebImage/Core (5.9.2)
- shared_preferences (0.0.1):
- Flutter
- sharesdk_plugin (1.1.2):
@ -135,14 +208,23 @@ PODS:
- mob_sharesdk/ShareSDKPlatforms/WeChatFull
- mob_sharesdk/ShareSDKRestoreScene
- mob_sharesdk/ShareSDKUI
- SwiftyGif (5.3.0)
- tencent_live_fluttify (0.0.1):
- Flutter
- foundation_fluttify
- TXLiteAVSDK_Professional (= 7.2.8927)
- tobias (0.0.1):
- AlipaySDK-iOS (~> 15.6.8)
- Flutter
- TOCropViewController (2.5.4)
- TXLiteAVSDK_Professional (7.2.8927)
- url_launcher (0.0.1):
- Flutter
- video_player (0.0.1):
- Flutter
- video_thumbnail (0.0.1):
- Flutter
- libwebp
- wakelock (0.0.1):
- Flutter
- webview_flutter (0.0.1):
@ -151,9 +233,14 @@ PODS:
DEPENDENCIES:
- amap_core_fluttify (from `.symlinks/plugins/amap_core_fluttify/ios`)
- amap_location_fluttify (from `.symlinks/plugins/amap_location_fluttify/ios`)
- amap_map_fluttify (from `.symlinks/plugins/amap_map_fluttify/ios`)
- amap_search_fluttify (from `.symlinks/plugins/amap_search_fluttify/ios`)
- camera (from `.symlinks/plugins/camera/ios`)
- core_location_fluttify (from `.symlinks/plugins/core_location_fluttify/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`)
- flutter_ffmpeg (from `.symlinks/plugins/flutter_ffmpeg/ios`)
- flutter_image_compress (from `.symlinks/plugins/flutter_image_compress/ios`)
- flutter_qr_reader (from `.symlinks/plugins/flutter_qr_reader/ios`)
- fluwx (from `.symlinks/plugins/fluwx/ios`)
@ -169,38 +256,59 @@ DEPENDENCIES:
- photo_manager (from `.symlinks/plugins/photo_manager/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- sharesdk_plugin (from `.symlinks/plugins/sharesdk_plugin/ios`)
- tencent_live_fluttify (from `.symlinks/plugins/tencent_live_fluttify/ios`)
- tobias (from `.symlinks/plugins/tobias/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- video_player (from `.symlinks/plugins/video_player/ios`)
- video_thumbnail (from `.symlinks/plugins/video_thumbnail/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
SPEC REPOS:
trunk:
- AlipaySDK-iOS
- AMapFoundation
- AMapLocation
- AMap3DMap-NO-IDFA
- AMapFoundation-NO-IDFA
- AMapLocation-NO-IDFA
- AMapSearch-NO-IDFA
- Bugly
- DKImagePickerController
- DKPhotoGallery
- LBXScan
- LBXZBarSDK
- libOpenInstallSDK
- libwebp
- Mantle
- Meiqia
- mob_sharesdk
- MOBFoundation
- mobile-ffmpeg-https
- SDWebImage
- SwiftyGif
- TOCropViewController
- TXLiteAVSDK_Professional
EXTERNAL SOURCES:
amap_core_fluttify:
:path: ".symlinks/plugins/amap_core_fluttify/ios"
amap_location_fluttify:
:path: ".symlinks/plugins/amap_location_fluttify/ios"
amap_map_fluttify:
:path: ".symlinks/plugins/amap_map_fluttify/ios"
amap_search_fluttify:
:path: ".symlinks/plugins/amap_search_fluttify/ios"
camera:
:path: ".symlinks/plugins/camera/ios"
core_location_fluttify:
:path: ".symlinks/plugins/core_location_fluttify/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
Flutter:
:path: Flutter
flutter_bugly:
:path: ".symlinks/plugins/flutter_bugly/ios"
flutter_ffmpeg:
:path: ".symlinks/plugins/flutter_ffmpeg/ios"
flutter_image_compress:
:path: ".symlinks/plugins/flutter_image_compress/ios"
flutter_qr_reader:
@ -231,12 +339,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/shared_preferences/ios"
sharesdk_plugin:
:path: ".symlinks/plugins/sharesdk_plugin/ios"
tencent_live_fluttify:
:path: ".symlinks/plugins/tencent_live_fluttify/ios"
tobias:
:path: ".symlinks/plugins/tobias/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
video_player:
:path: ".symlinks/plugins/video_player/ios"
video_thumbnail:
:path: ".symlinks/plugins/video_thumbnail/ios"
wakelock:
:path: ".symlinks/plugins/wakelock/ios"
webview_flutter:
@ -244,14 +356,23 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AlipaySDK-iOS: 703a55774a37f412410ab04af96c011b91ec58cb
amap_core_fluttify: bc2e4245c6a6d869727ed16b009a9fa3dbefcf4a
amap_location_fluttify: 487dc181dc7e5a33d50b662cf5a3f148fde42261
AMapFoundation: 9ed923193b357ebb30a073e9fe255d3c24054d5a
AMapLocation: c566d448285cd502c1e313063d9e2460bd4d7100
AMap3DMap-NO-IDFA: 5e5b483ef230d1bed6c8d989d36254a66c67a6fc
amap_core_fluttify: 832331914f028c32aebf1dab23474a82aff828e8
amap_location_fluttify: baa3007e3f215456ab2ea2f4ccccf5bc1a9a164b
amap_map_fluttify: 6b64256d6ccea7813e1b6423fcf7b5ef10d3c984
amap_search_fluttify: f83f950b4f8e8688bc8b100684c33868335f2e06
AMapFoundation-NO-IDFA: 68a24362b110b8e0a3677605d0fd36bdf521f2bb
AMapLocation-NO-IDFA: 2a3edfee336b38481b892e1ecc85df0f6b365851
AMapSearch-NO-IDFA: 85555dc9ba312949d39a259baa4ef4e0619fa944
Bugly: eded937bbb1f731cacf689c2d934ddbd9ab34f83
core_location_fluttify: 24cc9dcd986ac7059916632d2cb3babb1568ff61
camera: a0ca5080336f7af47b88436e5e26da3dee5568f0
core_location_fluttify: 9466a411ea7d22c6349c7e6a767ae4623f01eb1d
DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_bugly: c9800f4d5bc5bdc27ffdde3417a26ba44266e0c3
flutter_ffmpeg: cf0a6941ef67e88248c998cc3e34f8acb0b4e454
flutter_image_compress: f69d0e0e078ce52b4810695593bc861ee319ae7d
flutter_qr_reader: 1b4faf9032e9ddc738107fd3dc067d29bd5cc67d
fluwx: 13b180563982bf3149472d650e01fa0312236c3d
@ -262,25 +383,32 @@ SPEC CHECKSUMS:
LBXScan: 90ca10d0c38fb4a5a6980d7782354f3f69f50093
LBXZBarSDK: db826d1265fbb4fbdbb2f30d7d1e96142e32bfff
libOpenInstallSDK: a3b390cc1a514e33253a8eacf152661cfa94ce86
libwebp: 946cb3063cea9236285f7e9a8505d806d30e07f3
Mantle: 35238ae6f2e2b2d474fa7b67fee82a59fea71915
Meiqia: f4bb24e7a785e100957e6702d19853434dcb486e
meiqia_plugin: bff6743de1eb5e1f7c6b2142a5953e18c4abbbe7
mob_sharesdk: 954db91c66f5460bc57940ac3fb144cc0304b6a4
MOBFoundation: 37e2c100051fd710976b1f8d00643d28f31fcaca
mobile-ffmpeg-https: c4a3c255163ddb1abc4b4dfc613c2d885f8c46eb
openinstall_flutter_plugin: e6b8486f834eb60b336546442a8b747d4b664cf4
package_info: 48b108e75b8802c2d5e126f208ef540561c98aef
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
permission_handler: 67637977b227d62d46bfbf524f335f8568de5a73
photo_manager: f7c619c2cc8c2adb8d85c63363babac477de9c67
SDWebImage: 0b42b8719ab0c5257177d5894306e8a336b21cbb
shared_preferences: 1feebfa37bb57264736e16865e7ffae7fc99b523
sharesdk_plugin: 1afa172841a590314b6ecd37eee084dfbd18f725
SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40
tencent_live_fluttify: 98821d3233cf13a47eadf1555ebd56b050e0a5ca
tobias: b77cace96409ab4a1710403cd362bf6a9dd9c685
TOCropViewController: 2a1ae1242600b1f2d996fd91a5268b2309a33b5c
TXLiteAVSDK_Professional: 43ca7a2f8ad118c052162d961c8c02cd763d8467
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
video_thumbnail: c4e2a3c539e247d4de13cd545344fd2d26ffafd1
wakelock: 0d4a70faf8950410735e3f61fb15d517c8a6efc4
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa
PODFILE CHECKSUM: 7adbc9d59f05e1b01f554ea99b6c79e97f2214a2
COCOAPODS: 1.9.3

@ -277,17 +277,24 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/DKImagePickerController/DKImagePickerController.framework",
"${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework",
"${PODS_ROOT}/../Flutter/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/LBXScan/LBXScan.framework",
"${BUILT_PRODUCTS_DIR}/LBXZBarSDK/LBXZBarSDK.framework",
"${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework",
"${BUILT_PRODUCTS_DIR}/Meiqia/Meiqia.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
"${BUILT_PRODUCTS_DIR}/SwiftyGif/SwiftyGif.framework",
"${BUILT_PRODUCTS_DIR}/TOCropViewController/TOCropViewController.framework",
"${BUILT_PRODUCTS_DIR}/camera/camera.framework",
"${BUILT_PRODUCTS_DIR}/file_picker/file_picker.framework",
"${BUILT_PRODUCTS_DIR}/flutter_image_compress/flutter_image_compress.framework",
"${BUILT_PRODUCTS_DIR}/flutter_qr_reader/flutter_qr_reader.framework",
"${BUILT_PRODUCTS_DIR}/image_cropper/image_cropper.framework",
"${BUILT_PRODUCTS_DIR}/image_gallery_saver/image_gallery_saver.framework",
"${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
"${BUILT_PRODUCTS_DIR}/meiqia_plugin/meiqia_plugin.framework",
"${PODS_ROOT}/mob_sharesdk/ShareSDK/Support/PlatformSDK/OasisSDK/OasisSDK.framework",
"${PODS_ROOT}/mob_sharesdk/ShareSDK/Support/PlatformSDK/SnapChat/SCSDKLoginKit.framework",
@ -299,22 +306,30 @@
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
"${BUILT_PRODUCTS_DIR}/video_player/video_player.framework",
"${BUILT_PRODUCTS_DIR}/video_thumbnail/video_thumbnail.framework",
"${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework",
"${BUILT_PRODUCTS_DIR}/webview_flutter/webview_flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKImagePickerController.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LBXScan.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LBXZBarSDK.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Meiqia.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyGif.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TOCropViewController.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/camera.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_image_compress.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_qr_reader.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_cropper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_gallery_saver.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/meiqia_plugin.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OasisSDK.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SCSDKLoginKit.framework",
@ -326,6 +341,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_thumbnail.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter.framework",
);
@ -341,6 +357,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
"${PODS_ROOT}/AMap3DMap-NO-IDFA/MAMapKit.framework/AMap.bundle",
"${PODS_ROOT}/AlipaySDK-iOS/AlipaySDK.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/mob_sharesdk/ShareSDK.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/mob_sharesdk/ShareSDK_JS_Douyin.bundle",
@ -357,6 +374,7 @@
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AMap.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AlipaySDK.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ShareSDK.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ShareSDK_JS_Douyin.bundle",
@ -476,7 +494,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
@ -610,7 +628,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
@ -645,7 +663,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",

@ -451,4 +451,7 @@ class LiveAPI {
///
static const String goodsList = '/v1/live/goods/list';
///
static const String liveList = '/v1/live/live/list';
}

@ -169,6 +169,11 @@ class _LiveStreamViewPageState extends State<LiveStreamViewPage> {
width: rSize(32),
height: rSize(32),
),
popChild: Image.asset(
R.ASSETS_LIVE_LIVE_LIKE_PNG,
width: rSize(32),
height: rSize(32),
),
),
SizedBox(width: rSize(10)),
Image.asset(

@ -0,0 +1,55 @@
class LiveListModel {
String title;
int id;
String cover;
String nickname;
String headImgUrl;
int look;
String goodsName;
String mainPhotoUrl;
int praise;
String originalPrice;
String discountPrice;
LiveListModel(
{this.title,
this.id,
this.cover,
this.nickname,
this.headImgUrl,
this.look,
this.goodsName,
this.mainPhotoUrl,
this.originalPrice,
this.discountPrice});
LiveListModel.fromJson(Map<String, dynamic> json) {
title = json['title'];
id = json['id'];
cover = json['cover'];
nickname = json['nickname'];
headImgUrl = json['headImgUrl'];
look = json['look'];
goodsName = json['goodsName'];
mainPhotoUrl = json['mainPhotoUrl'];
originalPrice = json['originalPrice'];
discountPrice = json['discountPrice'];
praise = json['praise'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
data['id'] = this.id;
data['cover'] = this.cover;
data['nickname'] = this.nickname;
data['headImgUrl'] = this.headImgUrl;
data['look'] = this.look;
data['goodsName'] = this.goodsName;
data['mainPhotoUrl'] = this.mainPhotoUrl;
data['originalPrice'] = this.originalPrice;
data['discountPrice'] = this.discountPrice;
data['praise'] = this.praise;
return data;
}
}

@ -5,9 +5,11 @@ import 'package:recook/manager/http_manager.dart';
import 'package:recook/manager/user_manager.dart';
import 'package:recook/pages/live/live_stream/live_stream_view_page.dart';
import 'package:recook/pages/live/models/follow_list_model.dart';
import 'package:recook/pages/live/models/live_list_model.dart';
import 'package:recook/pages/live/sub_page/user_attention_page.dart';
import 'package:recook/utils/custom_route.dart';
import 'package:recook/widgets/custom_image_button.dart';
import 'package:recook/widgets/refresh_widget.dart';
class LiveStreamPage extends StatefulWidget {
LiveStreamPage({Key key}) : super(key: key);
@ -19,6 +21,9 @@ class LiveStreamPage extends StatefulWidget {
class _LiveStreamPageState extends State<LiveStreamPage>
with AutomaticKeepAliveClientMixin {
List<FollowListModel> followListModels = [];
List<LiveListModel> _liveListModels = [];
int _livePage = 1;
GSRefreshController _liveListController = GSRefreshController();
@override
void initState() {
@ -131,28 +136,50 @@ class _LiveStreamPageState extends State<LiveStreamPage>
}
_buildLiveUsers() {
return GridView.builder(
padding: EdgeInsets.symmetric(
horizontal: rSize(16),
vertical: rSize(5),
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 165 / 249,
crossAxisSpacing: rSize(15),
mainAxisSpacing: rSize(15),
),
itemBuilder: (context, index) {
return _buildGridCard();
return RefreshWidget(
controller: _liveListController,
onRefresh: () {
_livePage = 1;
getLiveListModels().then((models) {
_liveListController.refreshCompleted();
setState(() {
_liveListModels = models;
});
});
},
onLoadMore: () {
_livePage++;
getLiveListModels().then((models) {
_liveListController.loadComplete();
setState(() {
_liveListModels.addAll(models);
});
});
},
itemCount: 20,
body: GridView.builder(
padding: EdgeInsets.symmetric(
horizontal: rSize(16),
vertical: rSize(5),
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 165 / 249,
crossAxisSpacing: rSize(15),
mainAxisSpacing: rSize(15),
),
itemBuilder: (context, index) {
return _buildGridCard(_liveListModels[index]);
},
itemCount: _liveListModels.length,
),
);
}
_buildGridCard() {
_buildGridCard(LiveListModel model) {
return ClipRRect(
borderRadius: BorderRadius.circular(rSize(10)),
child: CustomImageButton(
child: MaterialButton(
padding: EdgeInsets.zero,
onPressed: () => CRoute.push(
context,
LiveStreamViewPage(),
@ -164,12 +191,12 @@ class _LiveStreamPageState extends State<LiveStreamPage>
children: [
Stack(
children: [
AspectRatio(
aspectRatio: 1,
child: Container(
color: Colors.blueGrey,
child: Placeholder(),
),
FadeInImage.assetNetwork(
placeholder: R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,
image: Api.getImgUrl(model.cover),
fit: BoxFit.cover,
height: rSize(165),
width: rSize(165),
),
Positioned(
left: rSize(10),
@ -185,7 +212,7 @@ class _LiveStreamPageState extends State<LiveStreamPage>
children: [
Image.asset(R.ASSETS_LIVE_ON_STREAM_PNG),
Text(
'1234人观看',
'${model.look}人观看',
style: TextStyle(
color: Colors.white,
fontSize: rSP(10),
@ -208,7 +235,7 @@ class _LiveStreamPageState extends State<LiveStreamPage>
height: rSize(10),
),
Text(
'334',
model.praise.toString(),
style: TextStyle(
color: Colors.white,
fontSize: rSP(10),
@ -230,7 +257,7 @@ class _LiveStreamPageState extends State<LiveStreamPage>
children: [
Expanded(
child: Text(
'年中厨具福利专场年中厨具福利专场…',
model.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
@ -242,8 +269,16 @@ class _LiveStreamPageState extends State<LiveStreamPage>
),
Row(
children: [
CircleAvatar(
radius: rSize(10),
ClipRRect(
borderRadius:
BorderRadius.circular(rSize(10)),
child: FadeInImage.assetNetwork(
placeholder:
R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,
image: Api.getImgUrl(model.headImgUrl),
height: rSize(20),
width: rSize(20),
),
),
Expanded(
child: Padding(
@ -251,7 +286,7 @@ class _LiveStreamPageState extends State<LiveStreamPage>
horizontal: rSize(6),
),
child: Text(
'NAME NAME NAME',
model.nickname,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
@ -277,8 +312,12 @@ class _LiveStreamPageState extends State<LiveStreamPage>
AspectRatio(
aspectRatio: 1,
child: Container(
color: Colors.blue,
child: Placeholder(),
color: Color(0xFFE2DFDB),
child: FadeInImage.assetNetwork(
placeholder:
R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,
image: Api.getImgUrl(model.mainPhotoUrl),
),
),
),
Expanded(
@ -286,7 +325,7 @@ class _LiveStreamPageState extends State<LiveStreamPage>
alignment: Alignment.center,
color: Color(0xFFF7F7F7),
child: Text(
'¥244',
'¥${model.originalPrice}',
style: TextStyle(
color: Color(0xFF333333),
fontSize: rSP(10),
@ -323,6 +362,19 @@ class _LiveStreamPageState extends State<LiveStreamPage>
.toList();
}
Future<List<LiveListModel>> getLiveListModels() async {
ResultData resultData = await HttpManager.post(LiveAPI.liveList, {
'page': _livePage,
'limit': 15,
});
if (resultData?.data['data'] == null)
return [];
else
return (resultData?.data['data'] as List)
.map((e) => LiveListModel.fromJson(e))
.toList();
}
@override
bool get wantKeepAlive => true;
}

@ -55,7 +55,7 @@ class _UserActivityViewState extends State<UserActivityView>
);
}
Future<List> getActivityModels() async {
Future<List<ActivityListModel>> getActivityModels() async {
ResultData resultData = await HttpManager.post(LiveAPI.activityList, {
'userId': widget.id,
'page': _page,

@ -631,7 +631,7 @@ packages:
name: many_like
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1"
version: "0.0.2"
matcher:
dependency: transitive
description:

@ -189,7 +189,7 @@ dependencies:
video_trimmer: ^0.2.7
#点赞组件
many_like:
many_like: ^0.0.2
dev_dependencies:
flutter_test:

Loading…
Cancel
Save