背景图闪烁优化
This commit is contained in:
parent
3d8c3f9cc3
commit
5517eca5f6
@ -72,63 +72,58 @@ class _CirclePageState extends State<CirclePage>
|
||||
Widget build(BuildContext context) {
|
||||
getContext = context;
|
||||
return GetBuilder<CircleLogic>(builder: (logic) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration:
|
||||
const BoxDecoration(color: Color(0xFF423055), image: bgWidget),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SafeArea(
|
||||
child: GetBuilder(builder: (CircleLogic controller) {
|
||||
return Stack(
|
||||
children: [
|
||||
Column(children: [
|
||||
Obx(() {
|
||||
return navigatorItem(controller.statistics.value);
|
||||
}),
|
||||
// Text(controller.state.msg),
|
||||
//组件使用
|
||||
]),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 45.sp),
|
||||
child: PageView(
|
||||
controller: _pageController,
|
||||
onPageChanged: (index) {
|
||||
_tabController.animateTo(index);
|
||||
print("index=" + index.toString());
|
||||
},
|
||||
children: [
|
||||
circleList(controller),
|
||||
vicinityList(controller),
|
||||
],
|
||||
),
|
||||
),
|
||||
logic.isShowCircle
|
||||
? Positioned(
|
||||
bottom: 36.sp,
|
||||
right: 10.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
List<MyConfigData> numbers = [];
|
||||
numbers.add(MyConfigData(
|
||||
logic.getCircleIndex().id.toString(),
|
||||
logic.getCircleIndex().title!,
|
||||
false));
|
||||
var data = await Get.toNamed(
|
||||
AppRoutes.Call_out,
|
||||
arguments: {'numbers': numbers});
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('send_msg'),
|
||||
width: 60.sp,
|
||||
)))
|
||||
: Center()
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
));
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SafeArea(
|
||||
child: GetBuilder(builder: (CircleLogic controller) {
|
||||
return Stack(
|
||||
children: [
|
||||
Column(children: [
|
||||
Obx(() {
|
||||
return navigatorItem(controller.statistics.value);
|
||||
}),
|
||||
// Text(controller.state.msg),
|
||||
//组件使用
|
||||
]),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 45.sp),
|
||||
child: PageView(
|
||||
controller: _pageController,
|
||||
onPageChanged: (index) {
|
||||
_tabController.animateTo(index);
|
||||
print("index=" + index.toString());
|
||||
},
|
||||
children: [
|
||||
circleList(controller),
|
||||
vicinityList(controller),
|
||||
],
|
||||
),
|
||||
),
|
||||
logic.isShowCircle
|
||||
? Positioned(
|
||||
bottom: 36.sp,
|
||||
right: 10.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
List<MyConfigData> numbers = [];
|
||||
numbers.add(MyConfigData(
|
||||
logic.getCircleIndex().id.toString(),
|
||||
logic.getCircleIndex().title!,
|
||||
false));
|
||||
var data = await Get.toNamed(
|
||||
AppRoutes.Call_out,
|
||||
arguments: {'numbers': numbers});
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('send_msg'),
|
||||
width: 60.sp,
|
||||
)))
|
||||
: Center()
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:circle_app/app/circle/view.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:circle_app/view/ExitAppConfirmation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -28,7 +29,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
||||
return GetBuilder(builder: (HomeLogic controller) {
|
||||
return ExitAppConfirmation(child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
// backgroundColor: Color.fromRGBO(244, 245, 245, 1.0),
|
||||
backgroundColor: const Color.fromRGBO(15, 10, 31, 1.0),
|
||||
bottomNavigationBar: Container(
|
||||
height: 49.sp + MediaQuery.of(context).padding.bottom,
|
||||
width: Get.width,
|
||||
@ -51,13 +52,30 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
||||
],
|
||||
),
|
||||
),
|
||||
body: PageView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: controller.pageController,
|
||||
onPageChanged: (int index) {
|
||||
// controller.updateIndex(index);
|
||||
},
|
||||
children: controller.tabs,
|
||||
body: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: Get.height - 49.sp + MediaQuery.of(context).padding.bottom,
|
||||
decoration: const BoxDecoration(
|
||||
image: bgWidget),
|
||||
),
|
||||
// Image.asset(
|
||||
// getBaseImage('bg'),
|
||||
// width: Get.width,
|
||||
// height: Get.height - 49.sp + MediaQuery.of(context).padding.bottom,
|
||||
// fit: BoxFit.fill,
|
||||
// gaplessPlayback: true,
|
||||
// ),
|
||||
PageView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: controller.pageController,
|
||||
onPageChanged: (int index) {
|
||||
// controller.updateIndex(index);
|
||||
},
|
||||
children: controller.tabs,
|
||||
)
|
||||
],
|
||||
),
|
||||
),);
|
||||
});
|
||||
@ -88,6 +106,8 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
||||
: getTabbarImage('${image}_normal'),
|
||||
width: 34.sp,
|
||||
height: 34.sp,
|
||||
excludeFromSemantics: true,
|
||||
gaplessPlayback: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -40,42 +40,36 @@ class MinefragmentPage extends StatelessWidget {
|
||||
return GetBuilder<MinefragmentLogic>(
|
||||
builder: (logic) {
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
decoration: const BoxDecoration(
|
||||
image: bgWidget
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 20.0 + statusBarHeight.sp,
|
||||
left: 11.sp,
|
||||
right: 11.sp,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 20.0 + statusBarHeight.sp,
|
||||
left: 11.sp,
|
||||
right: 11.sp,
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
_buildAvatarRow(logic),
|
||||
_friendsRow(logic),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showRechargeDialog(logic);
|
||||
},
|
||||
child: Stack(children: [
|
||||
MyImageWidget,
|
||||
Positioned(
|
||||
top: 54.sp,
|
||||
left: 72.sp,
|
||||
child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),)),
|
||||
Positioned(
|
||||
top: 26.sp,
|
||||
left: 70.sp,
|
||||
child: Text("会员-微乐园贵宾",style: TextStyle(color: const Color(0xFFFFFFFF),fontSize: 16.sp),))
|
||||
],),
|
||||
),
|
||||
_circleLiveView(logic),
|
||||
],
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
_buildAvatarRow(logic),
|
||||
_friendsRow(logic),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showRechargeDialog(logic);
|
||||
},
|
||||
child: Stack(children: [
|
||||
MyImageWidget,
|
||||
Positioned(
|
||||
top: 54.sp,
|
||||
left: 72.sp,
|
||||
child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),)),
|
||||
Positioned(
|
||||
top: 26.sp,
|
||||
left: 70.sp,
|
||||
child: Text("会员-微乐园贵宾",style: TextStyle(color: const Color(0xFFFFFFFF),fontSize: 16.sp),))
|
||||
],),
|
||||
),
|
||||
_circleLiveView(logic),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -61,12 +61,7 @@ class MsgPage extends StatelessWidget {
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration: const BoxDecoration(
|
||||
image: bgWidget),
|
||||
),
|
||||
|
||||
SafeArea(
|
||||
child: GetBuilder(builder: (MsgLogic controller) {
|
||||
return Column(
|
||||
|
||||
@ -45,12 +45,6 @@ class _WebViewContainerState extends State<WebviewPage> {
|
||||
|
||||
},
|
||||
onWebResourceError: (WebResourceError error) {},
|
||||
onNavigationRequest: (NavigationRequest request) {
|
||||
if (request.url.startsWith('')) {
|
||||
return NavigationDecision.prevent;
|
||||
}
|
||||
return NavigationDecision.navigate;
|
||||
},
|
||||
),
|
||||
)
|
||||
..loadRequest(Uri.parse(url));
|
||||
|
||||
@ -93,7 +93,7 @@ dependencies:
|
||||
#event_bus:
|
||||
event_bus: ^2.0.0
|
||||
#安装apk
|
||||
flutter_install_app: 1.3.0
|
||||
# flutter_install_app: 1.3.0
|
||||
#闪屏页
|
||||
flutter_native_splash: 2.2.16
|
||||
#腾讯离线推送
|
||||
|
||||
Loading…
Reference in New Issue
Block a user