背景图闪烁优化
This commit is contained in:
parent
3d8c3f9cc3
commit
5517eca5f6
@ -72,12 +72,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
getContext = context;
|
getContext = context;
|
||||||
return GetBuilder<CircleLogic>(builder: (logic) {
|
return GetBuilder<CircleLogic>(builder: (logic) {
|
||||||
return Container(
|
return Scaffold(
|
||||||
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,
|
backgroundColor: Colors.transparent,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: GetBuilder(builder: (CircleLogic controller) {
|
child: GetBuilder(builder: (CircleLogic controller) {
|
||||||
@ -128,7 +123,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
));
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
import 'package:circle_app/app/circle/view.dart';
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:circle_app/view/ExitAppConfirmation.dart';
|
import 'package:circle_app/view/ExitAppConfirmation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -28,7 +29,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||||||
return GetBuilder(builder: (HomeLogic controller) {
|
return GetBuilder(builder: (HomeLogic controller) {
|
||||||
return ExitAppConfirmation(child: Scaffold(
|
return ExitAppConfirmation(child: Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
// backgroundColor: Color.fromRGBO(244, 245, 245, 1.0),
|
backgroundColor: const Color.fromRGBO(15, 10, 31, 1.0),
|
||||||
bottomNavigationBar: Container(
|
bottomNavigationBar: Container(
|
||||||
height: 49.sp + MediaQuery.of(context).padding.bottom,
|
height: 49.sp + MediaQuery.of(context).padding.bottom,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
@ -51,13 +52,30 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: PageView(
|
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(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
controller: controller.pageController,
|
controller: controller.pageController,
|
||||||
onPageChanged: (int index) {
|
onPageChanged: (int index) {
|
||||||
// controller.updateIndex(index);
|
// controller.updateIndex(index);
|
||||||
},
|
},
|
||||||
children: controller.tabs,
|
children: controller.tabs,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),);
|
),);
|
||||||
});
|
});
|
||||||
@ -88,6 +106,8 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||||||
: getTabbarImage('${image}_normal'),
|
: getTabbarImage('${image}_normal'),
|
||||||
width: 34.sp,
|
width: 34.sp,
|
||||||
height: 34.sp,
|
height: 34.sp,
|
||||||
|
excludeFromSemantics: true,
|
||||||
|
gaplessPlayback: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -40,13 +40,8 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
return GetBuilder<MinefragmentLogic>(
|
return GetBuilder<MinefragmentLogic>(
|
||||||
builder: (logic) {
|
builder: (logic) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Container(
|
backgroundColor: Colors.transparent,
|
||||||
width: Get.width,
|
body: Padding(
|
||||||
height: Get.height,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
image: bgWidget
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 20.0 + statusBarHeight.sp,
|
top: 20.0 + statusBarHeight.sp,
|
||||||
left: 11.sp,
|
left: 11.sp,
|
||||||
@ -78,7 +73,6 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,12 +61,7 @@ class MsgPage extends StatelessWidget {
|
|||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
height: MediaQuery.of(context).size.height,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
image: bgWidget),
|
|
||||||
),
|
|
||||||
SafeArea(
|
SafeArea(
|
||||||
child: GetBuilder(builder: (MsgLogic controller) {
|
child: GetBuilder(builder: (MsgLogic controller) {
|
||||||
return Column(
|
return Column(
|
||||||
|
|||||||
@ -45,12 +45,6 @@ class _WebViewContainerState extends State<WebviewPage> {
|
|||||||
|
|
||||||
},
|
},
|
||||||
onWebResourceError: (WebResourceError error) {},
|
onWebResourceError: (WebResourceError error) {},
|
||||||
onNavigationRequest: (NavigationRequest request) {
|
|
||||||
if (request.url.startsWith('')) {
|
|
||||||
return NavigationDecision.prevent;
|
|
||||||
}
|
|
||||||
return NavigationDecision.navigate;
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
..loadRequest(Uri.parse(url));
|
..loadRequest(Uri.parse(url));
|
||||||
|
|||||||
@ -93,7 +93,7 @@ dependencies:
|
|||||||
#event_bus:
|
#event_bus:
|
||||||
event_bus: ^2.0.0
|
event_bus: ^2.0.0
|
||||||
#安装apk
|
#安装apk
|
||||||
flutter_install_app: 1.3.0
|
# flutter_install_app: 1.3.0
|
||||||
#闪屏页
|
#闪屏页
|
||||||
flutter_native_splash: 2.2.16
|
flutter_native_splash: 2.2.16
|
||||||
#腾讯离线推送
|
#腾讯离线推送
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user