freekake basename
This commit is contained in:
@@ -93,7 +93,7 @@ img {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bahan-container {
|
.div-grid {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -101,21 +101,21 @@ img {
|
|||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bahan-item {
|
.div-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
flex: 1 0 calc(25% - 15px); /* 4 items per row by default */
|
flex: 1 0 calc(25% - 15px); /* 4 items per row by default */
|
||||||
min-width: calc(25% - 15px);
|
min-width: calc(25% - 15px);
|
||||||
max-width: calc(25% - 15px);
|
max-width: calc(25% - 15px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bahan-item img {
|
.div-item img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bahan-item p {
|
.div-item p {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ figcaption {
|
|||||||
|
|
||||||
/* Tablet Size (768px and below) - 2 items per row */
|
/* Tablet Size (768px and below) - 2 items per row */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.bahan-item {
|
.div-item {
|
||||||
flex: 1 0 calc(50% - 15px);
|
flex: 1 0 calc(50% - 15px);
|
||||||
min-width: calc(50% - 15px);
|
min-width: calc(50% - 15px);
|
||||||
max-width: calc(50% - 15px);
|
max-width: calc(50% - 15px);
|
||||||
@@ -171,7 +171,7 @@ figcaption {
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bahan-item {
|
.div-item {
|
||||||
flex: 1 0 100%;
|
flex: 1 0 100%;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@@ -222,20 +222,20 @@ figcaption {
|
|||||||
<h2>Apa Saja Isi Furikake?</h2>
|
<h2>Apa Saja Isi Furikake?</h2>
|
||||||
<p>Furikake biasanya terbuat dari campuran beberapa bahan seperti:</p>
|
<p>Furikake biasanya terbuat dari campuran beberapa bahan seperti:</p>
|
||||||
|
|
||||||
<div class="bahan-container">
|
<div class="div-grid">
|
||||||
<div class="bahan-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/furikake/nori.jpeg" alt="Nori">
|
<img src="assets/html/furikake/nori.jpeg" alt="Nori">
|
||||||
<p>Nori (Rumput Laut)</p>
|
<p>Nori (Rumput Laut)</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="bahan-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/furikake/wijen.jpeg" alt="Biji Wijen">
|
<img src="assets/html/furikake/wijen.jpeg" alt="Biji Wijen">
|
||||||
<p>Biji Wijen</p>
|
<p>Biji Wijen</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="bahan-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/furikake/ikankering.jpg" alt="Katsuobushi">
|
<img src="assets/html/furikake/ikankering.jpg" alt="Katsuobushi">
|
||||||
<p>Katsuobushi (Ikan Kering)</p>
|
<p>Katsuobushi (Ikan Kering)</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="bahan-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/furikake/gulagaram.jpg" alt="Garam dan Gula">
|
<img src="assets/html/furikake/gulagaram.jpg" alt="Garam dan Gula">
|
||||||
<p>Garam & Gula</p>
|
<p>Garam & Gula</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -259,7 +259,7 @@ figcaption {
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||
<img src="furikake.jpg" alt="Contoh produk furikake" class="full-width-image">
|
<img src="assets/html/furikake/furikake.jpg" alt="Contoh produk furikake" class="full-width-image">
|
||||||
<figcaption>Berbagai varian produk furikake yang tersedia di pasaran</figcaption>
|
<figcaption>Berbagai varian produk furikake yang tersedia di pasaran</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
+11
-11
@@ -92,7 +92,7 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gizi-grid {
|
.div-grid {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -100,13 +100,13 @@
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gizi-item {
|
.div-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
flex: 1 1 200px;
|
flex: 1 1 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gizi-item img {
|
.div-item img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@@ -148,12 +148,12 @@
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gizi-grid {
|
.div-grid {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gizi-item {
|
.div-item {
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,24 +175,24 @@
|
|||||||
<h2>Apa Itu Gizi Seimbang?</h2>
|
<h2>Apa Itu Gizi Seimbang?</h2>
|
||||||
<p>Gizi seimbang adalah cara makan yang mengandung semua zat gizi yang dibutuhkan tubuh. Zat gizi itu terdiri dari:</p>
|
<p>Gizi seimbang adalah cara makan yang mengandung semua zat gizi yang dibutuhkan tubuh. Zat gizi itu terdiri dari:</p>
|
||||||
|
|
||||||
<div class="gizi-grid">
|
<div class="div-grid">
|
||||||
<div class="gizi-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/karbohidrat.png" alt="Karbohidrat" />
|
<img src="assets/html/karbohidrat.png" alt="Karbohidrat" />
|
||||||
<p><strong>Karbohidrat</strong><br>Sumber energi seperti nasi, roti, dan kentang.</p>
|
<p><strong>Karbohidrat</strong><br>Sumber energi seperti nasi, roti, dan kentang.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="gizi-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/protein.png" alt="Protein" />
|
<img src="assets/html/protein.png" alt="Protein" />
|
||||||
<p><strong>Protein</strong><br>Untuk membangun otot, misalnya ikan, telur, dan tahu.</p>
|
<p><strong>Protein</strong><br>Untuk membangun otot, misalnya ikan, telur, dan tahu.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="gizi-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/lemak.png" alt="Lemak" />
|
<img src="assets/html/lemak.png" alt="Lemak" />
|
||||||
<p><strong>Lemak</strong><br>Memberikan tenaga, seperti dari kacang-kacangan dan minyak sehat.</p>
|
<p><strong>Lemak</strong><br>Memberikan tenaga, seperti dari kacang-kacangan dan minyak sehat.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="gizi-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/vitaminmineral.png" alt="Vitamin dan Mineral" />
|
<img src="assets/html/vitaminmineral.png" alt="Vitamin dan Mineral" />
|
||||||
<p><strong>Vitamin dan mineral</strong><br>Dari sayur dan buah yang membantu tubuh bekerja dengan baik.</p>
|
<p><strong>Vitamin dan mineral</strong><br>Dari sayur dan buah yang membantu tubuh bekerja dengan baik.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="gizi-item">
|
<div class="div-item">
|
||||||
<img src="assets/html/seratair.png" alt="Serat dan Air" />
|
<img src="assets/html/seratair.png" alt="Serat dan Air" />
|
||||||
<p><strong>Serat dan air</strong><br>Membantu pencernaan dan menjaga tubuh tetap segar!</p>
|
<p><strong>Serat dan air</strong><br>Membantu pencernaan dan menjaga tubuh tetap segar!</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
|
import 'package:freekake/components/navbar_shape_3.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/navbar_container.dart';
|
|
||||||
import 'package:furibase/components/navbar_shape_1.dart';
|
|
||||||
import 'package:furibase/components/navbar_shape_2.dart';
|
|
||||||
import 'package:furibase/components/navbar_shape_3.dart';
|
|
||||||
import 'package:furibase/components/custom_shape.dart';
|
|
||||||
|
|
||||||
class BottomNavbar extends StatefulWidget {
|
class BottomNavbar extends StatefulWidget {
|
||||||
const BottomNavbar({super.key});
|
const BottomNavbar({super.key});
|
||||||
@@ -13,6 +9,7 @@ class BottomNavbar extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _BottomNavbarState extends State<BottomNavbar> {
|
class _BottomNavbarState extends State<BottomNavbar> {
|
||||||
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final Size screenSize = MediaQuery.of(context).size;
|
final Size screenSize = MediaQuery.of(context).size;
|
||||||
return CustomPaint(
|
return CustomPaint(
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class CardList extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
this.title,
|
title,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class CollectionContainer extends StatelessWidget {
|
|||||||
final bool? small;
|
final bool? small;
|
||||||
|
|
||||||
const CollectionContainer({
|
const CollectionContainer({
|
||||||
Key? key,
|
super.key,
|
||||||
this.label,
|
this.label,
|
||||||
this.imagesrc,
|
this.imagesrc,
|
||||||
this.imageSvg,
|
this.imageSvg,
|
||||||
@@ -31,7 +31,7 @@ class CollectionContainer extends StatelessWidget {
|
|||||||
this.circle,
|
this.circle,
|
||||||
this.colorContiner,
|
this.colorContiner,
|
||||||
this.small,
|
this.small,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ class CurvedBottomBorderTab extends StatelessWidget {
|
|||||||
final VoidCallback tap;
|
final VoidCallback tap;
|
||||||
|
|
||||||
const CurvedBottomBorderTab({
|
const CurvedBottomBorderTab({
|
||||||
|
super.key,
|
||||||
required this.isSelected,
|
required this.isSelected,
|
||||||
required this.label,
|
required this.label,
|
||||||
required this.tap,
|
required this.tap,
|
||||||
@@ -16,6 +17,7 @@ class CurvedBottomBorderTab extends StatelessWidget {
|
|||||||
return CustomPaint(
|
return CustomPaint(
|
||||||
painter: isSelected ? CurvedBottomPainter() : null,
|
painter: isSelected ? CurvedBottomPainter() : null,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
onTap: tap,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 110,
|
width: 110,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||||
@@ -34,7 +36,6 @@ class CurvedBottomBorderTab extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: tap,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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});
|
||||||
@@ -23,7 +23,7 @@ class RPSCustomPainter extends CustomPainter {
|
|||||||
void paint(Canvas canvas, Size size) {
|
void paint(Canvas canvas, Size size) {
|
||||||
// Layer 1
|
// Layer 1
|
||||||
|
|
||||||
Paint paint_fill_0 =
|
Paint paintFill0 =
|
||||||
Paint()
|
Paint()
|
||||||
..color = const Color.fromARGB(255, 189, 18, 18)
|
..color = const Color.fromARGB(255, 189, 18, 18)
|
||||||
..style = PaintingStyle.fill
|
..style = PaintingStyle.fill
|
||||||
@@ -67,11 +67,11 @@ class RPSCustomPainter extends CustomPainter {
|
|||||||
);
|
);
|
||||||
path_0.close();
|
path_0.close();
|
||||||
|
|
||||||
canvas.drawPath(path_0, paint_fill_0);
|
canvas.drawPath(path_0, paintFill0);
|
||||||
|
|
||||||
// Layer 1
|
// Layer 1
|
||||||
|
|
||||||
Paint paint_stroke_0 =
|
Paint paintStroke0 =
|
||||||
Paint()
|
Paint()
|
||||||
..color = const Color.fromARGB(255, 33, 150, 243)
|
..color = const Color.fromARGB(255, 33, 150, 243)
|
||||||
..style = PaintingStyle.stroke
|
..style = PaintingStyle.stroke
|
||||||
@@ -79,11 +79,11 @@ class RPSCustomPainter extends CustomPainter {
|
|||||||
..strokeCap = StrokeCap.butt
|
..strokeCap = StrokeCap.butt
|
||||||
..strokeJoin = StrokeJoin.miter;
|
..strokeJoin = StrokeJoin.miter;
|
||||||
|
|
||||||
canvas.drawPath(path_0, paint_stroke_0);
|
canvas.drawPath(path_0, paintStroke0);
|
||||||
|
|
||||||
// Layer 1
|
// Layer 1
|
||||||
|
|
||||||
Paint paint_fill_1 =
|
Paint paintFill1 =
|
||||||
Paint()
|
Paint()
|
||||||
..color = const Color.fromARGB(255, 28, 163, 52)
|
..color = const Color.fromARGB(255, 28, 163, 52)
|
||||||
..style = PaintingStyle.fill
|
..style = PaintingStyle.fill
|
||||||
@@ -116,11 +116,11 @@ class RPSCustomPainter extends CustomPainter {
|
|||||||
);
|
);
|
||||||
path_1.close();
|
path_1.close();
|
||||||
|
|
||||||
canvas.drawPath(path_1, paint_fill_1);
|
canvas.drawPath(path_1, paintFill1);
|
||||||
|
|
||||||
// Layer 1
|
// Layer 1
|
||||||
|
|
||||||
Paint paint_stroke_1 =
|
Paint paintStroke1 =
|
||||||
Paint()
|
Paint()
|
||||||
..color = const Color.fromARGB(255, 33, 150, 243)
|
..color = const Color.fromARGB(255, 33, 150, 243)
|
||||||
..style = PaintingStyle.stroke
|
..style = PaintingStyle.stroke
|
||||||
@@ -128,7 +128,7 @@ class RPSCustomPainter extends CustomPainter {
|
|||||||
..strokeCap = StrokeCap.butt
|
..strokeCap = StrokeCap.butt
|
||||||
..strokeJoin = StrokeJoin.miter;
|
..strokeJoin = StrokeJoin.miter;
|
||||||
|
|
||||||
canvas.drawPath(path_1, paint_stroke_1);
|
canvas.drawPath(path_1, paintStroke1);
|
||||||
|
|
||||||
// layer 2
|
// layer 2
|
||||||
// Paint paint_fill_0 =
|
// Paint paint_fill_0 =
|
||||||
@@ -164,7 +164,7 @@ class RPSCustomPainter extends CustomPainter {
|
|||||||
);
|
);
|
||||||
path_0.close();
|
path_0.close();
|
||||||
|
|
||||||
canvas.drawPath(path_0, paint_fill_0);
|
canvas.drawPath(path_0, paintFill0);
|
||||||
|
|
||||||
// Layer 1
|
// Layer 1
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
|
import 'package:freekake/components/menu_button.dart';
|
||||||
|
import 'package:freekake/providers/menu_selection_provider.dart';
|
||||||
|
import 'package:freekake/screen/Home_screen.dart';
|
||||||
|
import 'package:freekake/screen/koleksi_screen.dart';
|
||||||
|
import 'package:freekake/screen/pustaka_screen.dart';
|
||||||
|
import 'package:freekake/screen/saya/profile_screen.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/bottom_navbar.dart';
|
|
||||||
import 'package:furibase/components/menu_button.dart';
|
|
||||||
import 'package:furibase/components/scan_button.dart';
|
|
||||||
import 'package:furibase/providers/menu_selection_provider.dart';
|
|
||||||
import 'package:furibase/screen/Home_screen.dart';
|
|
||||||
import 'package:furibase/screen/koleksi_screen.dart';
|
|
||||||
import 'package:furibase/screen/pustaka_screen.dart';
|
|
||||||
import 'package:furibase/screen/saya/profile_screen.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class MainMenu extends StatefulWidget {
|
class MainMenu extends StatefulWidget {
|
||||||
const MainMenu({super.key});
|
const MainMenu({super.key});
|
||||||
|
@override
|
||||||
_MainMenuState createState() => _MainMenuState();
|
_MainMenuState createState() => _MainMenuState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:furibase/components/navbar_shape_2.dart';
|
|
||||||
|
|
||||||
class NavbarContainer extends StatelessWidget {
|
class NavbarContainer extends StatelessWidget {
|
||||||
const NavbarContainer({super.key});
|
const NavbarContainer({super.key});
|
||||||
@@ -23,7 +22,7 @@ class MyShape extends CustomPainter {
|
|||||||
void paint(Canvas canvas, Size size) {
|
void paint(Canvas canvas, Size size) {
|
||||||
// TODO: implement paint
|
// TODO: implement paint
|
||||||
Paint paint =
|
Paint paint =
|
||||||
new Paint()
|
Paint()
|
||||||
..color = const Color.fromARGB(255, 166, 12, 66)
|
..color = const Color.fromARGB(255, 166, 12, 66)
|
||||||
..style = PaintingStyle.fill;
|
..style = PaintingStyle.fill;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class BNBCustomPainter2 extends CustomPainter {
|
|||||||
void paint(Canvas canvas, Size size) {
|
void paint(Canvas canvas, Size size) {
|
||||||
debugPrint("Drawing navbar...");
|
debugPrint("Drawing navbar...");
|
||||||
Paint paint =
|
Paint paint =
|
||||||
new Paint()
|
Paint()
|
||||||
..color = const Color.fromARGB(255, 79, 76, 182)
|
..color = const Color.fromARGB(255, 79, 76, 182)
|
||||||
..style = PaintingStyle.fill;
|
..style = PaintingStyle.fill;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class BNBCustomPainter3 extends CustomPainter {
|
|||||||
void paint(Canvas canvas, Size size) {
|
void paint(Canvas canvas, Size size) {
|
||||||
debugPrint("Drawing navbar...");
|
debugPrint("Drawing navbar...");
|
||||||
Paint paint =
|
Paint paint =
|
||||||
new Paint()
|
Paint()
|
||||||
..color = const Color.fromARGB(255, 79, 76, 182)
|
..color = const Color.fromARGB(255, 79, 76, 182)
|
||||||
..style = PaintingStyle.fill;
|
..style = PaintingStyle.fill;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
|
import 'package:freekake/screen/camera_screen.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:furibase/screen/camera_screen.dart';
|
// import 'package:freekake/screen/camera_screen.dart';
|
||||||
|
|
||||||
class ScanButton extends StatelessWidget {
|
class ScanButton extends StatelessWidget {
|
||||||
const ScanButton({super.key});
|
const ScanButton({super.key});
|
||||||
static const Color transparent = Color(0xFFFFFFF);
|
static const Color transparent = Color(0x0fffffff);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ class TopbarContainer extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _TopbarContainerState extends State<TopbarContainer> {
|
class _TopbarContainerState extends State<TopbarContainer> {
|
||||||
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final Size size = MediaQuery.of(context).size;
|
final Size size = MediaQuery.of(context).size;
|
||||||
return Container(
|
return Container(
|
||||||
|
|||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:furibase/providers/character_provider.dart';
|
import 'package:freekake/providers/character_provider.dart';
|
||||||
import 'package:furibase/providers/menu_selection_provider.dart';
|
import 'package:freekake/providers/menu_selection_provider.dart';
|
||||||
import 'package:furibase/screen/Home_screen.dart';
|
import 'package:freekake/screen/Home_screen.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
|
|||||||
+27
-48
@@ -1,12 +1,12 @@
|
|||||||
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';
|
||||||
|
|
||||||
class HomeScreen extends StatefulWidget {
|
class HomeScreen extends StatefulWidget {
|
||||||
HomeScreen({super.key});
|
const HomeScreen({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<HomeScreen> createState() => _HomeScreenState();
|
State<HomeScreen> createState() => _HomeScreenState();
|
||||||
@@ -14,7 +14,7 @@ class HomeScreen extends StatefulWidget {
|
|||||||
|
|
||||||
class _HomeScreenState extends State<HomeScreen> {
|
class _HomeScreenState extends State<HomeScreen> {
|
||||||
final String username = "User01";
|
final String username = "User01";
|
||||||
double _sliderValue = 0.0;
|
final double _sliderValue = 0.0;
|
||||||
static const Color transparent = Color(0xFFFFFFFF);
|
static const Color transparent = Color(0xFFFFFFFF);
|
||||||
// Image image
|
// Image image
|
||||||
|
|
||||||
@@ -77,13 +77,32 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
// ],
|
// ],
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
body: Stack(
|
body: homeBody(
|
||||||
|
context,
|
||||||
|
isLandscape,
|
||||||
|
bottomOffset,
|
||||||
|
bottomPadding,
|
||||||
|
screenWidth,
|
||||||
|
buttonScanSize,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Stack homeBody(
|
||||||
|
BuildContext context,
|
||||||
|
bool isLandscape,
|
||||||
|
double bottomOffset,
|
||||||
|
double bottomPadding,
|
||||||
|
double screenWidth,
|
||||||
|
double buttonScanSize,
|
||||||
|
) {
|
||||||
|
return Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: RepaintBoundary(
|
child: RepaintBoundary(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: const DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage("assets/images/background.jpeg"),
|
image: AssetImage("assets/images/background.jpeg"),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
@@ -264,49 +283,9 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Widget _menuButton(String label, Widget icon) {
|
|
||||||
// return Expanded(
|
|
||||||
// child: Column(
|
|
||||||
// children: [
|
|
||||||
// IconButton(
|
|
||||||
// // icon: Icon(icon, color: Color.fromARGB(255, 179, 161, 170)),
|
|
||||||
// icon: icon,
|
|
||||||
// onPressed: () {},
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// label,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: Color.fromARGB(255, 239, 224, 232),
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Widget _scanButton() {
|
|
||||||
// return Expanded(
|
|
||||||
// child: Container(
|
|
||||||
// decoration: BoxDecoration(shape: BoxShape.circle, color: transparent),
|
|
||||||
// padding: EdgeInsets.all(10),
|
|
||||||
// child: IconButton(
|
|
||||||
// icon: SvgPicture.asset(
|
|
||||||
// 'icons/Scan.svg',
|
|
||||||
// width: 60,
|
|
||||||
// height: 60,
|
|
||||||
// colorFilter: ColorFilter.mode(Color(0xFFFFFFFF), BlendMode.srcIn),
|
|
||||||
// ),
|
|
||||||
// onPressed: () {},
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
Widget setHomeImage(String src, double size) {
|
Widget setHomeImage(String src, double size) {
|
||||||
return Image.asset(src, width: size);
|
return Image.asset(src, width: size);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
class CameraScreen extends StatefulWidget {
|
class CameraScreen extends StatefulWidget {
|
||||||
|
const CameraScreen({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_CameraScreenState createState() => _CameraScreenState();
|
_CameraScreenState createState() => _CameraScreenState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ class CharacterView extends StatefulWidget {
|
|||||||
final String content;
|
final String content;
|
||||||
|
|
||||||
const CharacterView({
|
const CharacterView({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.imagePath,
|
required this.imagePath,
|
||||||
required this.content,
|
required this.content,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_CharacterViewState createState() => _CharacterViewState();
|
_CharacterViewState createState() => _CharacterViewState();
|
||||||
|
|||||||
@@ -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});
|
||||||
|
|||||||
@@ -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});
|
||||||
|
|||||||
@@ -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});
|
||||||
@@ -11,7 +11,7 @@ class CollectionSkinScreen extends StatefulWidget {
|
|||||||
class _CollectionSkinScreenState extends State<CollectionSkinScreen> {
|
class _CollectionSkinScreenState extends State<CollectionSkinScreen> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return SizedBox(
|
||||||
// scrollDirection: Axis.horizontal,
|
// scrollDirection: Axis.horizontal,
|
||||||
height: MediaQuery.of(context).size.height,
|
height: MediaQuery.of(context).size.height,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@@ -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,14 +1,14 @@
|
|||||||
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/curve_bottom_border_tab.dart';
|
import 'package:freekake/components/curve_bottom_border_tab.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});
|
||||||
@@ -41,7 +41,16 @@ class _KoleksiScreenState extends State<KoleksiScreen> {
|
|||||||
final double bottomPadding = (9000 / screenWidth).clamp(0, 0.2);
|
final double bottomPadding = (9000 / screenWidth).clamp(0, 0.2);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
extendBody: true,
|
extendBody: true,
|
||||||
body: Stack(
|
body: koleksiBody(bottomPadding, screenWidth, buttonScanSize),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Stack koleksiBody(
|
||||||
|
double bottomPadding,
|
||||||
|
double screenWidth,
|
||||||
|
double buttonScanSize,
|
||||||
|
) {
|
||||||
|
return Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: Container(color: const Color.fromARGB(255, 255, 255, 255)),
|
child: Container(color: const Color.fromARGB(255, 255, 255, 255)),
|
||||||
@@ -161,7 +170,6 @@ class _KoleksiScreenState extends State<KoleksiScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.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/helpers/color_helper.dart';
|
import 'package:freekake/helpers/color_helper.dart';
|
||||||
import 'package:list_detail_extension/list_detail_extension.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:webview_flutter/webview_flutter.dart';
|
||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _loadContent(String path) async {
|
void _loadContent(String path) async {
|
||||||
if (_shouldShowWebView && _controller != null) {
|
if (_shouldShowWebView) {
|
||||||
if (path.startsWith('http')) {
|
if (path.startsWith('http')) {
|
||||||
// Load dari Internet
|
// Load dari Internet
|
||||||
_controller.loadRequest(Uri.parse(path));
|
_controller.loadRequest(Uri.parse(path));
|
||||||
@@ -124,8 +124,8 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
String _searchQuery = "";
|
String searchQuery = "";
|
||||||
final List<Map<String, dynamic>> _collections = [
|
final List<Map<String, dynamic>> collections = [
|
||||||
{
|
{
|
||||||
"label": "Kesehatan",
|
"label": "Kesehatan",
|
||||||
"image": "assets/icons/healthy.svg",
|
"image": "assets/icons/healthy.svg",
|
||||||
@@ -153,14 +153,14 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
];
|
];
|
||||||
|
|
||||||
final List<Map<String, dynamic>> filteredCollections =
|
final List<Map<String, dynamic>> filteredCollections =
|
||||||
_collections
|
collections
|
||||||
.where(
|
.where(
|
||||||
(item) => item["label"].toLowerCase().contains(
|
(item) => item["label"].toLowerCase().contains(
|
||||||
_searchQuery.toLowerCase(),
|
searchQuery.toLowerCase(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
if (_shouldShowWebView && _controller != null) {
|
if (_shouldShowWebView) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Color.fromARGB(225, 79, 76, 182),
|
backgroundColor: Color.fromARGB(225, 79, 76, 182),
|
||||||
@@ -174,7 +174,28 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
// Header Section
|
// Header Section
|
||||||
Container(
|
headerContainer(context, filteredCollections),
|
||||||
|
// Collection Items dengan Filter
|
||||||
|
SizedBox(height: 20),
|
||||||
|
Expanded(child: contentContainer(context)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return const Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(40),
|
||||||
|
child: Text("WebView tidak tersedia untuk platform ini."),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Container headerContainer(
|
||||||
|
BuildContext context,
|
||||||
|
List<Map<String, dynamic>> filteredCollections,
|
||||||
|
) {
|
||||||
|
return Container(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: 150,
|
height: 150,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -187,10 +208,7 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 6),
|
||||||
horizontal: 20,
|
|
||||||
vertical: 6,
|
|
||||||
),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 47,
|
height: 47,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -209,12 +227,8 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
onChanged:
|
onChanged: filterSearch, // Memanggil filter saat mengetik
|
||||||
filterSearch, // Memanggil filter saat mengetik
|
style: const TextStyle(color: Colors.black, fontSize: 14),
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 14,
|
|
||||||
),
|
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText: 'Cari pelajaran...',
|
hintText: 'Cari pelajaran...',
|
||||||
@@ -224,10 +238,7 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
),
|
),
|
||||||
if (searchController.text.isNotEmpty)
|
if (searchController.text.isNotEmpty)
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(
|
icon: const Icon(Icons.close, color: Colors.black54),
|
||||||
Icons.close,
|
|
||||||
color: Colors.black54,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
searchController.clear();
|
searchController.clear();
|
||||||
filterSearch('');
|
filterSearch('');
|
||||||
@@ -251,9 +262,7 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
height: 70,
|
height: 70,
|
||||||
textColor: Colors.black,
|
textColor: Colors.black,
|
||||||
lblSize: 10,
|
lblSize: 10,
|
||||||
colorContiner: ColorHelper.hexToColor(
|
colorContiner: ColorHelper.hexToColor(item["color"]),
|
||||||
item["color"],
|
|
||||||
),
|
|
||||||
onTapAc:
|
onTapAc:
|
||||||
() => {
|
() => {
|
||||||
searchController.clear(),
|
searchController.clear(),
|
||||||
@@ -264,11 +273,11 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
// Collection Items dengan Filter
|
}
|
||||||
SizedBox(height: 20),
|
|
||||||
Expanded(
|
Container contentContainer(BuildContext context) {
|
||||||
child: Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color.fromARGB(223, 200, 200, 206),
|
color: const Color.fromARGB(223, 200, 200, 206),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@@ -299,10 +308,7 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
? const Center(
|
? const Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"Tidak ada hasil",
|
"Tidak ada hasil",
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 16, color: Colors.black54),
|
||||||
fontSize: 16,
|
|
||||||
color: Colors.black54,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Padding(
|
: Padding(
|
||||||
@@ -317,12 +323,7 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
topLeft: Radius.circular(20),
|
topLeft: Radius.circular(20),
|
||||||
topRight: Radius.circular(20),
|
topRight: Radius.circular(20),
|
||||||
),
|
),
|
||||||
color: const Color.fromARGB(
|
color: const Color.fromARGB(255, 222, 181, 133),
|
||||||
255,
|
|
||||||
222,
|
|
||||||
181,
|
|
||||||
133,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
@@ -342,12 +343,8 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
child: CardList(
|
child: CardList(
|
||||||
title:
|
title: _listContent[index]["title"] ?? "",
|
||||||
_listContent[index]["title"] ??
|
body: _listContent[index]["body"] ?? "",
|
||||||
"",
|
|
||||||
body:
|
|
||||||
_listContent[index]["body"] ??
|
|
||||||
"",
|
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
@@ -365,7 +362,7 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
filteredItems[index]['file'],
|
filteredItems[index]['file'],
|
||||||
'paragraphs':
|
'paragraphs':
|
||||||
"""
|
"""
|
||||||
""" +
|
"""
|
||||||
"<h1> ${_listContent[index]["title"]} </h1> <p> ${_listContent[index]["body"]}",
|
"<h1> ${_listContent[index]["title"]} </h1> <p> ${_listContent[index]["body"]}",
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
@@ -381,18 +378,6 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return const Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.all(40),
|
|
||||||
child: Text("WebView tidak tersedia untuk platform ini."),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
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/collection_container.dart';
|
import 'package:freekake/components/collection_container.dart';
|
||||||
|
|
||||||
class DetailScreen extends StatefulWidget {
|
class DetailScreen extends StatefulWidget {
|
||||||
final String title;
|
final String title;
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ class ListDetailScreen extends StatefulWidget {
|
|||||||
final String filepath;
|
final String filepath;
|
||||||
|
|
||||||
const ListDetailScreen({
|
const ListDetailScreen({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.imagePath,
|
required this.imagePath,
|
||||||
required this.paragraphs,
|
required this.paragraphs,
|
||||||
required this.filepath,
|
required this.filepath,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ListDetailScreenState createState() => _ListDetailScreenState();
|
_ListDetailScreenState createState() => _ListDetailScreenState();
|
||||||
@@ -41,6 +41,11 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
|||||||
String html = await DefaultAssetBundle.of(
|
String html = await DefaultAssetBundle.of(
|
||||||
context,
|
context,
|
||||||
).loadString(widget.filepath);
|
).loadString(widget.filepath);
|
||||||
|
|
||||||
|
html = html.replaceAllMapped(
|
||||||
|
RegExp(r'<div class="gizi-grid">(.*?)</div>', dotAll: true),
|
||||||
|
(match) => '<gizi-grid>${match.group(1)}</gizi-grid>',
|
||||||
|
);
|
||||||
setState(() {
|
setState(() {
|
||||||
_htmlContent = html;
|
_htmlContent = html;
|
||||||
});
|
});
|
||||||
@@ -168,7 +173,17 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
|||||||
// );
|
// );
|
||||||
// },
|
// },
|
||||||
// ),
|
// ),
|
||||||
Html(
|
htmlBody(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// ),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Html htmlBody() {
|
||||||
|
return Html(
|
||||||
style: {"body": Style(color: const Color.fromRGBO(0, 0, 0, 1))},
|
style: {"body": Style(color: const Color.fromRGBO(0, 0, 0, 1))},
|
||||||
// data: widget.paragraphs,
|
// data: widget.paragraphs,
|
||||||
data: _htmlContent,
|
data: _htmlContent,
|
||||||
@@ -209,13 +224,28 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
|||||||
return const SizedBox();
|
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:flutter/material.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/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/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});
|
||||||
|
|||||||
@@ -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/collection_container.dart';
|
import 'package:freekake/components/collection_container.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/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});
|
||||||
|
|||||||
@@ -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/collection_container.dart';
|
import 'package:freekake/components/collection_container.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/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});
|
||||||
|
|||||||
@@ -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});
|
||||||
@@ -71,7 +71,24 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: const Color.fromARGB(255, 255, 255, 255),
|
backgroundColor: const Color.fromARGB(255, 255, 255, 255),
|
||||||
body: Stack(
|
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: [
|
children: [
|
||||||
//Top Bar
|
//Top Bar
|
||||||
Positioned(
|
Positioned(
|
||||||
@@ -85,12 +102,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
// Header Section
|
// Header Section
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10),
|
padding: const EdgeInsets.all(10),
|
||||||
color: const Color.fromARGB(
|
color: const Color.fromARGB(250, 255, 255, 255).withOpacity(0.0),
|
||||||
250,
|
|
||||||
255,
|
|
||||||
255,
|
|
||||||
255,
|
|
||||||
).withOpacity(0.0),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@@ -121,10 +133,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
|
|
||||||
// Search Bar
|
// Search Bar
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(horizontal: 40, vertical: 10),
|
||||||
horizontal: 40,
|
|
||||||
vertical: 10,
|
|
||||||
),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 47,
|
height: 47,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -160,7 +169,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Collection Items
|
// Collection Items
|
||||||
Container(
|
SizedBox(
|
||||||
height: 440,
|
height: 440,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
@@ -168,8 +177,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
vertical: 60,
|
vertical: 60,
|
||||||
),
|
),
|
||||||
child: GridView.builder(
|
child: GridView.builder(
|
||||||
gridDelegate:
|
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
const SliverGridDelegateWithMaxCrossAxisExtent(
|
|
||||||
maxCrossAxisExtent: 140,
|
maxCrossAxisExtent: 140,
|
||||||
mainAxisSpacing: 20,
|
mainAxisSpacing: 20,
|
||||||
crossAxisSpacing: 20,
|
crossAxisSpacing: 20,
|
||||||
@@ -259,7 +267,7 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
color: Colors.blueAccent,
|
color: Colors.blueAccent,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'Topic ' + (index + 1).toString(),
|
'Topic ${index + 1}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: Color.fromARGB(255, 0, 0, 0),
|
color: Color.fromARGB(255, 0, 0, 0),
|
||||||
@@ -301,7 +309,6 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
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';
|
||||||
|
|
||||||
@@ -11,6 +11,8 @@ import 'dart:io';
|
|||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class AkunSaya extends StatefulWidget {
|
class AkunSaya extends StatefulWidget {
|
||||||
|
const AkunSaya({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_AkunSayaState createState() => _AkunSayaState();
|
_AkunSayaState createState() => _AkunSayaState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ 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/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';
|
||||||
|
|
||||||
@@ -13,6 +13,8 @@ import 'package:image_picker_web/image_picker_web.dart';
|
|||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class ProfileScreenCopy extends StatefulWidget {
|
class ProfileScreenCopy extends StatefulWidget {
|
||||||
|
const ProfileScreenCopy({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ProfileScreenState createState() => _ProfileScreenState();
|
_ProfileScreenState createState() => _ProfileScreenState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ 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';
|
||||||
|
|
||||||
@@ -14,6 +14,8 @@ import 'dart:io';
|
|||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class ProfileScreen extends StatefulWidget {
|
class ProfileScreen extends StatefulWidget {
|
||||||
|
const ProfileScreen({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ProfileScreenState createState() => _ProfileScreenState();
|
_ProfileScreenState createState() => _ProfileScreenState();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -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.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
import 'package:furibase/main.dart';
|
import 'package:freekake/main.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||||
|
|||||||
Reference in New Issue
Block a user