rotasi hilang
This commit is contained in:
@@ -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(),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user