sebelum unity
This commit is contained in:
parent
2a4f8fc335
commit
0e985f5453
@ -1,10 +1,9 @@
|
||||
import 'package:freekake/components/navbar_shape_3.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/navbar_container.dart';
|
||||
import 'package:furibase/components/navbar_shape_1.dart';
|
||||
import 'package:furibase/components/navbar_shape_2.dart';
|
||||
import 'package:furibase/components/navbar_shape_3.dart';
|
||||
import 'package:furibase/components/custom_shape.dart';
|
||||
import 'package:freekake/components/navbar_container.dart';
|
||||
import 'package:freekake/components/navbar_shape_1.dart';
|
||||
import 'package:freekake/components/navbar_shape_2.dart';
|
||||
import 'package:freekake/components/navbar_shape_3.dart';
|
||||
import 'package:freekake/components/custom_shape.dart';
|
||||
|
||||
class BottomNavbar extends StatefulWidget {
|
||||
const BottomNavbar({super.key});
|
||||
|
||||
@ -53,6 +53,7 @@ class CardList extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 1, width: 5),
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
@ -61,16 +62,16 @@ class CardList extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 1, width: 5),
|
||||
Text(
|
||||
body,
|
||||
style: const TextStyle(
|
||||
letterSpacing: 0.2,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
// Text(
|
||||
// body,
|
||||
// style: const TextStyle(
|
||||
// letterSpacing: 0.2,
|
||||
// fontSize: 14,
|
||||
// fontWeight: FontWeight.normal,
|
||||
// ),
|
||||
// maxLines: 2,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
const Spacer(),
|
||||
Padding(
|
||||
padding: EdgeInsets.all(0.08),
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:freekake/components/menu_button.dart';
|
||||
import 'package:freekake/providers/menu_selection_provider.dart';
|
||||
import 'package:freekake/screen/Home_screen.dart';
|
||||
import 'package:freekake/screen/koleksi_screen.dart';
|
||||
|
||||
@ -8,12 +8,12 @@ import 'package:provider/provider.dart';
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
||||
// SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
||||
|
||||
await SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown, // bisa dihapus jika hanya ingin satu arah
|
||||
]);
|
||||
// await SystemChrome.setPreferredOrientations([
|
||||
// DeviceOrientation.portraitUp,
|
||||
// DeviceOrientation.portraitDown, // bisa dihapus jika hanya ingin satu arah
|
||||
// ]);
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
@ -51,22 +51,27 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
return Stack(
|
||||
children: <Widget>[
|
||||
Positioned.fill(
|
||||
child: RepaintBoundary(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/background.jpeg"),
|
||||
fit: BoxFit.cover,
|
||||
child: UnityWidget(
|
||||
onUnityCreated: onUnityCreated,
|
||||
//isARScene: true,
|
||||
onUnityMessage: onUnityMessage,
|
||||
//onUnitySceneLoaded: onUnitySceneLoaded,
|
||||
fullscreen: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Positioned(
|
||||
// top: 0,
|
||||
// left: 0,
|
||||
// right: 0,
|
||||
// child: SizedBox(height: 120, child: TopbarContainer()),
|
||||
// Positioned.fill(
|
||||
// child: RepaintBoundary(
|
||||
// child: Container(
|
||||
// decoration: const BoxDecoration(
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage("assets/images/background.jpeg"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
// Positioned(
|
||||
// right: 0,
|
||||
// top: 100,
|
||||
@ -88,7 +93,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
// image: const DecorationImage(
|
||||
// image: AssetImage('assets/images/luffy-u.png'),
|
||||
// image: AssetImage('assets/images/cepot-u.png'),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
@ -96,23 +101,11 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
// openWithLongPress: false,
|
||||
// items: [
|
||||
// ..._MenuItems.firstItems.map(
|
||||
// (item) => DropdownMenuItem<_MenuItem>(
|
||||
// (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) {
|
||||
@ -201,8 +194,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 10),
|
||||
// setHomeImage("images/luffy.png", 300),
|
||||
// // Image.asset("images/luffy.png", width: 300),
|
||||
// //setHomeImage("assets/images/cepott.png", 300),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
@ -234,55 +226,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
void onUnityCreated(controller) {
|
||||
_unityWidgetController = controller;
|
||||
}
|
||||
|
||||
void onUnityMessage(message) {
|
||||
print('Received message from unity: ${message.toString()}');
|
||||
}
|
||||
|
||||
// Widget _menuButton(String label, Widget icon) {
|
||||
// return Expanded(
|
||||
// child: Column(
|
||||
// children: [
|
||||
// IconButton(
|
||||
// // icon: Icon(icon, color: Color.fromARGB(255, 179, 161, 170)),
|
||||
// icon: icon,
|
||||
// onPressed: () {},
|
||||
// ),
|
||||
// Text(
|
||||
// label,
|
||||
// style: TextStyle(
|
||||
// color: Color.fromARGB(255, 239, 224, 232),
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
||||
// Widget _scanButton() {
|
||||
// return Expanded(
|
||||
// child: Container(
|
||||
// decoration: BoxDecoration(shape: BoxShape.circle, color: transparent),
|
||||
// padding: EdgeInsets.all(10),
|
||||
// child: IconButton(
|
||||
// icon: SvgPicture.asset(
|
||||
// 'icons/Scan.svg',
|
||||
// width: 60,
|
||||
// height: 60,
|
||||
// colorFilter: ColorFilter.mode(Color(0xFFFFFFFF), BlendMode.srcIn),
|
||||
// ),
|
||||
// onPressed: () {},
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
||||
Widget setHomeImage(String src, double size) {
|
||||
return Image.asset("assets/" + src, width: size);
|
||||
return Image.asset(src, width: size);
|
||||
}
|
||||
|
||||
void onUnityCreated(controller) {
|
||||
|
||||
@ -263,7 +263,7 @@ class _ListEducationState extends State<ListEducation> {
|
||||
width: 70,
|
||||
height: 70,
|
||||
textColor: Colors.black,
|
||||
lblSize: 10,
|
||||
lblSize: 8,
|
||||
colorContiner: ColorHelper.hexToColor(item["color"]),
|
||||
onTapAc:
|
||||
() => {
|
||||
|
||||
@ -22,10 +22,26 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
||||
String _searchQuery = "";
|
||||
|
||||
final List<Map<String, dynamic>> _collections = [
|
||||
{"label": "Kesehatan", "image": "assets/icons/healthy.svg", "color": "#cdd0ee"},
|
||||
{"label": "Gizi", "image": "assets/icons/Nutrition.svg", "color": "#e8e29a"},
|
||||
{"label": "Pendidikan", "image": "assets/icons/Education.svg", "color": "#efd8c6"},
|
||||
{"label": "Keselamatan", "image": "assets/icons/Safety.svg", "color": "#cef1da"},
|
||||
{
|
||||
"label": "Kesehatan",
|
||||
"image": "assets/icons/healthy.svg",
|
||||
"color": "#cdd0ee",
|
||||
},
|
||||
{
|
||||
"label": "Gizi",
|
||||
"image": "assets/icons/Nutrition.svg",
|
||||
"color": "#e8e29a",
|
||||
},
|
||||
{
|
||||
"label": "Pendidikan",
|
||||
"image": "assets/icons/Education.svg",
|
||||
"color": "#efd8c6",
|
||||
},
|
||||
{
|
||||
"label": "Keselamatan",
|
||||
"image": "assets/icons/Safety.svg",
|
||||
"color": "#cef1da",
|
||||
},
|
||||
];
|
||||
|
||||
void _onMenuTapped(int index) {
|
||||
@ -143,7 +159,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
||||
),
|
||||
decoration: const InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: 'Cari konten...',
|
||||
hintText: 'Search...',
|
||||
hintStyle: TextStyle(color: Colors.grey),
|
||||
),
|
||||
),
|
||||
@ -172,7 +188,6 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
||||
final item = filteredCollections[index];
|
||||
return CollectionContainer(
|
||||
label: item["label"]!,
|
||||
lblSize: 11,
|
||||
imageSvg: item["image"]!,
|
||||
width: 30,
|
||||
height: 80,
|
||||
@ -252,10 +267,9 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
Text(
|
||||
'Topik ${index + 1}',
|
||||
'Topic ${index + 1}',
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 11,
|
||||
color: Color.fromARGB(255, 0, 0, 0),
|
||||
),
|
||||
),
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/bottom_navbar.dart';
|
||||
import 'package:furibase/components/main_menu.dart';
|
||||
import 'package:furibase/components/scan_button.dart';
|
||||
import 'package:furibase/helpers/pick_image.dart';
|
||||
import 'package:freekake/components/bottom_navbar.dart';
|
||||
import 'package:freekake/components/main_menu.dart';
|
||||
import 'package:freekake/components/scan_button.dart';
|
||||
import 'package:freekake/helpers/pick_image.dart';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
|
||||
class AkunSaya extends StatefulWidget {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user