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:freekake/screen/camera_screen.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.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 { class ScanButton extends StatelessWidget {
const ScanButton({super.key}); const ScanButton({super.key});

View File

@ -31,7 +31,7 @@ class MyApp extends StatelessWidget {
], ],
child: MaterialApp( child: MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
title: 'AR Character App', title: 'Freekake',
theme: ThemeData.dark(), theme: ThemeData.dark(),
home: home:
// DrawScreen(), // 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/main_menu.dart';
import 'package:freekake/components/menu_item.dart'; import 'package:freekake/components/menu_item.dart';
import 'package:freekake/components/scan_button.dart'; import 'package:freekake/components/scan_button.dart';
import 'package:flutter_unity_widget/flutter_unity_widget.dart';
class HomeScreen extends StatefulWidget { class HomeScreen extends StatefulWidget {
const HomeScreen({super.key}); const HomeScreen({super.key});
@ -60,146 +61,163 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
), ),
), ),
), // Positioned(
// top: 0,
Positioned( // left: 0,
right: 0, // right: 0,
top: 100, // child: SizedBox(height: 120, child: TopbarContainer()),
child: Padding( // ),
padding: EdgeInsets.only(right: 20), // Positioned(
child: Container( // right: 0,
width: 40, // top: 100,
height: 40, // child: Padding(
decoration: BoxDecoration( // padding: EdgeInsets.only(right: 20),
borderRadius: BorderRadius.circular(1), // child: Container(
color: Color.fromARGB(1, 209, 174, 174).withAlpha(0), // width: 40,
), // height: 40,
child: Center( // decoration: BoxDecoration(
child: DropdownButtonHideUnderline( // borderRadius: BorderRadius.circular(1),
child: DropdownButton2( // color: Color.fromARGB(1, 209, 174, 174).withAlpha(0),
customButton: Container( // ),
height: 50, // child: Center(
width: 50, // child: DropdownButtonHideUnderline(
decoration: BoxDecoration( // child: DropdownButton2(
borderRadius: BorderRadius.circular(10), // customButton: Container(
image: const DecorationImage( // height: 50,
image: AssetImage('assets/images/cepot-u.png'), // width: 50,
fit: BoxFit.cover, // decoration: BoxDecoration(
), // borderRadius: BorderRadius.circular(10),
), // image: const DecorationImage(
), // image: AssetImage('assets/images/luffy-u.png'),
openWithLongPress: false, // fit: BoxFit.cover,
items: [ // ),
..._MenuItems.firstItems.map( // ),
(item) => DropdownMenuItem<MenuItem>( // ),
value: item, // openWithLongPress: false,
child: _MenuItems.buildItem(item), // items: [
), // ..._MenuItems.firstItems.map(
), // (item) => DropdownMenuItem<_MenuItem>(
], // value: item,
onChanged: (value) { // child: _MenuItems.buildItem(item),
if (value != null) { // ),
_MenuItems.onChanged(context, value); // ),
} else { // // const DropdownMenuItem<Divider>(
print("null"); // // enabled: false,
} // // // height: 8,
}, // // child: Divider(),
buttonStyleData: ButtonStyleData( // // ),
decoration: BoxDecoration( // // ..._MenuItems.secondItems.map(
borderRadius: BorderRadius.circular(40), // // (item) => DropdownMenuItem<_MenuItem>(
), // // value: item,
), // // // height: 48,
dropdownStyleData: DropdownStyleData( // // child: _MenuItems.buildItem(item),
width: 140, // // ),
padding: EdgeInsets.zero, // // ),
maxHeight: 150, // ],
// padding: const EdgeInsets.symmetric(vertical: 6), // onChanged: (value) {
decoration: BoxDecoration( // if (value != null) {
borderRadius: BorderRadius.circular(4), // _MenuItems.onChanged(context, value);
color: Color.fromRGBO(2, 104, 17, 1).withAlpha(50), // } else {
), // print("null");
offset: const Offset(40, -4), // }
), // },
menuItemStyleData: MenuItemStyleData( // buttonStyleData: ButtonStyleData(
height: 35, // decoration: BoxDecoration(
padding: EdgeInsets.symmetric(horizontal: 10), // borderRadius: BorderRadius.circular(40),
), // ),
// menuItemStyleData: const MenuItemStyleData( // ),
// padding: EdgeInsets.only(left: 16, right: 16), // 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,
right: 10,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
BuildcardInfo(
icon: Icons.person,
text: username,
extraIcon: Icons.emoji_events,
extraText: "5000",
width: 180,
), ),
), BuildcardInfo(
icon: Icons.monetization_on,
text: "1.300",
width: 90,
),
],
), ),
), ),
), // Positioned(
Positioned( // bottom: 150,
top: 10, // left: 0,
left: 10, // right: 0,
right: 10, // child: Column(
child: Row( // children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, // 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: [ children: [
BuildcardInfo( Positioned(
icon: Icons.person, bottom: 0,
text: username, left: 0,
extraIcon: Icons.emoji_events, right: 0,
extraText: "5000", child: SizedBox(height: 85, child: BottomNavbar()),
width: 180,
),
BuildcardInfo(
icon: Icons.monetization_on,
text: "1.300",
width: 90,
), ),
], ],
), ),
), Positioned(bottom: 0, left: 0, right: 0, child: MainMenu()),
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),
],
),
),
// BG MEnu
Stack(
children: [
Positioned(
bottom: 0,
left: 0,
right: 0,
child: SizedBox(height: 85, child: BottomNavbar()),
),
],
),
Positioned(bottom: 0, left: 0, right: 0, child: MainMenu()),
Positioned( Positioned(
bottom: bottom: