mobile
This commit is contained in:
parent
64e1abb8db
commit
bf9a57f23b
@ -1,9 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/navbar_container.dart';
|
import 'package:freekake/components/navbar_container.dart';
|
||||||
import 'package:furibase/components/navbar_shape_1.dart';
|
import 'package:freekake/components/navbar_shape_1.dart';
|
||||||
import 'package:furibase/components/navbar_shape_2.dart';
|
import 'package:freekake/components/navbar_shape_2.dart';
|
||||||
import 'package:furibase/components/navbar_shape_3.dart';
|
import 'package:freekake/components/navbar_shape_3.dart';
|
||||||
import 'package:furibase/components/custom_shape.dart';
|
import 'package:freekake/components/custom_shape.dart';
|
||||||
|
|
||||||
class BottomNavbar extends StatefulWidget {
|
class BottomNavbar extends StatefulWidget {
|
||||||
const BottomNavbar({super.key});
|
const BottomNavbar({super.key});
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/navbar_shape_2.dart';
|
import 'package:freekake/components/navbar_shape_2.dart';
|
||||||
|
|
||||||
class CustomShape extends StatelessWidget {
|
class CustomShape extends StatelessWidget {
|
||||||
const CustomShape({super.key});
|
const CustomShape({super.key});
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/bottom_navbar.dart';
|
import 'package:freekake/components/bottom_navbar.dart';
|
||||||
import 'package:furibase/components/menu_button.dart';
|
import 'package:freekake/components/menu_button.dart';
|
||||||
import 'package:furibase/components/scan_button.dart';
|
import 'package:freekake/components/scan_button.dart';
|
||||||
import 'package:furibase/screen/Home_screen.dart';
|
import 'package:freekake/screen/Home_screen.dart';
|
||||||
import 'package:furibase/screen/koleksi_screen.dart';
|
import 'package:freekake/screen/koleksi_screen.dart';
|
||||||
import 'package:furibase/screen/pustaka_screen.dart';
|
import 'package:freekake/screen/pustaka_screen.dart';
|
||||||
import 'package:furibase/screen/saya/profile_screen.dart';
|
import 'package:freekake/screen/saya/profile_screen.dart';
|
||||||
|
|
||||||
class MainMenu extends StatelessWidget {
|
class MainMenu extends StatelessWidget {
|
||||||
const MainMenu({super.key});
|
const MainMenu({super.key});
|
||||||
@ -22,7 +22,7 @@ class MainMenu extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
MenuButton(
|
MenuButton(
|
||||||
label: "E-furibuddy",
|
label: "E-furibuddy",
|
||||||
icon: 'icons/furrybuddy.svg',
|
icon: 'assets/icons/furrybuddy.svg',
|
||||||
onPress:
|
onPress:
|
||||||
() => {
|
() => {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
@ -33,7 +33,7 @@ class MainMenu extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
MenuButton(
|
MenuButton(
|
||||||
label: "Koleksi",
|
label: "Koleksi",
|
||||||
icon: 'icons/koleksi.svg',
|
icon: 'assets/icons/koleksi.svg',
|
||||||
onPress:
|
onPress:
|
||||||
() => {
|
() => {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
@ -45,7 +45,7 @@ class MainMenu extends StatelessWidget {
|
|||||||
SizedBox(width: 120),
|
SizedBox(width: 120),
|
||||||
MenuButton(
|
MenuButton(
|
||||||
label: "Pustaka",
|
label: "Pustaka",
|
||||||
icon: 'icons/Pustaka.svg',
|
icon: 'assets/icons/Pustaka.svg',
|
||||||
onPress:
|
onPress:
|
||||||
() => {
|
() => {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
@ -56,7 +56,7 @@ class MainMenu extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
MenuButton(
|
MenuButton(
|
||||||
label: "Saya",
|
label: "Saya",
|
||||||
icon: 'icons/Saya.svg',
|
icon: 'assets/icons/Saya.svg',
|
||||||
onPress:
|
onPress:
|
||||||
() => {
|
() => {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
|
|||||||
@ -28,8 +28,8 @@ class MenuButton extends StatelessWidget {
|
|||||||
IconButton(
|
IconButton(
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
icon ?? '',
|
icon ?? '',
|
||||||
width: w ?? 28,
|
width: w ?? 24,
|
||||||
height: h ?? 28,
|
height: h ?? 24,
|
||||||
// allowDrawingOutsideViewBox: true,
|
// allowDrawingOutsideViewBox: true,
|
||||||
colorFilter: ColorFilter.mode(
|
colorFilter: ColorFilter.mode(
|
||||||
Color.fromARGB(255, 255, 255, 255),
|
Color.fromARGB(255, 255, 255, 255),
|
||||||
@ -43,6 +43,7 @@ class MenuButton extends StatelessWidget {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color.fromARGB(255, 239, 224, 232),
|
color: Color.fromARGB(255, 239, 224, 232),
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 10,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/navbar_shape_2.dart';
|
import 'package:freekake/components/navbar_shape_2.dart';
|
||||||
|
|
||||||
class NavbarContainer extends StatelessWidget {
|
class NavbarContainer extends StatelessWidget {
|
||||||
const NavbarContainer({super.key});
|
const NavbarContainer({super.key});
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class ScanButton extends StatelessWidget {
|
|||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(10),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
'icons/Scan.svg',
|
'assets/icons/Scan.svg',
|
||||||
width: 60,
|
width: 60,
|
||||||
height: 60,
|
height: 60,
|
||||||
colorFilter: ColorFilter.mode(
|
colorFilter: ColorFilter.mode(
|
||||||
|
|||||||
14
lib/helpers/image_picker_mobile.dart
Normal file
14
lib/helpers/image_picker_mobile.dart
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
|
||||||
|
class ImagePickerHelper {
|
||||||
|
Future<dynamic> pickImage() async {
|
||||||
|
final ImagePicker picker = ImagePicker();
|
||||||
|
final XFile? pickedFile = await picker.pickImage(source: ImageSource.gallery);
|
||||||
|
|
||||||
|
if (pickedFile != null) {
|
||||||
|
File imageFile = File(pickedFile.path);
|
||||||
|
return imageFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
5
lib/helpers/image_picker_stub.dart
Normal file
5
lib/helpers/image_picker_stub.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class ImagePickerHelper {
|
||||||
|
Future<void> pickImage() async {
|
||||||
|
throw UnsupportedError('pickImage is not supported on this platform');
|
||||||
|
}
|
||||||
|
}
|
||||||
35
lib/helpers/image_picker_web.dart
Normal file
35
lib/helpers/image_picker_web.dart
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// import 'package:image_picker_web/image_picker_web.dart';
|
||||||
|
// import 'dart:typed_data';
|
||||||
|
|
||||||
|
// class ImagePickerHelper {
|
||||||
|
// Future<dynamic> pickImage() async {
|
||||||
|
// Uint8List? bytesFromPicker = await ImagePickerWeb.getImageAsBytes();
|
||||||
|
// if (bytesFromPicker != null) {
|
||||||
|
// return bytesFromPicker;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
import 'dart:typed_data';
|
||||||
|
import 'dart:html' as html;
|
||||||
|
|
||||||
|
class ImagePickerHelper {
|
||||||
|
Future<void> pickImage() async {
|
||||||
|
html.FileUploadInputElement uploadInput = html.FileUploadInputElement();
|
||||||
|
uploadInput.accept = 'image/*';
|
||||||
|
uploadInput.click();
|
||||||
|
|
||||||
|
uploadInput.onChange.listen((event) async {
|
||||||
|
final file = uploadInput.files!.first;
|
||||||
|
final reader = html.FileReader();
|
||||||
|
|
||||||
|
reader.readAsArrayBuffer(file);
|
||||||
|
reader.onLoadEnd.listen((event) {
|
||||||
|
Uint8List imageBytes = reader.result as Uint8List;
|
||||||
|
if (imageBytes != null) {
|
||||||
|
return imageBytes;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
3
lib/helpers/pick_image.dart
Normal file
3
lib/helpers/pick_image.dart
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export 'image_picker_stub.dart'
|
||||||
|
if (dart.library.html) 'image_picker_web.dart'
|
||||||
|
if (dart.library.io) 'image_picker_mobile.dart';
|
||||||
@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/navbar_container.dart';
|
import 'package:freekake/components/navbar_container.dart';
|
||||||
import 'package:furibase/providers/character_provider.dart';
|
import 'package:freekake/providers/character_provider.dart';
|
||||||
import 'package:furibase/screen/Home_screen.dart';
|
import 'package:freekake/screen/Home_screen.dart';
|
||||||
import 'package:furibase/screen/drraw_screen.dart';
|
import 'package:freekake/screen/drraw_screen.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/bottom_navbar.dart';
|
import 'package:freekake/components/bottom_navbar.dart';
|
||||||
import 'package:furibase/components/buildcard_info.dart';
|
import 'package:freekake/components/buildcard_info.dart';
|
||||||
import 'package:furibase/components/main_menu.dart';
|
import 'package:freekake/components/main_menu.dart';
|
||||||
import 'package:furibase/components/scan_button.dart';
|
import 'package:freekake/components/scan_button.dart';
|
||||||
import 'package:furibase/components/topbar_container.dart';
|
import 'package:freekake/components/topbar_container.dart';
|
||||||
|
import 'package:flutter_unity_widget/flutter_unity_widget.dart';
|
||||||
|
|
||||||
class HomeScreen extends StatefulWidget {
|
class HomeScreen extends StatefulWidget {
|
||||||
HomeScreen({super.key});
|
HomeScreen({super.key});
|
||||||
@ -18,6 +19,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
double _sliderValue = 0.0;
|
double _sliderValue = 0.0;
|
||||||
static const Color transparent = Color(0xFFFFFFFF);
|
static const Color transparent = Color(0xFFFFFFFF);
|
||||||
// Image image
|
// Image image
|
||||||
|
late UnityWidgetController _unityWidgetController;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -71,14 +73,21 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
body: Stack(
|
body: Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: Container(
|
child: UnityWidget(
|
||||||
decoration: BoxDecoration(
|
onUnityCreated: onUnityCreated,
|
||||||
image: DecorationImage(
|
//isARScene: true,
|
||||||
image: AssetImage("images/background.jpeg"),
|
onUnityMessage: onUnityMessage,
|
||||||
fit: BoxFit.cover,
|
//onUnitySceneLoaded: onUnitySceneLoaded,
|
||||||
),
|
fullscreen: false,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
// child: Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// image: DecorationImage(
|
||||||
|
// image: AssetImage("assets/images/background.jpeg"),
|
||||||
|
// fit: BoxFit.cover,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
// Positioned(
|
// Positioned(
|
||||||
// top: 0,
|
// top: 0,
|
||||||
@ -107,7 +116,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
image: const DecorationImage(
|
image: const DecorationImage(
|
||||||
image: AssetImage('images/luffy-u.png'),
|
image: AssetImage('assets/images/luffy-u.png'),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -191,40 +200,40 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
// Positioned(
|
||||||
bottom: 150,
|
// bottom: 150,
|
||||||
left: 0,
|
// left: 0,
|
||||||
right: 0,
|
// right: 0,
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
Container(
|
// Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
// padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
color: Color.fromARGB(255, 247, 224, 236),
|
// color: Color.fromARGB(255, 247, 224, 236),
|
||||||
borderRadius: BorderRadius.circular(10),
|
// borderRadius: BorderRadius.circular(10),
|
||||||
boxShadow: [
|
// boxShadow: [
|
||||||
BoxShadow(
|
// BoxShadow(
|
||||||
color: Color.fromARGB(255, 214, 213, 121),
|
// color: Color.fromARGB(255, 214, 213, 121),
|
||||||
blurRadius: 5,
|
// blurRadius: 5,
|
||||||
spreadRadius: 2,
|
// spreadRadius: 2,
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
child: Text(
|
// child: Text(
|
||||||
"Halo....Jotaslim",
|
// "Halo....Jotaslim",
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontSize: 12,
|
// fontSize: 12,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
color: Color(0xFF000000),
|
// color: Color(0xFF000000),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 10),
|
// SizedBox(height: 10),
|
||||||
setHomeImage("images/luffy.png", 300),
|
// setHomeImage("images/luffy.png", 300),
|
||||||
// Image.asset("images/luffy.png", width: 300),
|
// // Image.asset("images/luffy.png", width: 300),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
// BG MEnu
|
// BG MEnu
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
@ -250,6 +259,14 @@ 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) {
|
// Widget _menuButton(String label, Widget icon) {
|
||||||
// return Expanded(
|
// return Expanded(
|
||||||
// child: Column(
|
// child: Column(
|
||||||
@ -290,7 +307,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
Widget setHomeImage(String src, double size) {
|
Widget setHomeImage(String src, double size) {
|
||||||
return Image.asset(src, width: size);
|
return Image.asset("assets/" + src, width: size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/collection_container.dart';
|
import 'package:freekake/components/collection_container.dart';
|
||||||
|
|
||||||
class CollectionCaraterScreen extends StatefulWidget {
|
class CollectionCaraterScreen extends StatefulWidget {
|
||||||
const CollectionCaraterScreen({super.key});
|
const CollectionCaraterScreen({super.key});
|
||||||
@ -22,7 +22,7 @@ class _CollectionCaraterScreenState extends State<CollectionCaraterScreen> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("Favorite", style: TextStyle(color: Colors.black)),
|
Text("Favorit", style: TextStyle(color: Colors.black)),
|
||||||
Divider(height: 20, color: Colors.transparent),
|
Divider(height: 20, color: Colors.transparent),
|
||||||
Row(
|
Row(
|
||||||
// alignment: WrapAlignment.spaceAround,
|
// alignment: WrapAlignment.spaceAround,
|
||||||
@ -31,19 +31,19 @@ class _CollectionCaraterScreenState extends State<CollectionCaraterScreen> {
|
|||||||
children: [
|
children: [
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Luffy",
|
label: "Luffy",
|
||||||
imagesrc: 'images/luffy.png',
|
imagesrc: 'assets/images/luffy.png',
|
||||||
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Oni Chan",
|
label: "Oni Chan",
|
||||||
imagesrc: 'images/klipartz.png',
|
imagesrc: 'assets/images/klipartz.png',
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(height: 20, color: Colors.transparent),
|
Divider(height: 20, color: Colors.transparent),
|
||||||
Text("All", style: TextStyle(color: Colors.black)),
|
Text("Semua", style: TextStyle(color: Colors.black)),
|
||||||
Divider(height: 20, color: Colors.transparent),
|
Divider(height: 20, color: Colors.transparent),
|
||||||
Row(
|
Row(
|
||||||
// alignment: WrapAlignment.spaceAround,
|
// alignment: WrapAlignment.spaceAround,
|
||||||
@ -52,18 +52,18 @@ class _CollectionCaraterScreenState extends State<CollectionCaraterScreen> {
|
|||||||
children: [
|
children: [
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Luffy",
|
label: "Luffy",
|
||||||
imagesrc: 'images/luffy.png',
|
imagesrc: 'assets/images/luffy.png',
|
||||||
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Oni Chan",
|
label: "Oni Chan",
|
||||||
imagesrc: 'images/klipartz.png',
|
imagesrc: 'assets/images/klipartz.png',
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Cepot",
|
label: "Cepot",
|
||||||
imagesrc: 'images/cepott.png',
|
imagesrc: 'assets/images/cepott.png',
|
||||||
colorContiner: Color.fromRGBO(237, 207, 100, 1.0),
|
colorContiner: Color.fromRGBO(237, 207, 100, 1.0),
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/collection_container.dart';
|
import 'package:freekake/components/collection_container.dart';
|
||||||
import 'package:furibase/helpers/color_helper.dart';
|
import 'package:freekake/helpers/color_helper.dart';
|
||||||
|
|
||||||
class CollectionFragmentScreen extends StatefulWidget {
|
class CollectionFragmentScreen extends StatefulWidget {
|
||||||
const CollectionFragmentScreen({super.key});
|
const CollectionFragmentScreen({super.key});
|
||||||
@ -29,13 +29,13 @@ class _CollectionFragmentScreenState extends State<CollectionFragmentScreen> {
|
|||||||
children: [
|
children: [
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Luffy",
|
label: "Luffy",
|
||||||
imagesrc: 'images/ft_luffy.png',
|
imagesrc: 'assets/images/ft_luffy.png',
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
colorContiner: ColorHelper.hexToColor("0xE2E5E9"),
|
colorContiner: ColorHelper.hexToColor("0xE2E5E9"),
|
||||||
),
|
),
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Oni Chan",
|
label: "Oni Chan",
|
||||||
imagesrc: 'images/ft_cepot.png',
|
imagesrc: 'assets/images/ft_cepot.png',
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
colorContiner: ColorHelper.hexToColor("0xE2E5E9"),
|
colorContiner: ColorHelper.hexToColor("0xE2E5E9"),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/collection_container.dart';
|
import 'package:freekake/components/collection_container.dart';
|
||||||
|
|
||||||
class CollectionSkinScreen extends StatefulWidget {
|
class CollectionSkinScreen extends StatefulWidget {
|
||||||
const CollectionSkinScreen({super.key});
|
const CollectionSkinScreen({super.key});
|
||||||
@ -32,27 +32,27 @@ class _CollectionSkinScreenState extends State<CollectionSkinScreen> {
|
|||||||
children: [
|
children: [
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Luffy Kimono",
|
label: "Luffy Kimono",
|
||||||
imagesrc: 'images/luffy-kimono.png',
|
imagesrc: 'assets/images/luffy-kimono.png',
|
||||||
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
|
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Luffy (Default)",
|
label: "Luffy (Default)",
|
||||||
imagesrc: 'images/luffy.png',
|
imagesrc: 'assets/images/luffy.png',
|
||||||
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Luffy King",
|
label: "Luffy King",
|
||||||
imagesrc: 'images/luffy-king.png',
|
imagesrc: 'assets/images/luffy-king.png',
|
||||||
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
colorContiner: Color.fromRGBO(12, 199, 215, 1),
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(height: 20, color: Colors.transparent),
|
Divider(height: 20, color: Colors.transparent),
|
||||||
Text("Others", style: TextStyle(color: Colors.black)),
|
Text("Lainnya", style: TextStyle(color: Colors.black)),
|
||||||
Divider(height: 10),
|
Divider(height: 10),
|
||||||
Row(
|
Row(
|
||||||
// alignment: WrapAlignment.start,
|
// alignment: WrapAlignment.start,
|
||||||
@ -61,12 +61,12 @@ class _CollectionSkinScreenState extends State<CollectionSkinScreen> {
|
|||||||
children: [
|
children: [
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Oni Chan (Default)",
|
label: "Oni Chan (Default)",
|
||||||
imagesrc: 'images/klipartz.png',
|
imagesrc: 'assets/images/klipartz.png',
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Cepot (Default)",
|
label: "Cepot (Default)",
|
||||||
imagesrc: 'images/cepott.png',
|
imagesrc: 'assets/images/cepott.png',
|
||||||
colorContiner: Color.fromRGBO(237, 207, 100, 1.0),
|
colorContiner: Color.fromRGBO(237, 207, 100, 1.0),
|
||||||
onTapAc: () => {},
|
onTapAc: () => {},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/navbar_container.dart';
|
import 'package:freekake/components/navbar_container.dart';
|
||||||
|
|
||||||
class DrawScreen extends StatelessWidget {
|
class DrawScreen extends StatelessWidget {
|
||||||
const DrawScreen({super.key});
|
const DrawScreen({super.key});
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/bottom_navbar.dart';
|
import 'package:freekake/components/bottom_navbar.dart';
|
||||||
import 'package:furibase/components/buildcard_info.dart';
|
import 'package:freekake/components/buildcard_info.dart';
|
||||||
import 'package:furibase/components/main_menu.dart';
|
import 'package:freekake/components/main_menu.dart';
|
||||||
import 'package:furibase/components/scan_button.dart';
|
import 'package:freekake/components/scan_button.dart';
|
||||||
import 'package:furibase/components/tab_menu.dart';
|
import 'package:freekake/components/tab_menu.dart';
|
||||||
import 'package:furibase/components/topbar_container.dart';
|
import 'package:freekake/components/topbar_container.dart';
|
||||||
import 'package:furibase/screen/collection/collection_caracter_screen.dart';
|
import 'package:freekake/screen/collection/collection_caracter_screen.dart';
|
||||||
import 'package:furibase/screen/collection/collection_fragment_screen.dart';
|
import 'package:freekake/screen/collection/collection_fragment_screen.dart';
|
||||||
import 'package:furibase/screen/collection/collection_skin_screen.dart';
|
import 'package:freekake/screen/collection/collection_skin_screen.dart';
|
||||||
|
|
||||||
class KoleksiScreen extends StatefulWidget {
|
class KoleksiScreen extends StatefulWidget {
|
||||||
const KoleksiScreen({super.key});
|
const KoleksiScreen({super.key});
|
||||||
|
|||||||
@ -39,7 +39,7 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'images/default.png', // Ganti dengan gambar yang sesuai
|
'assets/images/default.png', // Ganti dengan gambar yang sesuai
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 100,
|
height: 100,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/buildcard_info.dart';
|
import 'package:freekake/components/buildcard_info.dart';
|
||||||
import 'package:furibase/components/card_list.dart';
|
import 'package:freekake/components/card_list.dart';
|
||||||
import 'package:furibase/components/collection_container%20copy.dart';
|
import 'package:freekake/components/collection_container%20copy.dart';
|
||||||
import 'package:furibase/components/main_menu.dart';
|
import 'package:freekake/components/main_menu.dart';
|
||||||
import 'package:furibase/components/topbar_container.dart';
|
import 'package:freekake/components/topbar_container.dart';
|
||||||
import 'package:furibase/screen/pustaka/pustaka_detail_screen.dart';
|
import 'package:freekake/screen/pustaka/pustaka_detail_screen.dart';
|
||||||
|
|
||||||
class ListEducation extends StatefulWidget {
|
class ListEducation extends StatefulWidget {
|
||||||
const ListEducation({super.key});
|
const ListEducation({super.key});
|
||||||
@ -44,10 +44,10 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
String _searchQuery = "";
|
String _searchQuery = "";
|
||||||
final List<Map<String, String>> _collections = [
|
final List<Map<String, String>> _collections = [
|
||||||
{"label": "Kesehatan", "image": "icons/healthy.svg"},
|
{"label": "Kesehatan", "image": "assets/icons/healthy.svg"},
|
||||||
{"label": "Gizi", "image": "icons/Nutrition.svg"},
|
{"label": "Gizi", "image": "assets/icons/Nutrition.svg"},
|
||||||
{"label": "Pendidikan", "image": "icons/Education.svg"},
|
{"label": "Pendidikan", "image": "assets/icons/Education.svg"},
|
||||||
{"label": "Keselamatan", "image": "icons/Safety.svg"},
|
{"label": "Keselamatan", "image": "assets/icons/Safety.svg"},
|
||||||
];
|
];
|
||||||
List<Map<String, String>> filteredCollections =
|
List<Map<String, String>> filteredCollections =
|
||||||
_collections
|
_collections
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/buildcard_info.dart';
|
import 'package:freekakes/components/buildcard_info.dart';
|
||||||
import 'package:furibase/components/collection_container.dart';
|
import 'package:freekake/components/collection_container.dart';
|
||||||
|
|
||||||
class DetailScreen extends StatefulWidget {
|
class DetailScreen extends StatefulWidget {
|
||||||
final String title;
|
final String title;
|
||||||
|
|||||||
@ -108,7 +108,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
children: [
|
children: [
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Luffy",
|
label: "Luffy",
|
||||||
imagesrc: 'images/luffy.png',
|
imagesrc: 'assets/images/luffy.png',
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 100,
|
height: 100,
|
||||||
onTapAc:
|
onTapAc:
|
||||||
|
|||||||
@ -108,7 +108,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
children: [
|
children: [
|
||||||
CollectionContainer(
|
CollectionContainer(
|
||||||
label: "Luffy",
|
label: "Luffy",
|
||||||
imagesrc: 'images/luffy.png',
|
imagesrc: 'assets/images/luffy.png',
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 100,
|
height: 100,
|
||||||
onTapAc:
|
onTapAc:
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/bottom_navbar.dart';
|
import 'package:freekake/components/bottom_navbar.dart';
|
||||||
import 'package:furibase/components/buildcard_info.dart';
|
import 'package:freekake/components/buildcard_info.dart';
|
||||||
import 'package:furibase/components/collection_container.dart';
|
import 'package:freekake/components/collection_container.dart';
|
||||||
import 'package:furibase/components/main_menu.dart';
|
import 'package:freekake/components/main_menu.dart';
|
||||||
import 'package:furibase/components/scan_button.dart';
|
import 'package:freekake/components/scan_button.dart';
|
||||||
import 'package:furibase/components/topbar_container.dart';
|
import 'package:freekake/components/topbar_container.dart';
|
||||||
import 'package:furibase/helpers/color_helper.dart';
|
import 'package:freekake/helpers/color_helper.dart';
|
||||||
import 'package:furibase/screen/pustaka/list_education.dart';
|
import 'package:freekake/screen/pustaka/list_education.dart';
|
||||||
|
|
||||||
class PustakaScreen extends StatefulWidget {
|
class PustakaScreen extends StatefulWidget {
|
||||||
const PustakaScreen({super.key});
|
const PustakaScreen({super.key});
|
||||||
@ -22,10 +22,10 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
String _searchQuery = "";
|
String _searchQuery = "";
|
||||||
|
|
||||||
final List<Map<String, dynamic>> _collections = [
|
final List<Map<String, dynamic>> _collections = [
|
||||||
{"label": "Kesehatan", "image": "icons/healthy.svg", "color": "#cdd0ee"},
|
{"label": "Kesehatan", "image": "assets/icons/healthy.svg", "color": "#cdd0ee"},
|
||||||
{"label": "Gizi", "image": "icons/Nutrition.svg", "color": "#e8e29a"},
|
{"label": "Gizi", "image": "assets/icons/Nutrition.svg", "color": "#e8e29a"},
|
||||||
{"label": "Pendidikan", "image": "icons/Education.svg", "color": "#efd8c6"},
|
{"label": "Pendidikan", "image": "assets/icons/Education.svg", "color": "#efd8c6"},
|
||||||
{"label": "Keselamatan", "image": "icons/Safety.svg", "color": "#cef1da"},
|
{"label": "Keselamatan", "image": "assets/icons/Safety.svg", "color": "#cef1da"},
|
||||||
];
|
];
|
||||||
|
|
||||||
void _onMenuTapped(int index) {
|
void _onMenuTapped(int index) {
|
||||||
@ -131,7 +131,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
),
|
),
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText: 'Search...',
|
hintText: 'Cari konten...',
|
||||||
hintStyle: TextStyle(color: Colors.grey),
|
hintStyle: TextStyle(color: Colors.grey),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -160,6 +160,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
final item = filteredCollections[index];
|
final item = filteredCollections[index];
|
||||||
return CollectionContainer(
|
return CollectionContainer(
|
||||||
label: item["label"]!,
|
label: item["label"]!,
|
||||||
|
lblSize: 11,
|
||||||
imageSvg: item["image"]!,
|
imageSvg: item["image"]!,
|
||||||
width: 30,
|
width: 30,
|
||||||
height: 80,
|
height: 80,
|
||||||
@ -213,7 +214,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("List Topic", style: TextStyle(color: Colors.black)),
|
Text("Daftar Topik", style: TextStyle(color: Colors.black)),
|
||||||
Divider(color: Colors.transparent),
|
Divider(color: Colors.transparent),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -264,9 +265,10 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
color: Colors.blueAccent,
|
color: Colors.blueAccent,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'Topic ' + (index + 1).toString(),
|
'Topik ' + (index + 1).toString(),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 11,
|
||||||
color: Color.fromARGB(255, 0, 0, 0),
|
color: Color.fromARGB(255, 0, 0, 0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
211
lib/screen/saya/akun_saya copy.dart
Normal file
211
lib/screen/saya/akun_saya copy.dart
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
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:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
|
class AkunSaya extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_AkunSayaState createState() => _AkunSayaState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AkunSayaState extends State<AkunSaya> {
|
||||||
|
dynamic _profileImage;
|
||||||
|
dynamic _headerImage;
|
||||||
|
//final ImagePicker _picker = ImagePicker();
|
||||||
|
|
||||||
|
Future<void> _pickImage(bool isProfile) async {
|
||||||
|
final imagePicker = ImagePickerHelper();
|
||||||
|
dynamic pic = await imagePicker.pickImage();
|
||||||
|
|
||||||
|
if (pic != null) {
|
||||||
|
setState(() {
|
||||||
|
if (isProfile) {
|
||||||
|
_profileImage = pic;
|
||||||
|
} else {
|
||||||
|
_headerImage = pic;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text("Saya"),
|
||||||
|
backgroundColor: Color.fromARGB(225, 79, 76, 182),
|
||||||
|
),
|
||||||
|
backgroundColor: const Color.fromARGB(255, 255, 255, 255),
|
||||||
|
body: Stack(
|
||||||
|
children: [
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 20.0, left: 20, right: 20),
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.7,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: const Color.fromARGB(255, 205, 202, 189),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(20),
|
||||||
|
topRight: Radius.circular(20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
// Header image (bisa diubah)
|
||||||
|
SizedBox(
|
||||||
|
height: 80,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(40),
|
||||||
|
bottomRight: Radius.circular(40),
|
||||||
|
),
|
||||||
|
color: Color.fromARGB(225, 79, 76, 182),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 40),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(20),
|
||||||
|
child: ListView(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 40),
|
||||||
|
children: [
|
||||||
|
TextFormField(
|
||||||
|
initialValue: "Cepot",
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
border: UnderlineInputBorder(),
|
||||||
|
labelText: 'Nama',
|
||||||
|
labelStyle: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
style: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
initialValue: "cpt09",
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
border: UnderlineInputBorder(),
|
||||||
|
labelText: 'Nama Pengguna',
|
||||||
|
labelStyle: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
style: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
|
||||||
|
TextFormField(
|
||||||
|
initialValue: "Jl. Sentosa jaya",
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
border: UnderlineInputBorder(),
|
||||||
|
labelText: 'Alamat',
|
||||||
|
labelStyle: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
style: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
|
||||||
|
TextFormField(
|
||||||
|
initialValue: "******",
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
border: UnderlineInputBorder(),
|
||||||
|
labelText: 'Kata Sandi',
|
||||||
|
labelStyle: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
style: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
initialValue: "+62923",
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
border: UnderlineInputBorder(),
|
||||||
|
labelText: 'No. HP',
|
||||||
|
labelStyle: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
style: TextStyle(color: Colors.black),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// Profile Picture (bisa diubah)
|
||||||
|
Positioned(
|
||||||
|
top: 25,
|
||||||
|
left: MediaQuery.of(context).size.width / 2 - 50,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () => _pickImage(true),
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.bottomRight,
|
||||||
|
children: [
|
||||||
|
CircleAvatar(
|
||||||
|
radius: 50,
|
||||||
|
backgroundColor: Colors.grey[300],
|
||||||
|
backgroundImage:
|
||||||
|
_profileImage != null
|
||||||
|
? (kIsWeb
|
||||||
|
? MemoryImage(_profileImage) as ImageProvider
|
||||||
|
: FileImage(_profileImage) as ImageProvider)
|
||||||
|
: null,
|
||||||
|
child:
|
||||||
|
_profileImage == null
|
||||||
|
? Icon(Icons.person, size: 50, color: Colors.white)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
CircleAvatar(
|
||||||
|
radius: 15,
|
||||||
|
backgroundColor: Colors.blue,
|
||||||
|
child: Icon(Icons.edit, color: Colors.white, size: 15),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Positioned(
|
||||||
|
top: 130,
|
||||||
|
left: MediaQuery.of(context).size.width / 2 - 50,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () => _pickImage(true),
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.bottomRight,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Nama Akun",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.deepPurple,
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildListItem(IconData icon, String label, {bool isLogout = false}) {
|
||||||
|
return ListTile(
|
||||||
|
leading: Icon(
|
||||||
|
icon,
|
||||||
|
color:
|
||||||
|
isLogout
|
||||||
|
? const Color.fromARGB(255, 181, 47, 47)
|
||||||
|
: const Color.fromARGB(255, 255, 255, 255),
|
||||||
|
),
|
||||||
|
title: Text(label, style: TextStyle(fontSize: 16, color: Colors.black)),
|
||||||
|
trailing: Icon(Icons.arrow_forward_ios, size: 16),
|
||||||
|
onTap: () {},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,13 +1,12 @@
|
|||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/bottom_navbar.dart';
|
import 'package:freekake/components/bottom_navbar.dart';
|
||||||
import 'package:furibase/components/main_menu.dart';
|
import 'package:freekake/components/main_menu.dart';
|
||||||
import 'package:furibase/components/scan_button.dart';
|
import 'package:freekake/components/scan_button.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:image_picker_web/image_picker_web.dart';
|
|
||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class AkunSaya extends StatefulWidget {
|
class AkunSaya extends StatefulWidget {
|
||||||
@ -22,16 +21,16 @@ class _AkunSayaState extends State<AkunSaya> {
|
|||||||
|
|
||||||
Future<void> _pickImage(bool isProfile) async {
|
Future<void> _pickImage(bool isProfile) async {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
Uint8List? bytesFromPicker = await ImagePickerWeb.getImageAsBytes();
|
// Uint8List? bytesFromPicker = await ImagePickerWeb.getImageAsBytes();
|
||||||
if (bytesFromPicker != null) {
|
// if (bytesFromPicker != null) {
|
||||||
setState(() {
|
// setState(() {
|
||||||
if (isProfile) {
|
// if (isProfile) {
|
||||||
_profileImage = bytesFromPicker;
|
// _profileImage = bytesFromPicker;
|
||||||
} else {
|
// } else {
|
||||||
_headerImage = bytesFromPicker;
|
// _headerImage = bytesFromPicker;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
final pickedFile = await _picker.pickImage(source: ImageSource.gallery);
|
final pickedFile = await _picker.pickImage(source: ImageSource.gallery);
|
||||||
if (pickedFile != null) {
|
if (pickedFile != null) {
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class _ProfileScreenState extends State<ProfileScreenCopy> {
|
|||||||
as ImageProvider
|
as ImageProvider
|
||||||
: FileImage(_headerImage)
|
: FileImage(_headerImage)
|
||||||
as ImageProvider)
|
as ImageProvider)
|
||||||
: AssetImage('images/background.jpeg'),
|
: AssetImage('assets/images/background.jpeg'),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -2,15 +2,14 @@ import 'dart:typed_data';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_html/flutter_html.dart';
|
import 'package:flutter_html/flutter_html.dart';
|
||||||
import 'package:furibase/components/bottom_navbar.dart';
|
import 'package:freekake/components/bottom_navbar.dart';
|
||||||
import 'package:furibase/components/main_menu.dart';
|
import 'package:freekake/components/main_menu.dart';
|
||||||
import 'package:furibase/components/scan_button.dart';
|
import 'package:freekake/components/scan_button.dart';
|
||||||
import 'package:furibase/components/topbar_container.dart';
|
import 'package:freekake/components/topbar_container.dart';
|
||||||
import 'package:furibase/screen/saya/akun_saya.dart';
|
import 'package:freekake/screen/saya/akun_saya.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:image_picker_web/image_picker_web.dart';
|
|
||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class ProfileScreen extends StatefulWidget {
|
class ProfileScreen extends StatefulWidget {
|
||||||
@ -28,16 +27,16 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
|
|
||||||
Future<void> _pickImage(bool isProfile) async {
|
Future<void> _pickImage(bool isProfile) async {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
Uint8List? bytesFromPicker = await ImagePickerWeb.getImageAsBytes();
|
// Uint8List? bytesFromPicker = await ImagePickerWeb.getImageAsBytes();
|
||||||
if (bytesFromPicker != null) {
|
// if (bytesFromPicker != null) {
|
||||||
setState(() {
|
// setState(() {
|
||||||
if (isProfile) {
|
// if (isProfile) {
|
||||||
_profileImage = bytesFromPicker;
|
// _profileImage = bytesFromPicker;
|
||||||
} else {
|
// } else {
|
||||||
_headerImage = bytesFromPicker;
|
// _headerImage = bytesFromPicker;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
final pickedFile = await _picker.pickImage(source: ImageSource.gallery);
|
final pickedFile = await _picker.pickImage(source: ImageSource.gallery);
|
||||||
if (pickedFile != null) {
|
if (pickedFile != null) {
|
||||||
|
|||||||
26
pubspec.yaml
26
pubspec.yaml
@ -1,4 +1,4 @@
|
|||||||
name: furibase
|
name: freekake
|
||||||
description: "A new Flutter project."
|
description: "A new Flutter project."
|
||||||
# The following line prevents the package from being accidentally published to
|
# The following line prevents the package from being accidentally published to
|
||||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||||
@ -48,6 +48,11 @@ dependencies:
|
|||||||
# arcore_flutter_plugin:
|
# arcore_flutter_plugin:
|
||||||
# git:
|
# git:
|
||||||
# url: https://github.com/giandifra/arcore_flutter_plugin.git
|
# url: https://github.com/giandifra/arcore_flutter_plugin.git
|
||||||
|
flutter_unity_widget: ^2022.2.1
|
||||||
|
# flutter_unity_widget:
|
||||||
|
# git:
|
||||||
|
# url: https://github.com/juicycleff/flutter-unity-view-widget.git
|
||||||
|
# ref: flutter_3.24_android_hotfix
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@ -75,6 +80,25 @@ flutter:
|
|||||||
# assets:
|
# assets:
|
||||||
# - images/a_dot_burr.jpeg
|
# - images/a_dot_burr.jpeg
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
assets:
|
||||||
|
- assets/icons/furrybuddy.svg
|
||||||
|
- assets/icons/Scan.svg
|
||||||
|
- assets/icons/Saya.svg
|
||||||
|
- assets/icons/Pustaka.svg
|
||||||
|
- assets/icons/koleksi.svg
|
||||||
|
- assets/icons/healthy.svg
|
||||||
|
- assets/icons/Nutrition.svg
|
||||||
|
- assets/icons/Education.svg
|
||||||
|
- assets/icons/Safety.svg
|
||||||
|
- assets/images/luffy.png
|
||||||
|
- assets/images/background.jpeg
|
||||||
|
- assets/images/luffy-u.png
|
||||||
|
- assets/images/klipartz.png
|
||||||
|
- assets/images/cepott.png
|
||||||
|
- assets/images/ft_luffy.png
|
||||||
|
- assets/images/ft_cepot.png
|
||||||
|
- assets/images/luffy-kimono.png
|
||||||
|
- assets/images/luffy-king.png
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/to/resolution-aware-images
|
# https://flutter.dev/to/resolution-aware-images
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user