rotasi hilang

This commit is contained in:
='fauz
2025-04-22 15:17:57 +07:00
parent 1a2cf014b6
commit 56d4697981
7 changed files with 27 additions and 8 deletions
+16 -2
View File
@@ -21,9 +21,16 @@ class _HomeScreenState extends State<HomeScreen> {
@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
final isLandscape = size.width > size.height;
final screenWidth = MediaQuery.of(context).size.width;
final buttonScanSize = screenWidth * 0.20;
final double bottomPadding = (9000 / screenWidth).clamp(0, 0.2);
double bottomOffset = -(screenWidth * 0.25) + 180;
double sunRiseCurve(double width) {
// kamu bisa mainin fungsi ini sesuka hati
return -((400 / width) * 100); // semakin kecil width, hasil makin negatif
}
return Scaffold(
// appBar: AppBar(
// elevation: 0,
@@ -242,10 +249,17 @@ class _HomeScreenState extends State<HomeScreen> {
Positioned(bottom: 0, left: 0, right: 0, child: MainMenu()),
Positioned(
bottom: bottomPadding * 32,
// bottom: -150, //bottomPadding * 32,
// bottom: sunRiseCurve(
// screenWidth,
// ),
bottom:
isLandscape
? bottomOffset.clamp(-200.0, -50.0)
: bottomPadding * 55,
left: (screenWidth - buttonScanSize) / 2,
child: Transform.translate(
offset: Offset(0, -20),
offset: Offset(0, -30),
child: ScanButton(),
),
),
+1 -1
View File
@@ -153,7 +153,7 @@ class _KoleksiScreenState extends State<KoleksiScreen> {
),
Positioned(bottom: 0, left: 0, right: 0, child: MainMenu()),
Positioned(
bottom: bottomPadding * 32,
bottom: bottomPadding * 98,
left: (screenWidth - buttonScanSize) / 2,
child: Transform.translate(
offset: Offset(0, -20),
+1 -1
View File
@@ -293,7 +293,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
],
),
Positioned(
bottom: bottomPadding * 32,
bottom: bottomPadding * 98,
left: (screenWidth - buttonScanSize) / 2,
child: Transform.translate(
offset: Offset(0, -20),
+1 -1
View File
@@ -344,7 +344,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
Positioned(bottom: 0, left: 0, right: 0, child: MainMenu()),
Positioned(
bottom: bottomPadding * 32,
bottom: bottomPadding * 98,
left: (screenWidth - buttonScanSize) / 2,
child: Transform.translate(
offset: Offset(0, -20),