Browse Source

ios,优化

dart3_last
fmk 2 years ago
parent
commit
a63a15f9e3
  1. BIN
      assets/image/2x/write_off_bg.webp
  2. BIN
      assets/image/3x/write_off_bg.webp
  3. BIN
      assets/image/write_off_bg.webp
  4. 10
      ios/Podfile
  5. 8
      ios/Podfile.lock
  6. 6
      ios/Runner.xcodeproj/project.pbxproj
  7. 1
      lib/community/community_child_page.dart
  8. 11
      lib/community/community_details.dart
  9. 1
      lib/community/community_page.dart
  10. 6
      lib/community/community_view/class_details_video.dart
  11. 2
      lib/community/community_view/home_class.dart
  12. 2
      lib/community/new_community_details.dart
  13. 4
      lib/home/home_page.dart
  14. 2
      lib/main.dart
  15. 251
      lib/mine/vip_pay_code.dart
  16. 715
      lib/order/write_off_page.dart
  17. 3
      lib/retrofit/data/user_info.dart
  18. 2
      lib/retrofit/min_api.dart
  19. 4
      lib/retrofit/retrofit_api.dart
  20. 2
      lib/retrofit/retrofit_api.g.dart
  21. 16
      lib/view_widget/mine_vip_entry.dart
  22. 4
      lib/view_widget/my_appbar.dart
  23. 5
      lib/vip/vip_view/vip_top.dart
  24. 2
      lib/web/web_page.dart
  25. 7
      lib/web/web_view/input_comment.dart
  26. 7
      pubspec.lock

BIN
assets/image/2x/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/image/3x/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
assets/image/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

10
ios/Podfile

@ -33,8 +33,18 @@ target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end end
#post_install do |installer|
# installer.pods_project.targets.each do |target|
# flutter_additional_ios_build_settings(target)
# end
#end
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end end
end end

8
ios/Podfile.lock

@ -22,6 +22,8 @@ PODS:
- BaiduMapKit/Utils (6.5.1): - BaiduMapKit/Utils (6.5.1):
- BaiduMapKit/Base - BaiduMapKit/Base
- BMKLocationKit (2.0.4) - BMKLocationKit (2.0.4)
- emoji_picker_flutter (0.0.1):
- Flutter
- Flutter (1.0.0) - Flutter (1.0.0)
- flutter_baidu_mapapi_base (3.1.0): - flutter_baidu_mapapi_base (3.1.0):
- BaiduMapKit/Utils (= 6.5.1) - BaiduMapKit/Utils (= 6.5.1)
@ -238,6 +240,7 @@ PODS:
- SDWebImage - SDWebImage
DEPENDENCIES: DEPENDENCIES:
- emoji_picker_flutter (from `.symlinks/plugins/emoji_picker_flutter/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_baidu_mapapi_base (from `.symlinks/plugins/flutter_baidu_mapapi_base/ios`) - flutter_baidu_mapapi_base (from `.symlinks/plugins/flutter_baidu_mapapi_base/ios`)
- flutter_baidu_mapapi_map (from `.symlinks/plugins/flutter_baidu_mapapi_map/ios`) - flutter_baidu_mapapi_map (from `.symlinks/plugins/flutter_baidu_mapapi_map/ios`)
@ -276,6 +279,8 @@ SPEC REPOS:
- ZLPhotoBrowser-objc - ZLPhotoBrowser-objc
EXTERNAL SOURCES: EXTERNAL SOURCES:
emoji_picker_flutter:
:path: ".symlinks/plugins/emoji_picker_flutter/ios"
Flutter: Flutter:
:path: Flutter :path: Flutter
flutter_baidu_mapapi_base: flutter_baidu_mapapi_base:
@ -325,6 +330,7 @@ SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
BaiduMapKit: f227cfb43581e91466fb4f1344f655eab5788777 BaiduMapKit: f227cfb43581e91466fb4f1344f655eab5788777
BMKLocationKit: 688d8e1194980b96fc9a6585c0eb42e62fbaf780 BMKLocationKit: 688d8e1194980b96fc9a6585c0eb42e62fbaf780
emoji_picker_flutter: df19dac03a2b39ac667dc8d1da939ef3a9e21347
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_baidu_mapapi_base: cb406be78c3a949fb58a45dc6627f139d580bd37 flutter_baidu_mapapi_base: cb406be78c3a949fb58a45dc6627f139d580bd37
flutter_baidu_mapapi_map: 81c4e6e93dc668e311d9b521421deaf292390434 flutter_baidu_mapapi_map: 81c4e6e93dc668e311d9b521421deaf292390434
@ -355,6 +361,6 @@ SPEC CHECKSUMS:
webview_flutter: 5fb4def2bbd4339889ee14d045b605cefc5bc232 webview_flutter: 5fb4def2bbd4339889ee14d045b605cefc5bc232
ZLPhotoBrowser-objc: c7657d3bc85ae231884e058d0e3638f619164736 ZLPhotoBrowser-objc: c7657d3bc85ae231884e058d0e3638f619164736
PODFILE CHECKSUM: 27a0f08c504497d82c425d2ccb28d9958a6e156a PODFILE CHECKSUM: 9a26c1c4037e42be4afc95d70f8bd02a4b989a1c
COCOAPODS: 1.11.3 COCOAPODS: 1.11.3

6
ios/Runner.xcodeproj/project.pbxproj

@ -667,7 +667,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 3.2.1; MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -869,7 +869,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 3.2.1; MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -962,7 +962,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 3.2.1; MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",

1
lib/community/community_child_page.dart

@ -214,7 +214,6 @@ class CommunityChildPageState extends State<CommunityChildPage>
}); });
setState(() {}); setState(() {});
// Navigator.of(context).pushNamed( '/router/eom');
}, },
); );
}, },

11
lib/community/community_details.dart

@ -17,8 +17,6 @@ import 'package:huixiang/web/web_view/comment_list.dart';
import 'package:huixiang/web/web_view/input_comment.dart'; import 'package:huixiang/web/web_view/input_comment.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../web/web_view/input_comment_o.dart';
class CommunityDetails extends StatefulWidget { class CommunityDetails extends StatefulWidget {
final Map<String, dynamic> arguments; final Map<String, dynamic> arguments;
@ -60,7 +58,7 @@ class _CommunityDetails extends State<CommunityDetails>
void didChangeMetrics() { void didChangeMetrics() {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
// isKeyBoardShow = MediaQuery.of(context).viewInsets.bottom > 0; isKeyBoardShow = MediaQuery.of(context).viewInsets.bottom > 0;
if (!mounted) return; if (!mounted) return;
if (MediaQuery.of(context).viewInsets.bottom == 0) { if (MediaQuery.of(context).viewInsets.bottom == 0) {
if (isKeyBoardShow) { if (isKeyBoardShow) {
@ -108,7 +106,7 @@ class _CommunityDetails extends State<CommunityDetails>
void _focusNodeListener() { void _focusNodeListener() {
/*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){ /*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){
setState(() { setState(() {
smileyPadGone = true; emojiShowing = false;
}); });
}*/ }*/
} }
@ -161,9 +159,9 @@ class _CommunityDetails extends State<CommunityDetails>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double h = MediaQuery.of(context).viewInsets.bottom; double h = MediaQuery.of(context).viewInsets.bottom;
if(h > 0 && keyboard <= 0) { if(h > 0 && keyboard < h) {
keyboard = h;
setState(() { setState(() {
keyboard = h;
}); });
} }
return GestureDetector( return GestureDetector(
@ -176,6 +174,7 @@ class _CommunityDetails extends State<CommunityDetails>
}); });
}, },
child: Scaffold( child: Scaffold(
// resizeToAvoidBottomInset: false,
appBar: MyAppBar( appBar: MyAppBar(
title: S.of(context).dongtaixiangqing, title: S.of(context).dongtaixiangqing,
titleColor: Colors.black, titleColor: Colors.black,

1
lib/community/community_page.dart

@ -79,6 +79,7 @@ class _CommunityPage extends State<CommunityPage>
return Scaffold( return Scaffold(
appBar: MyAppBar( appBar: MyAppBar(
leading: false, leading: false,
centerTitle: true,
titleChild: PreferredSize( titleChild: PreferredSize(
preferredSize: Size( preferredSize: Size(
MediaQuery.of(context).size.width - 60.w, MediaQuery.of(context).size.width - 60.w,

6
lib/community/community_view/class_details_video.dart

@ -139,7 +139,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
color: Colors.black, color: Colors.black,
width: width, width: width,
height:MediaQuery.of(context).size.width / 1.5, height:MediaQuery.of(context).size.width / 1.5,
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
child: chewies = Chewie( child: chewies = Chewie(
controller: chewieAudioController, controller: chewieAudioController,
), ),
@ -147,7 +147,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
: Container( : Container(
width: width, width: width,
height:MediaQuery.of(context).size.width / 1.5, height:MediaQuery.of(context).size.width / 1.5,
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
)), )),
if (widget.isShowImg) if (widget.isShowImg)
GestureDetector( GestureDetector(
@ -161,7 +161,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
child: Container( child: Container(
width: width, width: width,
height: MediaQuery.of(context).size.width / 1.5, height: MediaQuery.of(context).size.width / 1.5,
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
color: Colors.black, color: Colors.black,
child: Stack( child: Stack(
children: [ children: [

2
lib/community/community_view/home_class.dart

@ -67,7 +67,7 @@ class _HomeClass extends State<HomeClass> {
), ),
), ),
Container( Container(
height: 195, height: 195.h,
margin: EdgeInsets.only(top: 10.h), margin: EdgeInsets.only(top: 10.h),
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,

2
lib/community/new_community_details.dart

@ -175,7 +175,7 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double h = MediaQuery.of(context).viewInsets.bottom; double h = MediaQuery.of(context).viewInsets.bottom;
if(h > 0 && keyboard <= 0) { if(h > 0 && keyboard <h) {
setState(() { setState(() {
keyboard = h; keyboard = h;
}); });

4
lib/home/home_page.dart

@ -111,10 +111,12 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
/// ///
posterShowAlertDialog(ActivityPos activityPos) { posterShowAlertDialog(ActivityPos activityPos) {
var today = DateTime.now().day;
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
if((value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};")) if(value.getInt("today")==today && (value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};"))
return; return;
value.setString("ActivityPosCode", "${(value.getString("ActivityPosCode")??"")}${activityPos.code}_${value.getString("userId")};"); value.setString("ActivityPosCode", "${(value.getString("ActivityPosCode")??"")}${activityPos.code}_${value.getString("userId")};");
value.setInt("today", today);
// //
showDialog( showDialog(
context: context, context: context,

2
lib/main.dart

@ -199,7 +199,7 @@ class MyApp extends StatelessWidget {
} else if (locales[0].countryCode == "CN"){ } else if (locales[0].countryCode == "CN"){
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH'); locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
} else{ } else{
locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'US'); locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'CH');
} }
return appLocale ?? locale; return appLocale ?? locale;
}, },

251
lib/mine/vip_pay_code.dart

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'package:barcode_widget/barcode_widget.dart'; import 'package:barcode_widget/barcode_widget.dart';
@ -39,7 +40,6 @@ class _VipPayCode extends State<VipPayCode> {
void dispose() { void dispose() {
super.dispose(); super.dispose();
refreshController.dispose(); refreshController.dispose();
Location.getInstance().stopLocation();
} }
@override @override
@ -51,6 +51,8 @@ class _VipPayCode extends State<VipPayCode> {
UserInfo userInfo; UserInfo userInfo;
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
bool vipCodeText = false; bool vipCodeText = false;
Timer _timer;
bool isDispose = false;
/// ///
queryUser() async { queryUser() async {
@ -67,185 +69,122 @@ class _VipPayCode extends State<VipPayCode> {
refreshController.refreshFailed();}); refreshController.refreshFailed();});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data; userInfo = baseData.data;
SharedPreferences.getInstance().then((value) => {
value.setString('user', jsonEncode(baseData.data)),
});
setState(() {}); setState(() {});
SharedPreferences.getInstance().then((value) => {
value.setString('user', jsonEncode(baseData.data)),
});
refreshController.refreshCompleted(); refreshController.refreshCompleted();
}else{ }else{
refreshController.refreshFailed(); refreshController.refreshFailed();
} }
}finally{ }finally{
setState((){}); refreshCode();
} }
} }
refreshCode(){
if (_timer != null) return;
const oneSec = const Duration(minutes: 2);
var callback = ((timer) {
if (isDispose) return;
queryUser();
});
_timer = Timer.periodic(oneSec, callback);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppBar( appBar: MyAppBar(
title: "会员码", title: "会员码",
background: Colors.white, background: Color(0xFF32A060),
titleColor: Colors.black, titleColor: Colors.white,
brightness: Brightness.dark, brightness: Brightness.dark,
leadingColor: Colors.black, leadingColor: Colors.white,
), ),
body: SmartRefresher( body: Container(
controller: refreshController, color: Color(0xFF32A060),
enablePullDown: true, height: double.infinity,
enablePullUp: false, padding: EdgeInsets.only(top: 45.h),
header: MyHeader(), child: Stack(
physics: BouncingScrollPhysics(), alignment: Alignment.topCenter,
onRefresh: () { children: [
queryUser(); Container(
}, color: Color(0xFF32A060),
child: SingleChildScrollView( // height: 485.h,
child: Container( padding: EdgeInsets.only(top: 47.h),
color: Colors.white, child: Container(
padding: EdgeInsets.only(top: 45.h), height: 438.h,
child: Stack( width: double.infinity,
alignment: Alignment.topCenter, decoration: BoxDecoration(
children: [ color: Colors.white,
Container( boxShadow: [
padding: EdgeInsets.only(top: 50.h), BoxShadow(
child: Container( color: Colors.black.withAlpha(12),
width: double.infinity, offset: Offset(0, 2),
margin: EdgeInsets.symmetric(horizontal: 14.w), blurRadius: 14,
padding: EdgeInsets.only(top: 68.h, bottom: 16.h), spreadRadius: 0,
decoration: BoxDecoration(
color: Color(0xFF32A060),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
),
],
borderRadius: BorderRadius.circular(6),
), ),
child: Container( ],
width: double.infinity, borderRadius: BorderRadius.circular(6),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
),
],
borderRadius: BorderRadius.circular(6),
),
margin: EdgeInsets.symmetric(horizontal: 16.w),
padding: EdgeInsets.only(
top: 46.h, left:16.w, right: 15.w, bottom: 79.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: (){
setState(() {
vipCodeText = !vipCodeText;
});
},
child:
vipCodeText ? Text(
userInfo != null
? "${(userInfo?.vipNo ?? "").substring(0, 4)} "
"${(userInfo?.vipNo ?? "").substring(4, 8)} "
"${(userInfo?.vipNo ?? "").substring(8, 12)} "
"${(userInfo?.vipNo ?? "").substring(12, 16)} "
"${(userInfo?.vipNo ?? "").substring(16, (userInfo?.vipNo ?? "").length)}"
: "",
style: TextStyle(
fontSize: 14.sp,
wordSpacing: userInfo == null
? 10
: (MediaQuery.of(context).size.width - 64.w) /
((((userInfo?.vipNo ?? "")
.length) *
4)),
letterSpacing: userInfo == null
? 8
: (MediaQuery.of(context).size.width - 64.w) /
((((userInfo?.vipNo ?? "")
.length) *
4)),
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF353535),
),
)
:Text(
"轻触可查看会员码数字",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 13.sp,
color: Color(0xFFCACACA),
),
),
),
SizedBox(
height: 12.h,
),
BarcodeWidget(
barcode: Barcode.code128(useCode128C: true),
data:
userInfo != null ? userInfo?.vipNo : "",
height: 72.h,
color: Colors.black,
drawText: false,
),
SizedBox(
height: 16.h,
),
QrImage(
data: userInfo != null
? (userInfo?.vipNo ?? "")
: "",
version: QrVersions.auto,
size: 200.w,
gapless: true,
),
],
),
),
),
), ),
Container( margin: EdgeInsets.symmetric(horizontal: 16.w,),
decoration: BoxDecoration( child: Column(
borderRadius: BorderRadius.circular(56), mainAxisAlignment: MainAxisAlignment.center,
color: Colors.white, crossAxisAlignment: CrossAxisAlignment.center,
border: Border.all( children: [
color: Colors.white, SizedBox(height: 46.h,),
width: 8.w, Text(
), "请保持屏幕常亮,并对准扫码盒或枪口",
), style: TextStyle(
child: Container( fontWeight: MyFontWeight.regular,
decoration: BoxDecoration( fontSize: 12.sp,
borderRadius: BorderRadius.circular(56), color: Color(0xFF4D4D4D),
color: Colors.white,
border: Border.all(
color: Color(0xFF32A060),
width: 2.w,
), ),
), ),
child: MImage( SizedBox(height: 30.h,),
userInfo?.headimg ?? "", QrImage(
width: 80, data: userInfo != null
height: 80, ? (userInfo?.vipScanNo ?? "")
radius: BorderRadius.circular(56), : "",
fit: BoxFit.cover, version: QrVersions.auto,
errorSrc: "assets/image/default_1.webp", size: 200.w,
fadeSrc: "assets/image/default_1.webp", gapless: true,
), ),
],
),
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(56),
color: Color(0xFF32A060),
border: Border.all(
color: Color(0xFF32A060),
width: 8.w,
),
),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(56),
color: Colors.white,
border: Border.all(
color: Colors.white,
width: 2.w,
), ),
), ),
], child: MImage(
userInfo?.headimg ?? "",
width: 80,
height: 80,
radius: BorderRadius.circular(56),
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
),
), ),
), ],
), ),
), ),
); );

715
lib/order/write_off_page.dart

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:barcode_widget/barcode_widget.dart'; import 'package:barcode_widget/barcode_widget.dart';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
@ -13,9 +14,13 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/separator.dart'; import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:qr_flutter/qr_flutter.dart'; import 'package:qr_flutter/qr_flutter.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../view_widget/classic_header.dart';
import '../view_widget/my_footer.dart';
class WriteOffPage extends StatefulWidget { class WriteOffPage extends StatefulWidget {
final arguments; final arguments;
@ -31,6 +36,7 @@ class _WriteOffPage extends State<WriteOffPage> {
dynamic coupon; dynamic coupon;
ApiService apiService; ApiService apiService;
CouponDetail queryCoupon; CouponDetail queryCoupon;
final RefreshController refreshController = RefreshController();
@override @override
void initState() { void initState() {
@ -79,248 +85,495 @@ class _WriteOffPage extends State<WriteOffPage> {
background: Color(0xFF32A060), background: Color(0xFF32A060),
leadingColor: Colors.white, leadingColor: Colors.white,
), ),
body: Container( body: SmartRefresher(
alignment: Alignment.topCenter, controller: refreshController,
child: Stack( enablePullDown: false,
alignment: Alignment.topCenter, enablePullUp: false,
children: [ header: MyHeader(),
Image.asset( footer: CustomFooter(
"assets/image/icon_write_off_bg.webp", builder: (context, mode) {
width: MediaQuery.of(context).size.width * 0.912, return MyFooter(mode);
fit: BoxFit.fill, },
), ),
LayoutBuilder(builder: (context, constraints) { physics: BouncingScrollPhysics(),
return Container( scrollController: ScrollController(),
width: constraints.constrainWidth() * 0.912, child: Container(
child: Column( child: SingleChildScrollView(
children: [ physics: BouncingScrollPhysics(),
Expanded( child: Column(
child: Container( children: [
child: Column( Container(
children: [ alignment: Alignment.topCenter,
Text( height: 530.h,
coupon != null ? coupon["couponName"] : "", child: Stack(
style: TextStyle( alignment: Alignment.topCenter,
fontSize: 16.sp, children: [
fontWeight: FontWeight.bold, Image.asset(
color: Color(0xFF353535)), "assets/image/write_off_bg.webp",
), width: MediaQuery.of(context).size.width * 0.912,
SizedBox( height: 540.h,
height: 8.h, fit: BoxFit.fill,
),
Text(
(coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
"${coupon["useStartTime"].replaceAll("-", ".").split(" ")[0]}-${coupon["useEndTime"].replaceAll("-", ".").split(" ")[0]}"),
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
),
),
],
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
),
alignment: Alignment.center,
),
flex: 6,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: MySeparator(
width: 5.w,
height: 1.h,
color: Color(0xFFA29E9E),
), ),
), LayoutBuilder(builder: (context, constraints) {
Expanded( return Container(
child: Container( alignment: Alignment.center,
alignment: Alignment.center, width: constraints.constrainWidth() * 0.912,
child: Column( padding:EdgeInsets.only(top: 24.h),
mainAxisAlignment: MainAxisAlignment.center, child: Column(
crossAxisAlignment: CrossAxisAlignment.center, children: [
children: [ Container(
Text( child: Column(
coupon != null children: [
? "${coupon["memberCouponId"].substring(0, 4)} " Text(
"${coupon["memberCouponId"].substring(4, 8)} " coupon != null ? coupon["couponName"] : "",
"${coupon["memberCouponId"].substring(8, 12)} " style: TextStyle(
"${coupon["memberCouponId"].substring(12, 16)} " fontSize: 16.sp,
"${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}" fontWeight: FontWeight.bold,
: "", color: Color(0xFF353535)),
style: TextStyle( ),
fontSize: 14.sp, SizedBox(
wordSpacing: coupon == null height:11.h,
? 10 ),
: (MediaQuery.of(context).size.width - Text(
64.w) / (coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
(((coupon["memberCouponId"].length) * 4)), "${coupon["useStartTime"].replaceAll("-", ".").split(" ")[0]}-${coupon["useEndTime"].replaceAll("-", ".").split(" ")[0]}"),
letterSpacing: coupon == null style: TextStyle(
? 8 fontSize: 12.sp,
: (MediaQuery.of(context).size.width - color: Color(0xFF353535),
64.w) / ),
(((coupon["memberCouponId"].length) * 4)), ),
fontWeight: MyFontWeight.semi_bold, ],
color: Color(0xFF353535), mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
),
alignment: Alignment.center,
), ),
), Container(
SizedBox( margin: EdgeInsets.only(left: 20.w, right: 20.w,top:16.h,bottom:30.h),
height: 12.h, child: MySeparator(
), width: 5.w,
BarcodeWidget( height: 1.h,
barcode: Barcode.code128(useCode128C: true), color: Color(0xFFA29E9E),
data: coupon != null ? coupon["memberCouponId"] : "",
height: 72.h,
color: Colors.black,
drawText: false,
),
SizedBox(
height: 16.h,
),
Expanded(child: QrImage(
data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
version: QrVersions.auto,
size: 200.w,
gapless: true,
),),
SizedBox(
height: 35.h,
),
],
),
margin: EdgeInsets.symmetric(horizontal: 20.w),
),
flex: 27,
),
Container(
child: MySeparator(
width: 5.w,
height: 1.h,
color: Color(0xFFA29E9E),
),
margin: EdgeInsets.only(left: 20.w, right: 20.w),
),
Expanded(
child: Container(
padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 15.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 3.w,
height: 15.h,
margin:
EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3),
color: Color(0xFF20662A),
),
), ),
Text( ),
S.of(context).shiyongtiaojian, Expanded(
style: TextStyle( child: Container(
fontWeight: FontWeight.bold, alignment: Alignment.center,
fontSize: 14.sp, child: Column(
color: Color(0xFF353535), mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
coupon != null
? "${coupon["memberCouponId"].substring(0, 4)} "
"${coupon["memberCouponId"].substring(4, 8)} "
"${coupon["memberCouponId"].substring(8, 12)} "
"${coupon["memberCouponId"].substring(12, 16)} "
"${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}"
: "",
style: TextStyle(
fontSize: 14.sp,
wordSpacing: coupon == null
? 10
: (MediaQuery.of(context).size.width -
64.w) /
(((coupon["memberCouponId"].length) * 4)),
letterSpacing: coupon == null
? 8
: (MediaQuery.of(context).size.width -
64.w) /
(((coupon["memberCouponId"].length) * 4)),
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF353535),
),
),
SizedBox(
height: 15.h,
),
BarcodeWidget(
barcode: Barcode.code128(useCode128C: true),
data: coupon != null ? coupon["memberCouponId"] : "",
height: 72.h,
color: Colors.black,
drawText: false,
),
SizedBox(
height: 16.h,
),
Expanded(child: QrImage(
data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
version: QrVersions.auto,
size: 200.w,
gapless: true,
),),
SizedBox(
height: 35.h,
),
],
), ),
margin: EdgeInsets.symmetric(horizontal: 20.w),
), ),
], flex: 27,
), ),
Row( Container(
mainAxisAlignment: MainAxisAlignment.start, child: MySeparator(
crossAxisAlignment: CrossAxisAlignment.center, width: 5.w,
children: [ height: 1.h,
SizedBox( color: Color(0xFFA29E9E),
width: 11.w,
),
Expanded(
child: Text(
S
.of(context)
.qianwanghuixiangmendianduihuanhexiao,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14.sp,
color: Color(0xFF353535)),
),
flex: 1,
), ),
], margin: EdgeInsets.only(left: 20.w, right: 20.w,bottom:20.h),
),
],
),
);
}),
//
// LayoutBuilder(builder: (context, constraints) {
// return Container(
// width: constraints.constrainWidth() * 0.912,
// child: Column(
// children: [
// Expanded(
// child: Container(
// child: Column(
// children: [
// Text(
// coupon != null ? coupon["couponName"] : "",
// style: TextStyle(
// fontSize: 16.sp,
// fontWeight: FontWeight.bold,
// color: Color(0xFF353535)),
// ),
// SizedBox(
// height: 8.h,
// ),
// Text(
// (coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
// "${coupon["useStartTime"].replaceAll("-", ".").split(" ")[0]}-${coupon["useEndTime"].replaceAll("-", ".").split(" ")[0]}"),
// style: TextStyle(
// fontSize: 12.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// ),
// alignment: Alignment.center,
// ),
// flex: 6,
// ),
// Container(
// margin: EdgeInsets.only(left: 20.w, right: 20.w),
// child: MySeparator(
// width: 5.w,
// height: 1.h,
// color: Color(0xFFA29E9E),
// ),
// ),
// Expanded(
// child: Container(
// alignment: Alignment.center,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(height: 5.h,),
// Text(
// coupon != null
// ? "${coupon["memberCouponId"].substring(0, 4)} "
// "${coupon["memberCouponId"].substring(4, 8)} "
// "${coupon["memberCouponId"].substring(8, 12)} "
// "${coupon["memberCouponId"].substring(12, 16)} "
// "${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}"
// : "",
// style: TextStyle(
// fontSize: 14.sp,
// wordSpacing: coupon == null
// ? 10
// : (MediaQuery.of(context).size.width -
// 64.w) /
// (((coupon["memberCouponId"].length) * 4)),
// letterSpacing: coupon == null
// ? 8
// : (MediaQuery.of(context).size.width -
// 64.w) /
// (((coupon["memberCouponId"].length) * 4)),
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFF353535),
// ),
// ),
// SizedBox(
// height: 12.h,
// ),
// BarcodeWidget(
// barcode: Barcode.code128(useCode128C: true),
// data: coupon != null ? coupon["memberCouponId"] : "",
// height: 72.h,
// color: Colors.black,
// drawText: false,
// ),
// SizedBox(
// height: 16.h,
// ),
// Expanded(child: QrImage(
// data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
// version: QrVersions.auto,
// size: 200.w,
// gapless: true,
// ),),
// SizedBox(
// height: 35.h,
// ),
// ],
// ),
// margin: EdgeInsets.symmetric(horizontal: 20.w),
// ),
// flex: 27,
// ),
// Container(
// child: MySeparator(
// width: 5.w,
// height: 1.h,
// color: Color(0xFFA29E9E),
// ),
// margin: EdgeInsets.only(left: 20.w, right: 20.w),
// ),
// Expanded(
// child: Container(
// padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 15.h),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Container(
// width: 3.w,
// height: 15.h,
// margin:
// EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(3),
// color: Color(0xFF20662A),
// ),
// ),
// Text(
// S.of(context).shiyongtiaojian,
// style: TextStyle(
// fontWeight: FontWeight.bold,
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(
// width: 11.w,
// ),
// Expanded(
// child: Text(
// S
// .of(context)
// .qianwanghuixiangmendianduihuanhexiao,
// style: TextStyle(
// textBaseline: TextBaseline.alphabetic,
// fontSize: 14.sp,
// color: Color(0xFF353535)),
// ),
// flex: 1,
// ),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Container(
// width: 3.w,
// height: 15.h,
// margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(3),
// color: Color(0xFF20662A),
// ),
// ),
// Text(
// S.of(context).shiyongshuoming,
// style: TextStyle(
// fontWeight: FontWeight.bold,
// fontSize: 14.sp,
// color: Color(0xFF353535)),
// ),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(
// width: 11.w,
// ),
// Text(
// S.of(context).zitiduihuanquan,
// style: TextStyle(
// textBaseline: TextBaseline.alphabetic,
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(
// width: 11.w,
// ),
// Text(
// S.of(context).huixiangrenyimendian,
// style: TextStyle(
// textBaseline: TextBaseline.alphabetic,
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// ),
// ],
// ),
// ),
// flex: 13,
// ),
// Expanded(
// child: Container(),
// flex: 3,
// ),
// ],
// ),
// );
// })
],
),
),
Container(
width: MediaQuery.of(context).size.width * 0.912,
padding: EdgeInsets.only(left:18.w, bottom:15.h, right:18.w),
margin:EdgeInsets.only(bottom: 21.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(6),
bottomRight: Radius.circular(6),),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 3,
spreadRadius: 0,
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 3.w,
height: 15.h,
margin:
EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3),
color: Color(0xFF20662A),
), ),
Row( ),
mainAxisAlignment: MainAxisAlignment.start, Text(
crossAxisAlignment: CrossAxisAlignment.center, S.of(context).shiyongtiaojian,
children: [ style: TextStyle(
Container( fontWeight: FontWeight.bold,
width: 3.w, fontSize: 14.sp,
height: 15.h, color: Color(0xFF353535),
margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3),
color: Color(0xFF20662A),
),
),
Text(
S.of(context).shiyongshuoming,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF353535)),
),
],
), ),
Row( ),
mainAxisAlignment: MainAxisAlignment.start, ],
crossAxisAlignment: CrossAxisAlignment.center, ),
children: [ SizedBox(height:12.h,),
SizedBox( Row(
width: 11.w, mainAxisAlignment: MainAxisAlignment.start,
), crossAxisAlignment: CrossAxisAlignment.center,
Text( children: [
S.of(context).zitiduihuanquan, SizedBox(
style: TextStyle( width: 11.w,
textBaseline: TextBaseline.alphabetic, ),
fontSize: 14.sp, Expanded(
color: Color(0xFF353535), child: Text(
), S
), .of(context)
], .qianwanghuixiangmendianduihuanhexiao,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14.sp,
height: 1.5.h,
color: Color(0xFF353535)),
), ),
Row( flex: 1,
mainAxisAlignment: MainAxisAlignment.start, ),
crossAxisAlignment: CrossAxisAlignment.center, ],
children: [ ),
SizedBox( SizedBox(height:16.h,),
width: 11.w, Row(
), mainAxisAlignment: MainAxisAlignment.start,
Text( crossAxisAlignment: CrossAxisAlignment.center,
S.of(context).huixiangrenyimendian, children: [
style: TextStyle( Container(
textBaseline: TextBaseline.alphabetic, width: 3.w,
fontSize: 14.sp, height: 15.h,
color: Color(0xFF353535), margin: EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
), decoration: BoxDecoration(
), borderRadius: BorderRadius.circular(3),
], color: Color(0xFF20662A),
), ),
], ),
), Text(
S.of(context).shiyongshuoming,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF353535)),
),
],
), ),
flex: 13, Container(
), child: Html(
Expanded( data:
child: Container(), coupon != null ? coupon["remark"] : "",
flex: 3, customImageRenders: {
), networkSourceMatcher(): networkImageRender(
], loadingWidget: () {
), return Container();
); },
}) ),
], },
),
)
],
),
)
],
),
),
), ),
), ),
); );

3
lib/retrofit/data/user_info.dart

@ -20,6 +20,7 @@ class UserInfo {
UserInfo(); UserInfo();
String vipNo; String vipNo;
String vipScanNo;
String nickname; String nickname;
String headimg; String headimg;
bool userType; bool userType;
@ -54,6 +55,7 @@ class UserInfo {
factory UserInfo.fromJson(Map<String, dynamic> json) => factory UserInfo.fromJson(Map<String, dynamic> json) =>
UserInfo() UserInfo()
..vipNo = json['vipNo'] as String ..vipNo = json['vipNo'] as String
..vipScanNo =json['vipScanNo'] as String
..nickname = json['nickname'] as String ..nickname = json['nickname'] as String
..headimg = json['headimg'] as String ..headimg = json['headimg'] as String
..userType = json['userType'] as bool ..userType = json['userType'] as bool
@ -87,6 +89,7 @@ class UserInfo {
Map<String, dynamic> toJson() => <String, dynamic>{ Map<String, dynamic> toJson() => <String, dynamic>{
'vipNo': this.vipNo, 'vipNo': this.vipNo,
'vipScanNo':this.vipScanNo,
'nickname': this.nickname, 'nickname': this.nickname,
'headimg': this.headimg, 'headimg': this.headimg,
'userType': this.userType, 'userType': this.userType,

2
lib/retrofit/min_api.dart

@ -26,7 +26,7 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8765/app/";/// const localBaseUrl = "http://192.168.10.129:8765/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";/// // const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

4
lib/retrofit/retrofit_api.dart

@ -64,7 +64,7 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8766/app/";/// const localBaseUrl = "http://192.168.10.129:8766/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";/// // const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线
@ -497,7 +497,7 @@ abstract class ApiService {
Future<BaseData> wiped(@Path("memberCouponId") String memberCouponId); Future<BaseData> wiped(@Path("memberCouponId") String memberCouponId);
/// ///
@GET("/coupon/detail/") @GET("/coupon/detail/{memberCouponId}")
Future<BaseData<CouponDetail>> couponDetail(@Path("") String memberCouponId); Future<BaseData<CouponDetail>> couponDetail(@Path("") String memberCouponId);
/// ///

2
lib/retrofit/retrofit_api.g.dart

@ -1862,7 +1862,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('coupon/detail/', final _result = await _dio.request<Map<String, dynamic>>('coupon/detail/$memberCouponId',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',

16
lib/view_widget/mine_vip_entry.dart

@ -81,10 +81,13 @@ class MineVipEntry extends StatelessWidget {
} }
Widget widget = Container( Widget widget = Container(
height:20.h,
width: double.infinity,
child: Row( child: Row(
children: [ children: [
Container( Container(
padding: EdgeInsets.symmetric(horizontal:4.w,vertical: 3.h), height: double.infinity,
padding: EdgeInsets.symmetric(horizontal:3.w,vertical:4.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: logoColor, color: logoColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -102,12 +105,13 @@ class MineVipEntry extends StatelessWidget {
child: Image.asset( child: Image.asset(
"assets/image/mine_vip_logo.webp", "assets/image/mine_vip_logo.webp",
fit: BoxFit.cover, fit: BoxFit.cover,
width: 13.w, // width: 13.w,
height: 11.h, // height: 11.h,
), ),
), ),
Container( Container(
padding: EdgeInsets.symmetric(horizontal:2.w,vertical:3.h), height: double.infinity,
padding: EdgeInsets.symmetric(horizontal:3.w,vertical:3.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: levelTextBackdrop, color: levelTextBackdrop,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -136,8 +140,8 @@ class MineVipEntry extends StatelessWidget {
Image.asset( Image.asset(
"assets/image/icon_right.webp", "assets/image/icon_right.webp",
fit: BoxFit.cover, fit: BoxFit.cover,
width: 8.w, width: 8,
height: 8.h, height: 8,
color: levelTextColor, color: levelTextColor,
), ),
], ],

4
lib/view_widget/my_appbar.dart

@ -16,6 +16,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final Size preferredSize; final Size preferredSize;
final double toolbarHeight; final double toolbarHeight;
final bool leading; final bool leading;
final bool centerTitle;
final Brightness brightness; final Brightness brightness;
final Function exit; final Function exit;
@ -34,6 +35,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
this.titleSize = 18, this.titleSize = 18,
this.brightness = Brightness.light, this.brightness = Brightness.light,
this.leading = true, this.leading = true,
this.centerTitle = false,
this.exit this.exit
}) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight), }) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight),
super(key: key) { super(key: key) {
@ -79,7 +81,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
) )
: Container(), : Container(),
titleSpacing: 2, titleSpacing: 2,
centerTitle: false, centerTitle: centerTitle,
leadingWidth: leading ? 56 : 10.w, leadingWidth: leading ? 56 : 10.w,
title: ((title == null || title == "") && titleChild != null) title: ((title == null || title == "") && titleChild != null)
? titleChild ? titleChild

5
lib/vip/vip_view/vip_top.dart

@ -717,8 +717,7 @@ class _VipTop extends State<VipTop> {
topLeft: const Radius.circular(8.0), topLeft: const Radius.circular(8.0),
topRight: const Radius.circular(8.0))), topRight: const Radius.circular(8.0))),
child: Container( child: Container(
// height: 230.h, height: 230.h,
height: 160.h,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -800,8 +799,6 @@ class _VipTop extends State<VipTop> {
), ),
), ),
), ),
if (widget?.vipCardHome?.cards[selectIndex]?.autoSubscribe ??
false)
GestureDetector( GestureDetector(
onTap: () { onTap: () {
state(() { state(() {

2
lib/web/web_page.dart

@ -265,7 +265,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double h = MediaQuery.of(context).viewInsets.bottom; double h = MediaQuery.of(context).viewInsets.bottom;
if(h > 0 && keyboard <= 0) { if(h > 0 && keyboard < h) {
setState(() { setState(() {
keyboard = h; keyboard = h;
}); });

7
lib/web/web_view/input_comment.dart

@ -221,13 +221,14 @@ class _InputComment extends State<InputComment> {
Offstage( Offstage(
offstage: !widget.emojiShowing, offstage: !widget.emojiShowing,
child: SizedBox( child: SizedBox(
height: 250.h, height: widget.keyboard == -1 ? 270 : widget.keyboard,
width: MediaQuery.of(context).size.width,
child: child:
EmojiPicker( EmojiPicker(
textEditingController: widget.commentTextController, textEditingController: widget.commentTextController,
config: Config( config: Config(
columns: 7, columns: 7,
emojiSizeMax: 32 * (Platform.isIOS ? 1.30 : 1.0), emojiSizeMax: 32 * (Platform.isIOS ? 1.10 : 1.0),
verticalSpacing: 0, verticalSpacing: 0,
horizontalSpacing: 0, horizontalSpacing: 0,
gridPadding: EdgeInsets.zero, gridPadding: EdgeInsets.zero,
@ -249,7 +250,7 @@ class _InputComment extends State<InputComment> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
loadingIndicator: const SizedBox.shrink(), loadingIndicator: const SizedBox.shrink(),
tabIndicatorAnimDuration: kTabScrollDuration, tabIndicatorAnimDuration: Duration(milliseconds: 0),
categoryIcons: const CategoryIcons(), categoryIcons: const CategoryIcons(),
buttonMode: ButtonMode.MATERIAL, buttonMode: ButtonMode.MATERIAL,
checkPlatformCompatibility: true, checkPlatformCompatibility: true,

7
pubspec.lock

@ -113,6 +113,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.10" version: "3.0.10"
emoji_picker_flutter:
dependency: "direct main"
description:
name: emoji_picker_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.1"
event_bus: event_bus:
dependency: "direct main" dependency: "direct main"
description: description:

Loading…
Cancel
Save