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
+1 -1
View File
@@ -17,7 +17,7 @@ class BNBCustomPainter3 extends CustomPainter {
path.quadraticBezierTo(size.width * 0.40, 0, size.width * 0.40, 20);
path.arcToPoint(
Offset(size.width * 0.60, 20),
radius: Radius.circular(20.0),
radius: Radius.circular(size.height * 0.5),
clockwise: false,
);
path.quadraticBezierTo(size.width * 0.60, 0, size.width * 0.63, 0);
+5 -1
View File
@@ -5,10 +5,14 @@ import 'package:furibase/providers/menu_selection_provider.dart';
import 'package:furibase/screen/Home_screen.dart';
import 'package:provider/provider.dart';
void main() {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
await SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown, // bisa dihapus jika hanya ingin satu arah
]);
runApp(const MyApp());
}
+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),