mod: 缓存sheetBottom高度

This commit is contained in:
guozhigq
2023-07-22 22:47:00 +08:00
parent eab9e4149a
commit 90f05931f1
8 changed files with 32 additions and 31 deletions

View File

@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/pages/dynamics/index.dart';
import 'package:pilipala/pages/home/index.dart';
import 'package:pilipala/utils/storage.dart';
import './controller.dart';
class MainApp extends StatefulWidget {
@ -87,6 +89,11 @@ class _MainAppState extends State<MainApp> with SingleTickerProviderStateMixin {
@override
Widget build(BuildContext context) {
Box localCache = GStrorage.localCache;
double sheetHeight = MediaQuery.of(context).size.height -
MediaQuery.of(context).padding.top -
MediaQuery.of(context).size.width * 9 / 16;
localCache.put('sheetHeight', sheetHeight);
return Scaffold(
body: FadeTransition(
opacity: _fadeAnimation!,