fixing mobile view
This commit is contained in:
@@ -39,7 +39,7 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/default.png', // Ganti dengan gambar yang sesuai
|
||||
'assets/images/default.png', // Ganti dengan gambar yang sesuai
|
||||
width: 100,
|
||||
height: 100,
|
||||
fit: BoxFit.cover,
|
||||
|
||||
@@ -4,6 +4,7 @@ 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:furibase/screen/pustaka/pustaka_detail_screen.dart';
|
||||
|
||||
class ListEducation extends StatefulWidget {
|
||||
@@ -43,13 +44,33 @@ class _ListEducationState extends State<ListEducation> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String _searchQuery = "";
|
||||
final List<Map<String, String>> _collections = [
|
||||
{"label": "Kesehatan", "image": "icons/healthy.svg"},
|
||||
{"label": "Gizi", "image": "icons/Nutrition.svg"},
|
||||
{"label": "Pendidikan", "image": "icons/Education.svg"},
|
||||
{"label": "Keselamatan", "image": "icons/Safety.svg"},
|
||||
final List<Map<String, dynamic>> _collections = [
|
||||
{
|
||||
"label": "Kesehatan",
|
||||
"image": "assets/icons/healthy.svg",
|
||||
"color": "#cdd0ee",
|
||||
"category": "kesehatan",
|
||||
},
|
||||
{
|
||||
"label": "Gizi",
|
||||
"image": "assets/icons/Nutrition.svg",
|
||||
"color": "#e8e29a",
|
||||
"category": "gizi",
|
||||
},
|
||||
{
|
||||
"label": "Pendidikan",
|
||||
"image": "assets/icons/Education.svg",
|
||||
"color": "#efd8c6",
|
||||
"category": "pendidikan",
|
||||
},
|
||||
{
|
||||
"label": "Keselamatan",
|
||||
"image": "assets/icons/Safety.svg",
|
||||
"color": "#cef1da",
|
||||
"category": "keselamatan",
|
||||
},
|
||||
];
|
||||
List<Map<String, String>> filteredCollections =
|
||||
List<Map<String, dynamic>> filteredCollections =
|
||||
_collections
|
||||
.where(
|
||||
(item) => item["label"]!.toLowerCase().contains(
|
||||
@@ -66,13 +87,13 @@ class _ListEducationState extends State<ListEducation> {
|
||||
),
|
||||
actions: <Widget>[],
|
||||
),
|
||||
backgroundColor: Colors.black26,
|
||||
backgroundColor: const Color.fromARGB(255, 255, 255, 255),
|
||||
body: Column(
|
||||
children: [
|
||||
// Header Section
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 165,
|
||||
height: 150,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromARGB(225, 79, 76, 182),
|
||||
borderRadius: BorderRadius.only(
|
||||
@@ -85,7 +106,7 @@ class _ListEducationState extends State<ListEducation> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20,
|
||||
vertical: 20,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Container(
|
||||
height: 47,
|
||||
@@ -141,21 +162,17 @@ class _ListEducationState extends State<ListEducation> {
|
||||
return CollectionContainer(
|
||||
label: item["label"]!,
|
||||
imageSvg: item["image"]!,
|
||||
iconw: 60,
|
||||
iconh: 60,
|
||||
iconw: 20,
|
||||
iconh: 20,
|
||||
width: 70,
|
||||
height: 70,
|
||||
circle: false,
|
||||
textColor: Colors.black,
|
||||
lblSize: 10,
|
||||
colorContiner: ColorHelper.hexToColor(item["color"]),
|
||||
onTapAc:
|
||||
() => {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ListEducation(),
|
||||
),
|
||||
),
|
||||
searchController.clear(),
|
||||
filterSearch(item["category"]),
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
|
||||
@@ -91,25 +91,25 @@ class _PustakaScreenState extends State<PustakaScreen> {
|
||||
final List<Map<String, String>> _collections = [
|
||||
{
|
||||
"label": "Luffy",
|
||||
"image": "images/luffy.png",
|
||||
"image": "assets/images/luffy.png",
|
||||
"description":
|
||||
"Karakter utama di One Piece.\nDia adalah bajak laut yang bercita-cita menjadi Raja Bajak Laut.",
|
||||
},
|
||||
{
|
||||
"label": "Oni Chan",
|
||||
"image": "images/klipartz.png",
|
||||
"image": "assets/images/klipartz.png",
|
||||
"description":
|
||||
"Karakter ikonik dari anime.\nIa dikenal karena sifatnya yang protektif dan penyayang.",
|
||||
},
|
||||
{
|
||||
"label": "Cepot",
|
||||
"image": "images/cepott.png",
|
||||
"image": "assets/images/cepott.png",
|
||||
"description":
|
||||
"Tokoh wayang golek terkenal.\nCepot dikenal dengan lelucon dan kebijaksanaannya.",
|
||||
},
|
||||
{
|
||||
"label": "Cepot",
|
||||
"image": "images/cepott.png",
|
||||
"image": "assets/images/cepott.png",
|
||||
"description":
|
||||
"Tokoh wayang golek terkenal.\nCepot dikenal dengan lelucon dan kebijaksanaannya.",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user