This commit is contained in:
Irwan Cahyono 2025-05-07 13:05:21 +07:00
parent 467470ce90
commit 340a66bfb2
3 changed files with 154 additions and 136 deletions

View File

@ -1,7 +1,7 @@
import 'package:freekake/screen/camera_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
// import 'package:freekake/screen/camera_screen.dart';
import 'package:freekake/screen/camera_screen.dart';
class ScanButton extends StatelessWidget {
const ScanButton({super.key});

View File

@ -31,7 +31,7 @@ class MyApp extends StatelessWidget {
],
child: MaterialApp(
debugShowCheckedModeBanner: false,
title: 'AR Character App',
title: 'Freekake',
theme: ThemeData.dark(),
home:
// DrawScreen(),

View File

@ -5,6 +5,7 @@ import 'package:freekake/components/buildcard_info.dart';
import 'package:freekake/components/main_menu.dart';
import 'package:freekake/components/menu_item.dart';
import 'package:freekake/components/scan_button.dart';
import 'package:flutter_unity_widget/flutter_unity_widget.dart';
class HomeScreen extends StatefulWidget {
const HomeScreen({super.key});
@ -60,79 +61,95 @@ class _HomeScreenState extends State<HomeScreen> {
),
),
),
),
Positioned(
right: 0,
top: 100,
child: Padding(
padding: EdgeInsets.only(right: 20),
child: Container(
width: 40,
height: 40,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(1),
color: Color.fromARGB(1, 209, 174, 174).withAlpha(0),
),
child: Center(
child: DropdownButtonHideUnderline(
child: DropdownButton2(
customButton: Container(
height: 50,
width: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
image: const DecorationImage(
image: AssetImage('assets/images/cepot-u.png'),
fit: BoxFit.cover,
),
),
),
openWithLongPress: false,
items: [
..._MenuItems.firstItems.map(
(item) => DropdownMenuItem<MenuItem>(
value: item,
child: _MenuItems.buildItem(item),
),
),
],
onChanged: (value) {
if (value != null) {
_MenuItems.onChanged(context, value);
} else {
print("null");
}
},
buttonStyleData: ButtonStyleData(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
),
),
dropdownStyleData: DropdownStyleData(
width: 140,
padding: EdgeInsets.zero,
maxHeight: 150,
// padding: const EdgeInsets.symmetric(vertical: 6),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Color.fromRGBO(2, 104, 17, 1).withAlpha(50),
),
offset: const Offset(40, -4),
),
menuItemStyleData: MenuItemStyleData(
height: 35,
padding: EdgeInsets.symmetric(horizontal: 10),
),
// menuItemStyleData: const MenuItemStyleData(
// padding: EdgeInsets.only(left: 16, right: 16),
// Positioned(
// top: 0,
// left: 0,
// right: 0,
// child: SizedBox(height: 120, child: TopbarContainer()),
// ),
// Positioned(
// right: 0,
// top: 100,
// child: Padding(
// padding: EdgeInsets.only(right: 20),
// child: Container(
// width: 40,
// height: 40,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(1),
// color: Color.fromARGB(1, 209, 174, 174).withAlpha(0),
// ),
// child: Center(
// child: DropdownButtonHideUnderline(
// child: DropdownButton2(
// customButton: Container(
// height: 50,
// width: 50,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10),
// image: const DecorationImage(
// image: AssetImage('assets/images/luffy-u.png'),
// fit: BoxFit.cover,
// ),
// ),
// ),
// openWithLongPress: false,
// items: [
// ..._MenuItems.firstItems.map(
// (item) => DropdownMenuItem<_MenuItem>(
// value: item,
// child: _MenuItems.buildItem(item),
// ),
// ),
// // const DropdownMenuItem<Divider>(
// // enabled: false,
// // // height: 8,
// // child: Divider(),
// // ),
// // ..._MenuItems.secondItems.map(
// // (item) => DropdownMenuItem<_MenuItem>(
// // value: item,
// // // height: 48,
// // child: _MenuItems.buildItem(item),
// // ),
// // ),
// ],
// onChanged: (value) {
// if (value != null) {
// _MenuItems.onChanged(context, value);
// } else {
// print("null");
// }
// },
// buttonStyleData: ButtonStyleData(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(40),
// ),
// ),
// dropdownStyleData: DropdownStyleData(
// width: 140,
// padding: EdgeInsets.zero,
// maxHeight: 150,
// // padding: const EdgeInsets.symmetric(vertical: 6),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(4),
// color: Color.fromRGBO(2, 104, 17, 1).withAlpha(50),
// ),
// offset: const Offset(40, -4),
// ),
// menuItemStyleData: MenuItemStyleData(
// height: 35,
// padding: EdgeInsets.symmetric(horizontal: 10),
// ),
// // menuItemStyleData: const MenuItemStyleData(
// // padding: EdgeInsets.only(left: 16, right: 16),
// // ),
// ),
// ),
// ),
// ),
// ),
// ),
),
),
),
),
),
),
Positioned(
top: 10,
left: 10,
@ -155,39 +172,40 @@ class _HomeScreenState extends State<HomeScreen> {
],
),
),
Positioned(
bottom: 150,
left: 0,
right: 0,
child: Column(
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
decoration: BoxDecoration(
color: Color.fromARGB(255, 247, 224, 236),
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Color.fromARGB(255, 214, 213, 121),
blurRadius: 5,
spreadRadius: 2,
),
],
),
child: Text(
"Halo....Jotaslim",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Color(0xFF000000),
),
),
),
SizedBox(height: 10),
setHomeImage("assets/images/cepott.png", 300),
],
),
),
// Positioned(
// bottom: 150,
// left: 0,
// right: 0,
// child: Column(
// children: [
// Container(
// padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
// decoration: BoxDecoration(
// color: Color.fromARGB(255, 247, 224, 236),
// borderRadius: BorderRadius.circular(10),
// boxShadow: [
// BoxShadow(
// color: Color.fromARGB(255, 214, 213, 121),
// blurRadius: 5,
// spreadRadius: 2,
// ),
// ],
// ),
// child: Text(
// "Halo....Jotaslim",
// style: TextStyle(
// fontSize: 12,
// fontWeight: FontWeight.bold,
// color: Color(0xFF000000),
// ),
// ),
// ),
// SizedBox(height: 10),
// setHomeImage("images/luffy.png", 300),
// // Image.asset("images/luffy.png", width: 300),
// ],
// ),
// ),
// BG MEnu
Stack(
children: [