Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
658 changes: 658 additions & 0 deletions apps/mobile/lib/features/marketplace/warga/batik_camera_page.dart

Large diffs are not rendered by default.

989 changes: 989 additions & 0 deletions apps/mobile/lib/features/marketplace/warga/batik_detection_page.dart

Large diffs are not rendered by default.

498 changes: 498 additions & 0 deletions apps/mobile/lib/features/marketplace/warga/detail_produk_batik.dart

Large diffs are not rendered by default.

422 changes: 422 additions & 0 deletions apps/mobile/lib/features/marketplace/warga/marketplace_warga.dart

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import 'package:flutter/material.dart';

class CategoryChip extends StatelessWidget {
final String label;
final bool isSelected;
final VoidCallback onTap;

const CategoryChip({
super.key,
required this.label,
required this.isSelected,
required this.onTap,
});

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(right: 8),
child: GestureDetector(
onTap: onTap,
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
decoration: BoxDecoration(
color: isSelected ? const Color(0xFF6366F1) : Colors.white,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: isSelected ? const Color(0xFF6366F1) : Colors.grey[300]!,
),
boxShadow: isSelected
? [
BoxShadow(
color: const Color(0xFF6366F1).withOpacity(0.3),
blurRadius: 8,
offset: const Offset(0, 2),
),
]
: null,
),
child: Text(
label,
style: TextStyle(
color: isSelected ? Colors.white : Colors.grey[700],
fontWeight: isSelected ? FontWeight.bold : FontWeight.w500,
fontSize: 13,
),
),
),
),
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
import 'package:flutter/material.dart';

class ProductCardWarga extends StatelessWidget {
final Map<String, dynamic> product;
final VoidCallback onTap;

const ProductCardWarga({
super.key,
required this.product,
required this.onTap,
});

@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.1),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Product Image
Container(
height: 140,
decoration: BoxDecoration(
color: Colors.grey[200],
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12),
),
),
child: Stack(
children: [
ClipRRect(
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12),
),
child: Image.network(
product['image'],
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return Center(
child: Icon(
Icons.image_outlined,
size: 40,
color: Colors.grey[400],
),
);
},
),
),
// Favorite Button
Positioned(
top: 8,
right: 8,
child: Container(
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 4,
),
],
),
child: const Icon(
Icons.favorite_border,
size: 16,
color: Colors.red,
),
),
),
// Motif Badge
Positioned(
bottom: 8,
left: 8,
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.6),
borderRadius: BorderRadius.circular(6),
),
child: Text(
product['motif'],
style: const TextStyle(
color: Colors.white,
fontSize: 10,
fontWeight: FontWeight.w600,
),
),
),
),
],
),
),

// Product Info
Expanded(
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Product Name
Text(
product['name'],
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
height: 1.3,
),
),
const SizedBox(height: 4),

// Price
Text(
'Rp ${product['price'].toString().replaceAllMapped(RegExp(r'(\d{1,3})(?=(\d{3})+(?!\d))'), (Match m) => '${m[1]}.')}',
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Color(0xFF6366F1),
),
),
const Spacer(),

// Rating and Sold
Row(
children: [
const Icon(
Icons.star,
size: 12,
color: Colors.amber,
),
const SizedBox(width: 2),
Text(
product['rating'].toString(),
style: const TextStyle(
fontSize: 11,
fontWeight: FontWeight.w500,
),
),
const SizedBox(width: 4),
Text(
'| ${product['sold']}',
style: TextStyle(
fontSize: 11,
color: Colors.grey[600],
),
),
],
),
],
),
),
),
],
),
),
);
}
}
49 changes: 37 additions & 12 deletions apps/mobile/lib/models/buttom_navbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ class _AppBottomNavBarState extends State<AppBottomNavBar> {
page = const LainnyaPage();
}

Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (_) => page),
);
Navigator.pushReplacement(context, MaterialPageRoute(builder: (_) => page));
}

@override
Expand All @@ -63,13 +60,41 @@ class _AppBottomNavBarState extends State<AppBottomNavBar> {
borderRadius: BorderRadius.circular(32),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 14, sigmaY: 14),
child: Row(children: const [
Expanded(child: _NavItem(icon: Icons.home, label: "Beranda", index: 0)),
Expanded(child: _NavItem(icon: Icons.people, label: "Kependudukan", index: 1)),
Expanded(child: _NavItem(icon: Icons.account_balance, label: "Keuangan", index: 2)),
Expanded(child: _NavItem(icon: Icons.store, label: "Marketplace", index: 3)),
Expanded(child: _NavItem(icon: Icons.more_horiz, label: "Lainnya", index: 4)),
]),
child: Row(
children: const [
Expanded(
child: _NavItem(icon: Icons.home, label: "Beranda", index: 0),
),
Expanded(
child: _NavItem(
icon: Icons.people,
label: "Kependudukan",
index: 1,
),
),
Expanded(
child: _NavItem(
icon: Icons.account_balance,
label: "Keuangan",
index: 2,
),
),
Expanded(
child: _NavItem(
icon: Icons.store,
label: "Marketplace",
index: 3,
),
),
Expanded(
child: _NavItem(
icon: Icons.more_horiz,
label: "Lainnya",
index: 4,
),
),
],
),
),
),
);
Expand Down Expand Up @@ -114,7 +139,7 @@ class _NavItem extends StatelessWidget {
Shadow(
color: Colors.cyan.withOpacity(0.4),
blurRadius: 6,
)
),
]
: [],
),
Expand Down
2 changes: 2 additions & 0 deletions apps/mobile/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import FlutterMacOS
import Foundation

import file_selector_macos
import path_provider_foundation

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
}
Loading