freekake basename
This commit is contained in:
+209
-230
@@ -1,12 +1,12 @@
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/bottom_navbar.dart';
|
||||
import 'package:furibase/components/buildcard_info.dart';
|
||||
import 'package:furibase/components/main_menu.dart';
|
||||
import 'package:furibase/components/scan_button.dart';
|
||||
import 'package:freekake/components/bottom_navbar.dart';
|
||||
import 'package:freekake/components/buildcard_info.dart';
|
||||
import 'package:freekake/components/main_menu.dart';
|
||||
import 'package:freekake/components/scan_button.dart';
|
||||
|
||||
class HomeScreen extends StatefulWidget {
|
||||
HomeScreen({super.key});
|
||||
const HomeScreen({super.key});
|
||||
|
||||
@override
|
||||
State<HomeScreen> createState() => _HomeScreenState();
|
||||
@@ -14,7 +14,7 @@ class HomeScreen extends StatefulWidget {
|
||||
|
||||
class _HomeScreenState extends State<HomeScreen> {
|
||||
final String username = "User01";
|
||||
double _sliderValue = 0.0;
|
||||
final double _sliderValue = 0.0;
|
||||
static const Color transparent = Color(0xFFFFFFFF);
|
||||
// Image image
|
||||
|
||||
@@ -77,235 +77,214 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
body: Stack(
|
||||
children: <Widget>[
|
||||
Positioned.fill(
|
||||
child: RepaintBoundary(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: const DecorationImage(
|
||||
image: AssetImage("assets/images/background.jpeg"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// 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,
|
||||
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(
|
||||
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/luffy.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(
|
||||
// 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, -30),
|
||||
child: ScanButton(),
|
||||
),
|
||||
),
|
||||
],
|
||||
body: homeBody(
|
||||
context,
|
||||
isLandscape,
|
||||
bottomOffset,
|
||||
bottomPadding,
|
||||
screenWidth,
|
||||
buttonScanSize,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 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,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
Stack homeBody(
|
||||
BuildContext context,
|
||||
bool isLandscape,
|
||||
double bottomOffset,
|
||||
double bottomPadding,
|
||||
double screenWidth,
|
||||
double buttonScanSize,
|
||||
) {
|
||||
return Stack(
|
||||
children: <Widget>[
|
||||
Positioned.fill(
|
||||
child: RepaintBoundary(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/background.jpeg"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// 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,
|
||||
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(
|
||||
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/luffy.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()),
|
||||
|
||||
// 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: () {},
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
Positioned(
|
||||
// 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, -30),
|
||||
child: ScanButton(),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget setHomeImage(String src, double size) {
|
||||
return Image.asset(src, width: size);
|
||||
|
||||
@@ -5,6 +5,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
|
||||
class CameraScreen extends StatefulWidget {
|
||||
const CameraScreen({super.key});
|
||||
|
||||
@override
|
||||
_CameraScreenState createState() => _CameraScreenState();
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ class CharacterView extends StatefulWidget {
|
||||
final String content;
|
||||
|
||||
const CharacterView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.imagePath,
|
||||
required this.content,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
_CharacterViewState createState() => _CharacterViewState();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/collection_container.dart';
|
||||
import 'package:freekake/components/collection_container.dart';
|
||||
|
||||
class CollectionCaraterScreen extends StatefulWidget {
|
||||
const CollectionCaraterScreen({super.key});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/collection_container.dart';
|
||||
import 'package:furibase/helpers/color_helper.dart';
|
||||
import 'package:freekake/components/collection_container.dart';
|
||||
import 'package:freekake/helpers/color_helper.dart';
|
||||
|
||||
class CollectionFragmentScreen extends StatefulWidget {
|
||||
const CollectionFragmentScreen({super.key});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/collection_container.dart';
|
||||
import 'package:freekake/components/collection_container.dart';
|
||||
|
||||
class CollectionSkinScreen extends StatefulWidget {
|
||||
const CollectionSkinScreen({super.key});
|
||||
@@ -11,7 +11,7 @@ class CollectionSkinScreen extends StatefulWidget {
|
||||
class _CollectionSkinScreenState extends State<CollectionSkinScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return SizedBox(
|
||||
// scrollDirection: Axis.horizontal,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Column(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/navbar_container.dart';
|
||||
import 'package:freekake/components/navbar_container.dart';
|
||||
|
||||
class DrawScreen extends StatelessWidget {
|
||||
const DrawScreen({super.key});
|
||||
|
||||
+127
-119
@@ -1,14 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/bottom_navbar.dart';
|
||||
import 'package:furibase/components/buildcard_info.dart';
|
||||
import 'package:furibase/components/curve_bottom_border_tab.dart';
|
||||
import 'package:furibase/components/main_menu.dart';
|
||||
import 'package:furibase/components/scan_button.dart';
|
||||
import 'package:furibase/components/tab_menu.dart';
|
||||
import 'package:furibase/components/topbar_container.dart';
|
||||
import 'package:furibase/screen/collection/collection_caracter_screen.dart';
|
||||
import 'package:furibase/screen/collection/collection_fragment_screen.dart';
|
||||
import 'package:furibase/screen/collection/collection_skin_screen.dart';
|
||||
import 'package:freekake/components/bottom_navbar.dart';
|
||||
import 'package:freekake/components/buildcard_info.dart';
|
||||
import 'package:freekake/components/curve_bottom_border_tab.dart';
|
||||
import 'package:freekake/components/main_menu.dart';
|
||||
import 'package:freekake/components/scan_button.dart';
|
||||
import 'package:freekake/components/tab_menu.dart';
|
||||
import 'package:freekake/components/topbar_container.dart';
|
||||
import 'package:freekake/screen/collection/collection_caracter_screen.dart';
|
||||
import 'package:freekake/screen/collection/collection_fragment_screen.dart';
|
||||
import 'package:freekake/screen/collection/collection_skin_screen.dart';
|
||||
|
||||
class KoleksiScreen extends StatefulWidget {
|
||||
const KoleksiScreen({super.key});
|
||||
@@ -41,127 +41,135 @@ class _KoleksiScreenState extends State<KoleksiScreen> {
|
||||
final double bottomPadding = (9000 / screenWidth).clamp(0, 0.2);
|
||||
return Scaffold(
|
||||
extendBody: true,
|
||||
body: Stack(
|
||||
children: <Widget>[
|
||||
Positioned.fill(
|
||||
child: Container(color: const Color.fromARGB(255, 255, 255, 255)),
|
||||
),
|
||||
Positioned.fill(
|
||||
top: 30,
|
||||
child: PageView(
|
||||
controller: _pageController,
|
||||
onPageChanged: (index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
});
|
||||
},
|
||||
children: [
|
||||
const CollectionCaraterScreen(),
|
||||
const CollectionSkinScreen(),
|
||||
const CollectionFragmentScreen(),
|
||||
],
|
||||
),
|
||||
),
|
||||
// BG MEnu
|
||||
Stack(
|
||||
body: koleksiBody(bottomPadding, screenWidth, buttonScanSize),
|
||||
);
|
||||
}
|
||||
|
||||
Stack koleksiBody(
|
||||
double bottomPadding,
|
||||
double screenWidth,
|
||||
double buttonScanSize,
|
||||
) {
|
||||
return Stack(
|
||||
children: <Widget>[
|
||||
Positioned.fill(
|
||||
child: Container(color: const Color.fromARGB(255, 255, 255, 255)),
|
||||
),
|
||||
Positioned.fill(
|
||||
top: 30,
|
||||
child: PageView(
|
||||
controller: _pageController,
|
||||
onPageChanged: (index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
});
|
||||
},
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: SizedBox(height: 85, child: BottomNavbar()),
|
||||
const CollectionCaraterScreen(),
|
||||
const CollectionSkinScreen(),
|
||||
const CollectionFragmentScreen(),
|
||||
],
|
||||
),
|
||||
),
|
||||
// BG MEnu
|
||||
Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: SizedBox(height: 85, child: BottomNavbar()),
|
||||
),
|
||||
],
|
||||
),
|
||||
//TopBar
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: SizedBox(height: 130, child: TopbarContainer()),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
top: 10,
|
||||
left: 10,
|
||||
right: 10,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
BuildcardInfo(
|
||||
icon: Icons.person,
|
||||
text: 'User01',
|
||||
extraIcon: Icons.emoji_events,
|
||||
extraText: "5000",
|
||||
width: 180,
|
||||
),
|
||||
BuildcardInfo(
|
||||
icon: Icons.monetization_on,
|
||||
text: "1.300",
|
||||
width: 90,
|
||||
),
|
||||
],
|
||||
),
|
||||
//TopBar
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: SizedBox(height: 130, child: TopbarContainer()),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
top: 10,
|
||||
left: 10,
|
||||
right: 10,
|
||||
),
|
||||
// Positioned.fill(
|
||||
// top: 30,
|
||||
// child: PageView(
|
||||
// controller: _pageController,
|
||||
// onPageChanged: (index) {
|
||||
// setState(() {
|
||||
// _selectedIndex = index;
|
||||
// });
|
||||
// },
|
||||
// children: [
|
||||
// const CollectionCaraterScreen(),
|
||||
// const CollectionSkinScreen(),
|
||||
// const CollectionFragmentScreen(),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
Positioned(
|
||||
top: 70,
|
||||
left: 10,
|
||||
right: 10,
|
||||
child: Container(
|
||||
// decoration: const BoxDecoration(
|
||||
// borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
// color: Color.fromARGB(116, 125, 129, 133),
|
||||
// ),
|
||||
padding: const EdgeInsets.all(1),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
BuildcardInfo(
|
||||
icon: Icons.person,
|
||||
text: 'User01',
|
||||
extraIcon: Icons.emoji_events,
|
||||
extraText: "5000",
|
||||
width: 180,
|
||||
CurvedBottomBorderTab(
|
||||
label: "Karakter",
|
||||
isSelected: _selectedIndex == 0,
|
||||
tap: () => _onMenuTapped(0),
|
||||
),
|
||||
BuildcardInfo(
|
||||
icon: Icons.monetization_on,
|
||||
text: "1.300",
|
||||
width: 90,
|
||||
CurvedBottomBorderTab(
|
||||
label: "Skin",
|
||||
isSelected: _selectedIndex == 1,
|
||||
tap: () => _onMenuTapped(1),
|
||||
),
|
||||
CurvedBottomBorderTab(
|
||||
label: "Fragment",
|
||||
isSelected: _selectedIndex == 2,
|
||||
tap: () => _onMenuTapped(2),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Positioned.fill(
|
||||
// top: 30,
|
||||
// child: PageView(
|
||||
// controller: _pageController,
|
||||
// onPageChanged: (index) {
|
||||
// setState(() {
|
||||
// _selectedIndex = index;
|
||||
// });
|
||||
// },
|
||||
// children: [
|
||||
// const CollectionCaraterScreen(),
|
||||
// const CollectionSkinScreen(),
|
||||
// const CollectionFragmentScreen(),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
Positioned(
|
||||
top: 70,
|
||||
left: 10,
|
||||
right: 10,
|
||||
child: Container(
|
||||
// decoration: const BoxDecoration(
|
||||
// borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
// color: Color.fromARGB(116, 125, 129, 133),
|
||||
// ),
|
||||
padding: const EdgeInsets.all(1),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
CurvedBottomBorderTab(
|
||||
label: "Karakter",
|
||||
isSelected: _selectedIndex == 0,
|
||||
tap: () => _onMenuTapped(0),
|
||||
),
|
||||
CurvedBottomBorderTab(
|
||||
label: "Skin",
|
||||
isSelected: _selectedIndex == 1,
|
||||
tap: () => _onMenuTapped(1),
|
||||
),
|
||||
CurvedBottomBorderTab(
|
||||
label: "Fragment",
|
||||
isSelected: _selectedIndex == 2,
|
||||
tap: () => _onMenuTapped(2),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(bottom: 0, left: 0, right: 0, child: MainMenu()),
|
||||
Positioned(
|
||||
bottom: bottomPadding * 98,
|
||||
left: (screenWidth - buttonScanSize) / 2,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, -20),
|
||||
child: ScanButton(),
|
||||
),
|
||||
Positioned(bottom: 0, left: 0, right: 0, child: MainMenu()),
|
||||
Positioned(
|
||||
bottom: bottomPadding * 98,
|
||||
left: (screenWidth - buttonScanSize) / 2,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, -20),
|
||||
child: ScanButton(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:furibase/components/card_list.dart';
|
||||
import 'package:furibase/components/collection_container%20copy.dart';
|
||||
// import 'package:furibase/components/main_menu.dart';
|
||||
// import 'package:furibase/components/topbar_container.dart';
|
||||
import 'package:furibase/helpers/color_helper.dart';
|
||||
import 'package:freekake/components/card_list.dart';
|
||||
import 'package:freekake/components/collection_container%20copy.dart';
|
||||
// import 'package:freekake/components/main_menu.dart';
|
||||
// import 'package:freekake/components/topbar_container.dart';
|
||||
import 'package:freekake/helpers/color_helper.dart';
|
||||
import 'package:list_detail_extension/list_detail_extension.dart';
|
||||
|
||||
// import 'package:furibase/screen/pustaka/pustaka_detail_screen.dart';
|
||||
// import 'package:freekake/screen/pustaka/pustaka_detail_screen.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
|
||||
@@ -85,7 +85,7 @@ class _ListEducationState extends State<ListEducation> {
|
||||
}
|
||||
|
||||
void _loadContent(String path) async {
|
||||
if (_shouldShowWebView && _controller != null) {
|
||||
if (_shouldShowWebView) {
|
||||
if (path.startsWith('http')) {
|
||||
// Load dari Internet
|
||||
_controller.loadRequest(Uri.parse(path));
|
||||
@@ -124,8 +124,8 @@ class _ListEducationState extends State<ListEducation> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String _searchQuery = "";
|
||||
final List<Map<String, dynamic>> _collections = [
|
||||
String searchQuery = "";
|
||||
final List<Map<String, dynamic>> collections = [
|
||||
{
|
||||
"label": "Kesehatan",
|
||||
"image": "assets/icons/healthy.svg",
|
||||
@@ -153,14 +153,14 @@ class _ListEducationState extends State<ListEducation> {
|
||||
];
|
||||
|
||||
final List<Map<String, dynamic>> filteredCollections =
|
||||
_collections
|
||||
collections
|
||||
.where(
|
||||
(item) => item["label"].toLowerCase().contains(
|
||||
_searchQuery.toLowerCase(),
|
||||
searchQuery.toLowerCase(),
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
if (_shouldShowWebView && _controller != null) {
|
||||
if (_shouldShowWebView) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Color.fromARGB(225, 79, 76, 182),
|
||||
@@ -174,215 +174,10 @@ class _ListEducationState extends State<ListEducation> {
|
||||
body: Column(
|
||||
children: [
|
||||
// Header Section
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 150,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromARGB(225, 79, 76, 182),
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25),
|
||||
bottomRight: Radius.circular(25),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Container(
|
||||
height: 47,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: Colors.grey.shade200,
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.search,
|
||||
color: Color.fromARGB(137, 180, 172, 172),
|
||||
size: 18,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: searchController,
|
||||
onChanged:
|
||||
filterSearch, // Memanggil filter saat mengetik
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
),
|
||||
decoration: const InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: 'Cari pelajaran...',
|
||||
hintStyle: TextStyle(color: Colors.black54),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (searchController.text.isNotEmpty)
|
||||
IconButton(
|
||||
icon: const Icon(
|
||||
Icons.close,
|
||||
color: Colors.black54,
|
||||
),
|
||||
onPressed: () {
|
||||
searchController.clear();
|
||||
filterSearch('');
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children:
|
||||
filteredCollections.map((item) {
|
||||
return CollectionContainer(
|
||||
label: item["label"]!,
|
||||
imageSvg: item["image"]!,
|
||||
iconw: 20,
|
||||
iconh: 20,
|
||||
width: 70,
|
||||
height: 70,
|
||||
textColor: Colors.black,
|
||||
lblSize: 10,
|
||||
colorContiner: ColorHelper.hexToColor(
|
||||
item["color"],
|
||||
),
|
||||
onTapAc:
|
||||
() => {
|
||||
searchController.clear(),
|
||||
filterByCategory(item["category"]),
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
headerContainer(context, filteredCollections),
|
||||
// Collection Items dengan Filter
|
||||
SizedBox(height: 20),
|
||||
Expanded(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromARGB(223, 200, 200, 206),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(25),
|
||||
topRight: Radius.circular(25),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 5),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: MediaQuery.of(context).size.width / 4,
|
||||
),
|
||||
child: Divider(
|
||||
color: const Color.fromARGB(255, 255, 255, 255),
|
||||
thickness: 2,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
// vertical: 10,
|
||||
),
|
||||
child:
|
||||
filteredItems.isEmpty
|
||||
? const Center(
|
||||
child: Text(
|
||||
"Tidak ada hasil",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.black54,
|
||||
),
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.0,
|
||||
left: 10,
|
||||
right: 10,
|
||||
),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
),
|
||||
color: const Color.fromARGB(
|
||||
255,
|
||||
222,
|
||||
181,
|
||||
133,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 12,
|
||||
right: 20,
|
||||
left: 20,
|
||||
),
|
||||
child: GridView.builder(
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 1, // 2 Kolom
|
||||
crossAxisSpacing: 10,
|
||||
mainAxisSpacing: 10,
|
||||
childAspectRatio: 2.5,
|
||||
),
|
||||
itemCount: _listContent.length,
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
child: CardList(
|
||||
title:
|
||||
_listContent[index]["title"] ??
|
||||
"",
|
||||
body:
|
||||
_listContent[index]["body"] ??
|
||||
"",
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder:
|
||||
(
|
||||
context,
|
||||
) => listDetailExtension.buildPage({
|
||||
'title':
|
||||
filteredItems[index]['category'],
|
||||
'imagePath':
|
||||
filteredItems[index]['image'],
|
||||
'filepath':
|
||||
filteredItems[index]['file'],
|
||||
'paragraphs':
|
||||
"""
|
||||
""" +
|
||||
"<h1> ${_listContent[index]["title"]} </h1> <p> ${_listContent[index]["body"]}",
|
||||
}),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(child: contentContainer(context)),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -395,4 +190,194 @@ class _ListEducationState extends State<ListEducation> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Container headerContainer(
|
||||
BuildContext context,
|
||||
List<Map<String, dynamic>> filteredCollections,
|
||||
) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 150,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromARGB(225, 79, 76, 182),
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25),
|
||||
bottomRight: Radius.circular(25),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 6),
|
||||
child: Container(
|
||||
height: 47,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: Colors.grey.shade200,
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.search,
|
||||
color: Color.fromARGB(137, 180, 172, 172),
|
||||
size: 18,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: searchController,
|
||||
onChanged: filterSearch, // Memanggil filter saat mengetik
|
||||
style: const TextStyle(color: Colors.black, fontSize: 14),
|
||||
decoration: const InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: 'Cari pelajaran...',
|
||||
hintStyle: TextStyle(color: Colors.black54),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (searchController.text.isNotEmpty)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close, color: Colors.black54),
|
||||
onPressed: () {
|
||||
searchController.clear();
|
||||
filterSearch('');
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children:
|
||||
filteredCollections.map((item) {
|
||||
return CollectionContainer(
|
||||
label: item["label"]!,
|
||||
imageSvg: item["image"]!,
|
||||
iconw: 20,
|
||||
iconh: 20,
|
||||
width: 70,
|
||||
height: 70,
|
||||
textColor: Colors.black,
|
||||
lblSize: 10,
|
||||
colorContiner: ColorHelper.hexToColor(item["color"]),
|
||||
onTapAc:
|
||||
() => {
|
||||
searchController.clear(),
|
||||
filterByCategory(item["category"]),
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Container contentContainer(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromARGB(223, 200, 200, 206),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(25),
|
||||
topRight: Radius.circular(25),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 5),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: MediaQuery.of(context).size.width / 4,
|
||||
),
|
||||
child: Divider(
|
||||
color: const Color.fromARGB(255, 255, 255, 255),
|
||||
thickness: 2,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
// vertical: 10,
|
||||
),
|
||||
child:
|
||||
filteredItems.isEmpty
|
||||
? const Center(
|
||||
child: Text(
|
||||
"Tidak ada hasil",
|
||||
style: TextStyle(fontSize: 16, color: Colors.black54),
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.0,
|
||||
left: 10,
|
||||
right: 10,
|
||||
),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
),
|
||||
color: const Color.fromARGB(255, 222, 181, 133),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 12,
|
||||
right: 20,
|
||||
left: 20,
|
||||
),
|
||||
child: GridView.builder(
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 1, // 2 Kolom
|
||||
crossAxisSpacing: 10,
|
||||
mainAxisSpacing: 10,
|
||||
childAspectRatio: 2.5,
|
||||
),
|
||||
itemCount: _listContent.length,
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
child: CardList(
|
||||
title: _listContent[index]["title"] ?? "",
|
||||
body: _listContent[index]["body"] ?? "",
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder:
|
||||
(
|
||||
context,
|
||||
) => listDetailExtension.buildPage({
|
||||
'title':
|
||||
filteredItems[index]['category'],
|
||||
'imagePath':
|
||||
filteredItems[index]['image'],
|
||||
'filepath':
|
||||
filteredItems[index]['file'],
|
||||
'paragraphs':
|
||||
"""
|
||||
"""
|
||||
"<h1> ${_listContent[index]["title"]} </h1> <p> ${_listContent[index]["body"]}",
|
||||
}),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/buildcard_info.dart';
|
||||
import 'package:furibase/components/collection_container.dart';
|
||||
import 'package:freekake/components/buildcard_info.dart';
|
||||
import 'package:freekake/components/collection_container.dart';
|
||||
|
||||
class DetailScreen extends StatefulWidget {
|
||||
final String title;
|
||||
|
||||
@@ -9,12 +9,12 @@ class ListDetailScreen extends StatefulWidget {
|
||||
final String filepath;
|
||||
|
||||
const ListDetailScreen({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.imagePath,
|
||||
required this.paragraphs,
|
||||
required this.filepath,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
_ListDetailScreenState createState() => _ListDetailScreenState();
|
||||
@@ -41,6 +41,11 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
||||
String html = await DefaultAssetBundle.of(
|
||||
context,
|
||||
).loadString(widget.filepath);
|
||||
|
||||
html = html.replaceAllMapped(
|
||||
RegExp(r'<div class="gizi-grid">(.*?)</div>', dotAll: true),
|
||||
(match) => '<gizi-grid>${match.group(1)}</gizi-grid>',
|
||||
);
|
||||
setState(() {
|
||||
_htmlContent = html;
|
||||
});
|
||||
@@ -102,115 +107,73 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(left: 18.0, right: 18, bottom: 18),
|
||||
child:
|
||||
// ListView.builder(
|
||||
// itemCount: widget.paragraphs.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// return
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(bottom: 16.0),
|
||||
// child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child:
|
||||
// // Text(
|
||||
// // widget.paragraphs[index] +
|
||||
// // style: TextStyle(color: Colors.black),
|
||||
// Html(
|
||||
// // style: {
|
||||
// // "body": Style(
|
||||
// // color: const Color.fromRGBO(0, 0, 0, 1),
|
||||
// // ),
|
||||
// // },
|
||||
// data:
|
||||
// widget.paragraphs +
|
||||
// """
|
||||
// <html>
|
||||
// <!-- Text between angle brackets is an HTML tag and is not displayed.
|
||||
// Most tags, such as the HTML and /HTML tags that surround the contents of
|
||||
// a page, come in pairs; some tags, like HR, for a horizontal rule, stand
|
||||
// alone. Comments, such as the text you're reading, are not displayed when
|
||||
// the Web page is shown. The information between the HEAD and /HEAD tags is
|
||||
// not displayed. The information between the BODY and /BODY tags is displayed.-->
|
||||
// <head>
|
||||
// <title>Enter a title, displayed at the top of the window.</title>
|
||||
// </head>
|
||||
// <!-- The information between the BODY and /BODY tags is displayed.-->
|
||||
// <body>
|
||||
// <h1>Enter the main heading, usually the same as the title.</h1>
|
||||
// <p>Be <b>bold</b> in stating your key points. Put them in a list: </p>
|
||||
// <ul>
|
||||
// <li>The first item in your list</li>
|
||||
// <li>The second item; <i>italicize</i> key words</li>
|
||||
// </ul>
|
||||
// <p>Improve your image by including an image. </p>
|
||||
// <p><img src="http://www.mygifs.com/CoverImage.gif" alt="A Great HTML Resource"></p>
|
||||
// <p>Add a link to your favorite <a href="https://www.dummies.com/">Web site</a>.
|
||||
// Break up your page with a horizontal rule or two. </p>
|
||||
// <hr>
|
||||
// <p>Finally, link to <a href="page2.html">another page</a> in your own Web site.</p>
|
||||
// <!-- And add a copyright notice.-->
|
||||
// <p>© Wiley Publishing, 2011</p>
|
||||
// </body>
|
||||
// </html>
|
||||
// """,
|
||||
// ),
|
||||
// ),
|
||||
// // ),
|
||||
// // Checkbox(
|
||||
// // value: _readStatus[index],
|
||||
// // onChanged: (bool? value) {
|
||||
// // _toggleReadStatus(index);
|
||||
// // },
|
||||
// // ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
Html(
|
||||
style: {"body": Style(color: const Color.fromRGBO(0, 0, 0, 1))},
|
||||
// data: widget.paragraphs,
|
||||
data: _htmlContent,
|
||||
extensions: [
|
||||
TagExtension(
|
||||
tagsToExtend: {"img"},
|
||||
builder: (ExtensionContext context) {
|
||||
final attrs = context.attributes;
|
||||
final src = attrs['src'] ?? '';
|
||||
|
||||
if (src.isNotEmpty) {
|
||||
if (src.startsWith('assets/html/')) {
|
||||
return Image.asset(
|
||||
src,
|
||||
width: 100,
|
||||
errorBuilder:
|
||||
(context, error, stackTrace) =>
|
||||
const Text('Image not found'),
|
||||
);
|
||||
} else if (!src.startsWith('http')) {
|
||||
return Image.asset(
|
||||
'assets/images/$src',
|
||||
width: 100,
|
||||
errorBuilder:
|
||||
(context, error, stackTrace) =>
|
||||
const Text('Image not found'),
|
||||
);
|
||||
} else {
|
||||
return Image.network(
|
||||
src,
|
||||
width: 100,
|
||||
errorBuilder:
|
||||
(context, error, stackTrace) =>
|
||||
const Text('Image failed to load'),
|
||||
);
|
||||
}
|
||||
}
|
||||
return const SizedBox();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
// ListView.builder(
|
||||
// itemCount: widget.paragraphs.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// return
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(bottom: 16.0),
|
||||
// child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child:
|
||||
// // Text(
|
||||
// // widget.paragraphs[index] +
|
||||
// // style: TextStyle(color: Colors.black),
|
||||
// Html(
|
||||
// // style: {
|
||||
// // "body": Style(
|
||||
// // color: const Color.fromRGBO(0, 0, 0, 1),
|
||||
// // ),
|
||||
// // },
|
||||
// data:
|
||||
// widget.paragraphs +
|
||||
// """
|
||||
// <html>
|
||||
// <!-- Text between angle brackets is an HTML tag and is not displayed.
|
||||
// Most tags, such as the HTML and /HTML tags that surround the contents of
|
||||
// a page, come in pairs; some tags, like HR, for a horizontal rule, stand
|
||||
// alone. Comments, such as the text you're reading, are not displayed when
|
||||
// the Web page is shown. The information between the HEAD and /HEAD tags is
|
||||
// not displayed. The information between the BODY and /BODY tags is displayed.-->
|
||||
// <head>
|
||||
// <title>Enter a title, displayed at the top of the window.</title>
|
||||
// </head>
|
||||
// <!-- The information between the BODY and /BODY tags is displayed.-->
|
||||
// <body>
|
||||
// <h1>Enter the main heading, usually the same as the title.</h1>
|
||||
// <p>Be <b>bold</b> in stating your key points. Put them in a list: </p>
|
||||
// <ul>
|
||||
// <li>The first item in your list</li>
|
||||
// <li>The second item; <i>italicize</i> key words</li>
|
||||
// </ul>
|
||||
// <p>Improve your image by including an image. </p>
|
||||
// <p><img src="http://www.mygifs.com/CoverImage.gif" alt="A Great HTML Resource"></p>
|
||||
// <p>Add a link to your favorite <a href="https://www.dummies.com/">Web site</a>.
|
||||
// Break up your page with a horizontal rule or two. </p>
|
||||
// <hr>
|
||||
// <p>Finally, link to <a href="page2.html">another page</a> in your own Web site.</p>
|
||||
// <!-- And add a copyright notice.-->
|
||||
// <p>© Wiley Publishing, 2011</p>
|
||||
// </body>
|
||||
// </html>
|
||||
// """,
|
||||
// ),
|
||||
// ),
|
||||
// // ),
|
||||
// // Checkbox(
|
||||
// // value: _readStatus[index],
|
||||
// // onChanged: (bool? value) {
|
||||
// // _toggleReadStatus(index);
|
||||
// // },
|
||||
// // ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
htmlBody(),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -218,4 +181,71 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
||||
// ),
|
||||
);
|
||||
}
|
||||
|
||||
Html htmlBody() {
|
||||
return Html(
|
||||
style: {"body": Style(color: const Color.fromRGBO(0, 0, 0, 1))},
|
||||
// data: widget.paragraphs,
|
||||
data: _htmlContent,
|
||||
extensions: [
|
||||
TagExtension(
|
||||
tagsToExtend: {"img"},
|
||||
builder: (ExtensionContext context) {
|
||||
final attrs = context.attributes;
|
||||
final src = attrs['src'] ?? '';
|
||||
|
||||
if (src.isNotEmpty) {
|
||||
if (src.startsWith('assets/html/')) {
|
||||
return Image.asset(
|
||||
src,
|
||||
width: 100,
|
||||
errorBuilder:
|
||||
(context, error, stackTrace) =>
|
||||
const Text('Image not found'),
|
||||
);
|
||||
} else if (!src.startsWith('http')) {
|
||||
return Image.asset(
|
||||
'assets/images/$src',
|
||||
width: 100,
|
||||
errorBuilder:
|
||||
(context, error, stackTrace) =>
|
||||
const Text('Image not found'),
|
||||
);
|
||||
} else {
|
||||
return Image.network(
|
||||
src,
|
||||
width: 100,
|
||||
errorBuilder:
|
||||
(context, error, stackTrace) =>
|
||||
const Text('Image failed to load'),
|
||||
);
|
||||
}
|
||||
}
|
||||
return const SizedBox();
|
||||
},
|
||||
),
|
||||
TagExtension(
|
||||
tagsToExtend: {"gizi-grid"},
|
||||
builder: (context) {
|
||||
final spans = context.inlineSpanChildren ?? [];
|
||||
|
||||
final widgets =
|
||||
spans.map((span) {
|
||||
if (span is WidgetSpan) return span.child;
|
||||
return const SizedBox();
|
||||
}).toList();
|
||||
|
||||
return Wrap(
|
||||
spacing: 12,
|
||||
runSpacing: 12,
|
||||
children:
|
||||
widgets.map((child) {
|
||||
return SizedBox(width: 160, child: child);
|
||||
}).toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/buildcard_info.dart';
|
||||
import 'package:furibase/components/collection_container.dart';
|
||||
import 'package:furibase/components/menu_button.dart';
|
||||
import 'package:furibase/components/scan_button.dart';
|
||||
import 'package:furibase/screen/Home_screen.dart';
|
||||
import 'package:furibase/screen/pustaka/list_education.dart';
|
||||
import 'package:freekake/components/buildcard_info.dart';
|
||||
import 'package:freekake/components/collection_container.dart';
|
||||
import 'package:freekake/components/menu_button.dart';
|
||||
import 'package:freekake/components/scan_button.dart';
|
||||
import 'package:freekake/screen/Home_screen.dart';
|
||||
import 'package:freekake/screen/pustaka/list_education.dart';
|
||||
|
||||
class PustakaScreen extends StatefulWidget {
|
||||
const PustakaScreen({super.key});
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/buildcard_info.dart';
|
||||
import 'package:furibase/components/collection_container.dart';
|
||||
import 'package:furibase/components/menu_button.dart';
|
||||
import 'package:furibase/components/scan_button.dart';
|
||||
import 'package:furibase/screen/Home_screen.dart';
|
||||
import 'package:furibase/screen/pustaka/list_education.dart';
|
||||
import 'package:freekake/components/buildcard_info.dart';
|
||||
import 'package:freekake/components/collection_container.dart';
|
||||
import 'package:freekake/components/menu_button.dart';
|
||||
import 'package:freekake/components/scan_button.dart';
|
||||
import 'package:freekake/screen/Home_screen.dart';
|
||||
import 'package:freekake/screen/pustaka/list_education.dart';
|
||||
|
||||
class PustakaScreen extends StatefulWidget {
|
||||
const PustakaScreen({super.key});
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/buildcard_info.dart';
|
||||
import 'package:furibase/components/collection_container.dart';
|
||||
import 'package:furibase/components/menu_button.dart';
|
||||
import 'package:furibase/components/scan_button.dart';
|
||||
import 'package:furibase/screen/Home_screen.dart';
|
||||
import 'package:furibase/screen/pustaka/list_education.dart';
|
||||
import 'package:freekake/components/buildcard_info.dart';
|
||||
import 'package:freekake/components/collection_container.dart';
|
||||
import 'package:freekake/components/menu_button.dart';
|
||||
import 'package:freekake/components/scan_button.dart';
|
||||
import 'package:freekake/screen/Home_screen.dart';
|
||||
import 'package:freekake/screen/pustaka/list_education.dart';
|
||||
|
||||
class PustakaScreen extends StatefulWidget {
|
||||
const PustakaScreen({super.key});
|
||||
|
||||
+222
-215
@@ -1,12 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:furibase/components/bottom_navbar.dart';
|
||||
import 'package:furibase/components/buildcard_info.dart';
|
||||
import 'package:furibase/components/collection_container.dart';
|
||||
import 'package:furibase/components/main_menu.dart';
|
||||
import 'package:furibase/components/scan_button.dart';
|
||||
import 'package:furibase/components/topbar_container.dart';
|
||||
import 'package:furibase/helpers/color_helper.dart';
|
||||
import 'package:furibase/screen/pustaka/list_education.dart';
|
||||
import 'package:freekake/components/bottom_navbar.dart';
|
||||
import 'package:freekake/components/buildcard_info.dart';
|
||||
import 'package:freekake/components/collection_container.dart';
|
||||
import 'package:freekake/components/main_menu.dart';
|
||||
import 'package:freekake/components/scan_button.dart';
|
||||
import 'package:freekake/components/topbar_container.dart';
|
||||
import 'package:freekake/helpers/color_helper.dart';
|
||||
import 'package:freekake/screen/pustaka/list_education.dart';
|
||||
|
||||
class PustakaScreen extends StatefulWidget {
|
||||
const PustakaScreen({super.key});
|
||||
@@ -71,202 +71,209 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromARGB(255, 255, 255, 255),
|
||||
body: Stack(
|
||||
children: [
|
||||
//Top Bar
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: SizedBox(height: 130, child: TopbarContainer()),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
// Header Section
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
color: const Color.fromARGB(
|
||||
250,
|
||||
255,
|
||||
255,
|
||||
255,
|
||||
).withOpacity(0.0),
|
||||
body: pustakaBody(
|
||||
filteredCollections,
|
||||
context,
|
||||
bottomPadding,
|
||||
screenWidth,
|
||||
buttonScanSize,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Stack pustakaBody(
|
||||
List<Map<String, dynamic>> filteredCollections,
|
||||
BuildContext context,
|
||||
double bottomPadding,
|
||||
double screenWidth,
|
||||
double buttonScanSize,
|
||||
) {
|
||||
return Stack(
|
||||
children: [
|
||||
//Top Bar
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: SizedBox(height: 130, child: TopbarContainer()),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
// Header Section
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
color: const Color.fromARGB(250, 255, 255, 255).withOpacity(0.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
BuildcardInfo(
|
||||
icon: Icons.person,
|
||||
text: 'User01',
|
||||
extraIcon: Icons.emoji_events,
|
||||
extraText: "5000",
|
||||
width: 180,
|
||||
),
|
||||
BuildcardInfo(
|
||||
icon: Icons.monetization_on,
|
||||
text: "1.300",
|
||||
width: 90,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// // Date Display
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
// child: Text(
|
||||
// DateTime.now().toString(),
|
||||
// style: const TextStyle(color: Colors.white),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
// Search Bar
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 40, vertical: 10),
|
||||
child: Container(
|
||||
height: 47,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: const Color.fromARGB(255, 237, 227, 227),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
BuildcardInfo(
|
||||
icon: Icons.person,
|
||||
text: 'User01',
|
||||
extraIcon: Icons.emoji_events,
|
||||
extraText: "5000",
|
||||
width: 180,
|
||||
),
|
||||
BuildcardInfo(
|
||||
icon: Icons.monetization_on,
|
||||
text: "1.300",
|
||||
width: 90,
|
||||
const Icon(Icons.search, color: Colors.black54, size: 18),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_searchQuery = value;
|
||||
});
|
||||
},
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
),
|
||||
decoration: const InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: 'Search...',
|
||||
hintStyle: TextStyle(color: Colors.grey),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// // Date Display
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
// child: Text(
|
||||
// DateTime.now().toString(),
|
||||
// style: const TextStyle(color: Colors.white),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
// Search Bar
|
||||
Padding(
|
||||
),
|
||||
// Collection Items
|
||||
SizedBox(
|
||||
height: 440,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 40,
|
||||
vertical: 10,
|
||||
horizontal: 58,
|
||||
vertical: 60,
|
||||
),
|
||||
child: Container(
|
||||
height: 47,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: const Color.fromARGB(255, 237, 227, 227),
|
||||
child: GridView.builder(
|
||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
maxCrossAxisExtent: 140,
|
||||
mainAxisSpacing: 20,
|
||||
crossAxisSpacing: 20,
|
||||
childAspectRatio: 1, // 1:1 rasio (kotak)
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
itemCount: filteredCollections.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = filteredCollections[index];
|
||||
return CollectionContainer(
|
||||
label: item["label"]!,
|
||||
imageSvg: item["image"]!,
|
||||
width: 30,
|
||||
height: 80,
|
||||
textColor: Colors.black,
|
||||
circle: true,
|
||||
colorContiner: ColorHelper.hexToColor(item["color"]),
|
||||
onTapAc: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const ListEducation(),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// horizontal: 5,
|
||||
// vertical: 1,
|
||||
// ),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Text("List Topic", style: TextStyle(color: Colors.black)),
|
||||
// Divider(color: Colors.transparent),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Horizontal Scroll List
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5),
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 100,
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.search, color: Colors.black54, size: 18),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_searchQuery = value;
|
||||
});
|
||||
},
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
children: List.generate(
|
||||
10,
|
||||
(index) => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Card(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
decoration: const InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: 'Search...',
|
||||
hintStyle: TextStyle(color: Colors.grey),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// Collection Items
|
||||
Container(
|
||||
height: 440,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 58,
|
||||
vertical: 60,
|
||||
),
|
||||
child: GridView.builder(
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
maxCrossAxisExtent: 140,
|
||||
mainAxisSpacing: 20,
|
||||
crossAxisSpacing: 20,
|
||||
childAspectRatio: 1, // 1:1 rasio (kotak)
|
||||
),
|
||||
itemCount: filteredCollections.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = filteredCollections[index];
|
||||
return CollectionContainer(
|
||||
label: item["label"]!,
|
||||
imageSvg: item["image"]!,
|
||||
width: 30,
|
||||
height: 80,
|
||||
textColor: Colors.black,
|
||||
circle: true,
|
||||
colorContiner: ColorHelper.hexToColor(item["color"]),
|
||||
onTapAc: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const ListEducation(),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// horizontal: 5,
|
||||
// vertical: 1,
|
||||
// ),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Text("List Topic", style: TextStyle(color: Colors.black)),
|
||||
// Divider(color: Colors.transparent),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Horizontal Scroll List
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5),
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 100,
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: List.generate(
|
||||
10,
|
||||
(index) => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Card(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
elevation: 5,
|
||||
color: ColorHelper.hexToColor("#efd8c6"),
|
||||
// color: const Color.fromARGB(140, 255, 255, 255),
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(15),
|
||||
// ),
|
||||
child: GestureDetector(
|
||||
onTap:
|
||||
() => {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ListEducation(),
|
||||
),
|
||||
elevation: 5,
|
||||
color: ColorHelper.hexToColor("#efd8c6"),
|
||||
// color: const Color.fromARGB(140, 255, 255, 255),
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(15),
|
||||
// ),
|
||||
child: GestureDetector(
|
||||
onTap:
|
||||
() => {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ListEducation(),
|
||||
),
|
||||
},
|
||||
child: Container(
|
||||
width: 80,
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.book,
|
||||
size: 50,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
},
|
||||
child: Container(
|
||||
width: 80,
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.book,
|
||||
size: 50,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
Text(
|
||||
'Topic ${index + 1}',
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color.fromARGB(255, 0, 0, 0),
|
||||
),
|
||||
Text(
|
||||
'Topic ' + (index + 1).toString(),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color.fromARGB(255, 0, 0, 0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -276,32 +283,32 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// Bottom Navigation
|
||||
// MainMenu(),
|
||||
],
|
||||
),
|
||||
// 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(
|
||||
bottom: bottomPadding * 98,
|
||||
left: (screenWidth - buttonScanSize) / 2,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, -20),
|
||||
child: ScanButton(),
|
||||
),
|
||||
// Bottom Navigation
|
||||
// MainMenu(),
|
||||
],
|
||||
),
|
||||
// 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(
|
||||
bottom: bottomPadding * 98,
|
||||
left: (screenWidth - buttonScanSize) / 2,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, -20),
|
||||
child: ScanButton(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
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:freekake/components/bottom_navbar.dart';
|
||||
import 'package:freekake/components/main_menu.dart';
|
||||
import 'package:freekake/components/scan_button.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'dart:io';
|
||||
|
||||
@@ -11,6 +11,8 @@ import 'dart:io';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
|
||||
class AkunSaya extends StatefulWidget {
|
||||
const AkunSaya({super.key});
|
||||
|
||||
@override
|
||||
_AkunSayaState createState() => _AkunSayaState();
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@ import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.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/screen/saya/akun_saya.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/screen/saya/akun_saya.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'dart:io';
|
||||
|
||||
@@ -13,6 +13,8 @@ import 'package:image_picker_web/image_picker_web.dart';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
|
||||
class ProfileScreenCopy extends StatefulWidget {
|
||||
const ProfileScreenCopy({super.key});
|
||||
|
||||
@override
|
||||
_ProfileScreenState createState() => _ProfileScreenState();
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_html/flutter_html.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/components/topbar_container.dart';
|
||||
import 'package:furibase/screen/saya/akun_saya.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/components/topbar_container.dart';
|
||||
import 'package:freekake/screen/saya/akun_saya.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'dart:io';
|
||||
|
||||
@@ -14,6 +14,8 @@ import 'dart:io';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
|
||||
class ProfileScreen extends StatefulWidget {
|
||||
const ProfileScreen({super.key});
|
||||
|
||||
@override
|
||||
_ProfileScreenState createState() => _ProfileScreenState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user