opt. for fullscreen jitter

This commit is contained in:
lollipopkit
2023-06-20 21:04:55 +08:00
parent 2095b79b9a
commit 0aff5b3b72
4 changed files with 24 additions and 21 deletions

View File

@@ -360,7 +360,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 354;
CURRENT_PROJECT_VERSION = 357;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -368,7 +368,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.354;
MARKETING_VERSION = 1.0.357;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -491,7 +491,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 354;
CURRENT_PROJECT_VERSION = 357;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -499,7 +499,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.354;
MARKETING_VERSION = 1.0.357;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -516,7 +516,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 354;
CURRENT_PROJECT_VERSION = 357;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -524,7 +524,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.354;
MARKETING_VERSION = 1.0.357;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 354;
static const int build = 357;
static const String engine = "3.10.0";
static const String buildAt = "2023-06-08 19:29:06.373509";
static const int modifications = 80;
static const String buildAt = "2023-06-08 22:45:50.770980";
static const int modifications = 3;
}

View File

@@ -30,8 +30,7 @@ class FullScreenPage extends StatefulWidget {
_FullScreenPageState createState() => _FullScreenPageState();
}
class _FullScreenPageState extends State<FullScreenPage>
with AfterLayoutMixin {
class _FullScreenPageState extends State<FullScreenPage> with AfterLayoutMixin {
late S _s;
late MediaQueryData _media;
late ThemeData _theme;
@@ -44,7 +43,13 @@ class _FullScreenPageState extends State<FullScreenPage>
void initState() {
super.initState();
hideStatusBar();
_timer = Timer.periodic(const Duration(minutes: 1), (_) => setState(() {}));
_timer = Timer.periodic(const Duration(minutes: 1), (_) {
if (mounted) {
setState(() {});
} else {
_timer.cancel();
}
});
}
@override
@@ -61,10 +66,8 @@ class _FullScreenPageState extends State<FullScreenPage>
_theme = Theme.of(context);
}
// x = _media.size.width * 0.1
// r = Random().nextDouble()
// Return [-x * r, x * r]
double get _offset {
// based on screen width
final x = _media.size.width * 0.03;
var r = Random().nextDouble();
final n = Random().nextBool() ? -1 : 1;

View File

@@ -475,9 +475,9 @@
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 354;
CURRENT_PROJECT_VERSION = 357;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.354;
MARKETING_VERSION = 1.0.357;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -490,9 +490,9 @@
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 354;
CURRENT_PROJECT_VERSION = 357;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.354;
MARKETING_VERSION = 1.0.357;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -505,9 +505,9 @@
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 354;
CURRENT_PROJECT_VERSION = 357;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.354;
MARKETING_VERSION = 1.0.357;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;