644 lines
27 KiB
Dart
644 lines
27 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class DashboardInfoScreen extends StatelessWidget {
|
|
const DashboardInfoScreen({super.key});
|
|
|
|
// ==== Palet warna tema (tetap hijau) ====
|
|
static const Color primaryGreen = Color(0xFF2E7D32);
|
|
static const Color accentGreen = Color(0xFF43A047);
|
|
static const Color bgColor = Color(0xFFF5F7FA);
|
|
|
|
// ==== Badge icon kotak membulat (pengganti Icon polos) ====
|
|
Widget _iconBadge(IconData icon, Color color) {
|
|
return Container(
|
|
width: 44,
|
|
height: 44,
|
|
decoration: BoxDecoration(
|
|
color: color.withOpacity(0.12),
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
child: Icon(icon, color: color, size: 22),
|
|
);
|
|
}
|
|
|
|
// ==== Card section modern (pengganti Card + ExpansionTile polos) ====
|
|
Widget _sectionCard(
|
|
BuildContext context, {
|
|
required IconData icon,
|
|
required Color color,
|
|
required String title,
|
|
String? subtitle,
|
|
required List<Widget> children,
|
|
}) {
|
|
return Container(
|
|
margin: const EdgeInsets.only(bottom: 14),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(18),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.black.withOpacity(0.05),
|
|
blurRadius: 14,
|
|
offset: const Offset(0, 4),
|
|
),
|
|
],
|
|
),
|
|
child: Theme(
|
|
data: Theme.of(context).copyWith(dividerColor: Colors.transparent),
|
|
child: ExpansionTile(
|
|
shape: const RoundedRectangleBorder(side: BorderSide.none),
|
|
collapsedShape: const RoundedRectangleBorder(side: BorderSide.none),
|
|
tilePadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 6),
|
|
childrenPadding: EdgeInsets.zero,
|
|
iconColor: color,
|
|
collapsedIconColor: Colors.grey,
|
|
leading: _iconBadge(icon, color),
|
|
title: Text(
|
|
title,
|
|
style: const TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 15,
|
|
),
|
|
),
|
|
subtitle: subtitle != null
|
|
? Text(
|
|
subtitle,
|
|
style: TextStyle(fontSize: 12, color: Colors.grey.shade600),
|
|
)
|
|
: null,
|
|
children: children,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
// ==== Info pill kecil (pengganti Row biasa untuk 0-6 Asam, dsb) ====
|
|
Widget _infoPill(String left, String right, {Color? bg, Color? fg}) {
|
|
return Container(
|
|
margin: const EdgeInsets.only(bottom: 8),
|
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
|
|
decoration: BoxDecoration(
|
|
color: bg ?? Colors.grey.shade100,
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(left, style: TextStyle(fontWeight: FontWeight.w600, color: fg)),
|
|
Text(right, style: TextStyle(color: fg ?? Colors.grey.shade700)),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
// ==== Highlight box nilai ideal (pH ideal / TDS ideal di dalam expansion) ====
|
|
Widget _highlightBox(String label, String value, Color color) {
|
|
return Container(
|
|
width: double.infinity,
|
|
padding: const EdgeInsets.all(16),
|
|
decoration: BoxDecoration(
|
|
color: color.withOpacity(0.08),
|
|
borderRadius: BorderRadius.circular(14),
|
|
border: Border.all(color: color.withOpacity(0.25)),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Text(
|
|
label,
|
|
style: TextStyle(fontWeight: FontWeight.w600, color: color.withOpacity(0.8)),
|
|
),
|
|
const SizedBox(height: 6),
|
|
Text(
|
|
value,
|
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold, color: color),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
// ==== Kondisi threshold (Jika TDS < 800, dsb) ====
|
|
Widget _conditionBox(String title, String desc, IconData icon, Color color) {
|
|
return Container(
|
|
margin: const EdgeInsets.only(bottom: 10),
|
|
padding: const EdgeInsets.all(14),
|
|
decoration: BoxDecoration(
|
|
color: color.withOpacity(0.08),
|
|
borderRadius: BorderRadius.circular(14),
|
|
border: Border(left: BorderSide(color: color, width: 4)),
|
|
),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Icon(icon, color: color, size: 20),
|
|
const SizedBox(width: 10),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(title, style: TextStyle(fontWeight: FontWeight.bold, color: color)),
|
|
const SizedBox(height: 4),
|
|
Text(desc, style: const TextStyle(fontSize: 13, height: 1.4)),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
// ==== List item komponen (pengganti ListTile + Divider) ====
|
|
Widget _componentItem(IconData icon, String title, String desc) {
|
|
return Container(
|
|
margin: const EdgeInsets.only(bottom: 10),
|
|
padding: const EdgeInsets.all(12),
|
|
decoration: BoxDecoration(
|
|
color: Colors.grey.shade50,
|
|
borderRadius: BorderRadius.circular(14),
|
|
),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
_iconBadge(icon, primaryGreen),
|
|
const SizedBox(width: 12),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(title, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 14)),
|
|
const SizedBox(height: 3),
|
|
Text(
|
|
desc,
|
|
style: TextStyle(fontSize: 12.5, color: Colors.grey.shade700, height: 1.4),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
// ==== Step timeline untuk "Cara Kerja Sistem" ====
|
|
Widget _buildStep(String number, String text, {bool isLast = false}) {
|
|
return IntrinsicHeight(
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Column(
|
|
children: [
|
|
Container(
|
|
width: 30,
|
|
height: 30,
|
|
alignment: Alignment.center,
|
|
decoration: const BoxDecoration(
|
|
color: Colors.purple,
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: Text(
|
|
number,
|
|
style: const TextStyle(
|
|
color: Colors.white,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 13,
|
|
),
|
|
),
|
|
),
|
|
if (!isLast)
|
|
Expanded(
|
|
child: Container(
|
|
width: 2,
|
|
color: Colors.purple.withOpacity(0.25),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(width: 14),
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(bottom: 20),
|
|
child: Text(
|
|
text,
|
|
textAlign: TextAlign.justify,
|
|
style: const TextStyle(height: 1.4),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: bgColor,
|
|
appBar: AppBar(
|
|
elevation: 0,
|
|
centerTitle: true,
|
|
backgroundColor: primaryGreen,
|
|
title: const Text(
|
|
"Dashboard",
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
body: ListView(
|
|
padding: const EdgeInsets.all(16),
|
|
children: [
|
|
// ===== HEADER =====
|
|
Container(
|
|
padding: const EdgeInsets.all(24),
|
|
decoration: BoxDecoration(
|
|
gradient: const LinearGradient(
|
|
begin: Alignment.topLeft,
|
|
end: Alignment.bottomRight,
|
|
colors: [primaryGreen, accentGreen],
|
|
),
|
|
borderRadius: BorderRadius.circular(24),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: primaryGreen.withOpacity(0.35),
|
|
blurRadius: 16,
|
|
offset: const Offset(0, 8),
|
|
),
|
|
],
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Container(
|
|
padding: const EdgeInsets.all(14),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white.withOpacity(0.15),
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: const Icon(Icons.eco, color: Colors.white, size: 44),
|
|
),
|
|
const SizedBox(height: 14),
|
|
const Text(
|
|
"Eco Green House",
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
const SizedBox(height: 8),
|
|
Text(
|
|
"Sistem Monitoring dan Kontrol pH dan Nutrisi Tanaman Hidroponik Berbasis Internet of Things (IoT)",
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: Colors.white.withOpacity(0.9),
|
|
fontSize: 13,
|
|
height: 1.5,
|
|
),
|
|
),
|
|
const SizedBox(height: 22),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: Container(
|
|
padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 10),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white.withOpacity(0.15),
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
child: const Column(
|
|
children: [
|
|
Icon(Icons.science, color: Colors.white, size: 22),
|
|
SizedBox(height: 6),
|
|
Text("pH Ideal", style: TextStyle(color: Colors.white, fontSize: 12)),
|
|
SizedBox(height: 2),
|
|
Text(
|
|
"6.5 - 7.5",
|
|
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 17),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: 12),
|
|
Expanded(
|
|
child: Container(
|
|
padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 10),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white.withOpacity(0.15),
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
child: const Column(
|
|
children: [
|
|
Icon(Icons.water_drop, color: Colors.white, size: 22),
|
|
SizedBox(height: 6),
|
|
Text("TDS Ideal", style: TextStyle(color: Colors.white, fontSize: 12)),
|
|
SizedBox(height: 2),
|
|
Text(
|
|
"800-1200 PPM",
|
|
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 17),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
|
|
const SizedBox(height: 22),
|
|
|
|
// ===== TENTANG SISTEM =====
|
|
_sectionCard(
|
|
context,
|
|
icon: Icons.eco,
|
|
color: primaryGreen,
|
|
title: "Tentang Sistem",
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
|
|
child: Text(
|
|
"Sistem Monitoring dan Kontrol pH dan Nutrisi Tanaman Hidroponik "
|
|
"Berbasis Internet of Things (IoT) menggunakan ESP32 dan Firebase "
|
|
"Realtime Database merupakan sistem yang dirancang untuk membantu "
|
|
"pengguna dalam memantau serta mengendalikan kondisi larutan "
|
|
"hidroponik secara otomatis dan real-time.\n\n"
|
|
"Sistem ini menggunakan sensor pH untuk mengukur tingkat keasaman "
|
|
"larutan dan sensor TDS untuk mengukur konsentrasi nutrisi. Data "
|
|
"yang diperoleh akan diproses oleh ESP32 dan dikirimkan ke Firebase "
|
|
"sehingga dapat dipantau melalui aplikasi Android.\n\n"
|
|
"Selain melakukan monitoring, sistem juga mampu melakukan kontrol "
|
|
"otomatis terhadap pompa nutrisi, pompa air, pompa pH Up dan pompa "
|
|
"pH Down untuk menjaga kualitas larutan nutrisi agar tetap berada "
|
|
"pada rentang yang diinginkan.",
|
|
textAlign: TextAlign.justify,
|
|
style: const TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
// ===== APA ITU pH =====
|
|
_sectionCard(
|
|
context,
|
|
icon: Icons.science,
|
|
color: Colors.blue,
|
|
title: "Apa itu pH?",
|
|
subtitle: "Mengukur tingkat keasaman larutan",
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const Text(
|
|
"pH (Potential of Hydrogen) merupakan ukuran yang digunakan untuk mengetahui tingkat keasaman atau kebasaan suatu larutan.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
const SizedBox(height: 14),
|
|
_infoPill("0 - 6", "Asam", bg: Colors.red.shade50, fg: Colors.red.shade700),
|
|
_infoPill("7", "Netral", bg: Colors.grey.shade200, fg: Colors.grey.shade800),
|
|
_infoPill("8 - 14", "Basa", bg: Colors.blue.shade50, fg: Colors.blue.shade700),
|
|
const SizedBox(height: 6),
|
|
const Text(
|
|
"Dalam sistem hidroponik, pH sangat penting karena mempengaruhi kemampuan akar tanaman dalam menyerap unsur hara yang tersedia pada larutan nutrisi.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
const SizedBox(height: 14),
|
|
_highlightBox("Rentang pH Ideal", "6.5 - 7.5", primaryGreen),
|
|
const SizedBox(height: 14),
|
|
const Text(
|
|
"Jika nilai pH berada di bawah batas minimum maka sistem akan mengaktifkan pompa pH Up. Sebaliknya, jika nilai pH melebihi batas maksimum maka sistem akan mengaktifkan pompa pH Down hingga kembali ke rentang yang diinginkan.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
// ===== APA ITU TDS / PPM =====
|
|
_sectionCard(
|
|
context,
|
|
icon: Icons.water_drop,
|
|
color: Colors.teal,
|
|
title: "Apa itu TDS / PPM?",
|
|
subtitle: "Mengukur konsentrasi nutrisi larutan",
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const Text(
|
|
"TDS (Total Dissolved Solids) merupakan jumlah zat terlarut yang terdapat di dalam air. Pada sistem hidroponik, zat terlarut tersebut berupa unsur hara atau nutrisi yang dibutuhkan tanaman untuk tumbuh dan berkembang.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
const SizedBox(height: 12),
|
|
const Text(
|
|
"Nilai TDS biasanya dinyatakan dalam satuan PPM (Parts Per Million). Semakin tinggi nilai PPM maka semakin banyak nutrisi yang terkandung dalam larutan.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
const SizedBox(height: 14),
|
|
_highlightBox("Rentang Nutrisi Sistem", "800 - 1200 PPM", Colors.teal),
|
|
const SizedBox(height: 14),
|
|
_conditionBox(
|
|
"Jika TDS < 800 PPM",
|
|
"Pompa nutrisi akan aktif untuk menambahkan larutan AB Mix.",
|
|
Icons.add_circle_outline,
|
|
Colors.orange.shade800,
|
|
),
|
|
_conditionBox(
|
|
"Jika TDS > 1200 PPM",
|
|
"Pompa air akan aktif untuk mengencerkan larutan nutrisi.",
|
|
Icons.water,
|
|
Colors.blue.shade700,
|
|
),
|
|
const SizedBox(height: 6),
|
|
const Text(
|
|
"Menjaga nilai TDS pada rentang yang sesuai sangat penting agar tanaman memperoleh nutrisi yang cukup tanpa mengalami kekurangan maupun kelebihan unsur hara.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
// ===== NUTRISI HIDROPONIK =====
|
|
_sectionCard(
|
|
context,
|
|
icon: Icons.local_drink,
|
|
color: Colors.deepOrange,
|
|
title: "Apa itu Nutrisi Hidroponik?",
|
|
subtitle: "Sumber unsur hara bagi tanaman",
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const Text(
|
|
"Nutrisi hidroponik merupakan larutan yang mengandung unsur hara yang dibutuhkan tanaman untuk tumbuh dan berkembang. Pada budidaya hidroponik, tanaman tidak memperoleh nutrisi dari tanah sehingga seluruh kebutuhan unsur hara diberikan melalui larutan nutrisi yang dicampurkan ke dalam air.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
const SizedBox(height: 12),
|
|
const Text(
|
|
"Pada sistem hidroponik umumnya digunakan larutan AB Mix yang mengandung unsur hara makro dan mikro.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
const SizedBox(height: 14),
|
|
Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Expanded(
|
|
child: Container(
|
|
padding: const EdgeInsets.all(12),
|
|
decoration: BoxDecoration(
|
|
color: Colors.orange.shade50,
|
|
borderRadius: BorderRadius.circular(14),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text("Makro", style: TextStyle(fontWeight: FontWeight.bold, color: Colors.orange.shade800)),
|
|
const SizedBox(height: 8),
|
|
const Text(
|
|
"Nitrogen (N)\nFosfor (P)\nKalium (K)\nKalsium (Ca)\nMagnesium (Mg)\nSulfur (S)",
|
|
style: TextStyle(fontSize: 12.5, height: 1.6),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: 10),
|
|
Expanded(
|
|
child: Container(
|
|
padding: const EdgeInsets.all(12),
|
|
decoration: BoxDecoration(
|
|
color: Colors.orange.shade50,
|
|
borderRadius: BorderRadius.circular(14),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text("Mikro", style: TextStyle(fontWeight: FontWeight.bold, color: Colors.orange.shade800)),
|
|
const SizedBox(height: 8),
|
|
const Text(
|
|
"Besi (Fe)\nMangan (Mn)\nTembaga (Cu)\nSeng (Zn)\nBoron (B)\nMolibdenum (Mo)",
|
|
style: TextStyle(fontSize: 12.5, height: 1.6),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 14),
|
|
Container(
|
|
padding: const EdgeInsets.all(14),
|
|
decoration: BoxDecoration(
|
|
color: primaryGreen.withOpacity(0.08),
|
|
borderRadius: BorderRadius.circular(14),
|
|
),
|
|
child: const Text(
|
|
"Pada sistem ini, konsentrasi nutrisi dipantau menggunakan sensor TDS. Jika nilai TDS berada di bawah 800 PPM maka pompa nutrisi akan aktif untuk menambahkan larutan AB Mix secara otomatis hingga mencapai rentang yang telah ditentukan.",
|
|
textAlign: TextAlign.justify,
|
|
style: TextStyle(height: 1.5, fontSize: 13.5),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
// ===== KOMPONEN SISTEM =====
|
|
_sectionCard(
|
|
context,
|
|
icon: Icons.memory,
|
|
color: Colors.orange,
|
|
title: "Komponen Sistem",
|
|
subtitle: "Perangkat yang digunakan pada sistem",
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
|
|
child: Column(
|
|
children: [
|
|
_componentItem(Icons.memory, "ESP32",
|
|
"Mikrokontroler utama yang mengolah data sensor, mengendalikan relay, dan mengirim data ke Firebase."),
|
|
_componentItem(Icons.developer_board, "ADS1115",
|
|
"Modul ADC 16-bit yang digunakan untuk membaca data analog dari sensor pH dan sensor TDS dengan resolusi yang lebih baik."),
|
|
_componentItem(Icons.science, "Sensor pH",
|
|
"Digunakan untuk mengukur tingkat keasaman atau kebasaan larutan nutrisi."),
|
|
_componentItem(Icons.water_drop, "Sensor TDS",
|
|
"Digunakan untuk mengukur konsentrasi nutrisi yang terlarut dalam larutan hidroponik."),
|
|
_componentItem(Icons.swap_horiz, "Relay",
|
|
"Berfungsi sebagai saklar elektronik untuk mengendalikan pompa secara otomatis."),
|
|
_componentItem(Icons.local_drink, "Pompa",
|
|
"Digunakan untuk menambahkan nutrisi, air, pH Up, dan pH Down ke dalam bak hidroponik."),
|
|
_componentItem(Icons.storage, "Firebase Realtime Database",
|
|
"Digunakan untuk menyimpan data monitoring dan sebagai media komunikasi antara ESP32 dan aplikasi Android."),
|
|
_componentItem(Icons.monitor, "LCD 16x2 I2C",
|
|
"Digunakan untuk menampilkan informasi pH, TDS, dan status sistem secara langsung pada alat."),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
// ===== CARA KERJA SISTEM =====
|
|
_sectionCard(
|
|
context,
|
|
icon: Icons.settings,
|
|
color: Colors.purple,
|
|
title: "Cara Kerja Sistem",
|
|
subtitle: "Alur kerja alat dari awal hingga akhir",
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
_buildStep("1",
|
|
"ESP32 terhubung ke jaringan WiFi dan Firebase Realtime Database untuk melakukan komunikasi data secara real-time."),
|
|
_buildStep("2",
|
|
"ESP32 membaca nilai setpoint pH dan TDS yang telah ditentukan pengguna melalui aplikasi Android."),
|
|
_buildStep("3",
|
|
"Sensor water level memeriksa ketersediaan larutan air, nutrisi AB Mix, pH Up, dan pH Down pada masing-masing tangki."),
|
|
_buildStep("4",
|
|
"Sensor TDS membaca konsentrasi nutrisi pada larutan hidroponik dan mengirimkan data ke ESP32 melalui ADS1115."),
|
|
_buildStep("5",
|
|
"Jika nilai TDS berada di bawah batas minimum, pompa nutrisi akan aktif secara otomatis untuk menambahkan larutan AB Mix. Jika nilai TDS terlalu tinggi, pompa air akan aktif untuk mengencerkan larutan."),
|
|
_buildStep("6",
|
|
"Setelah penambahan larutan, sistem memberikan waktu pencampuran agar nutrisi dan air tercampur secara merata sebelum dilakukan pembacaan berikutnya."),
|
|
_buildStep("7",
|
|
"Sensor pH membaca tingkat keasaman larutan hidroponik dan mengirimkan data ke ESP32."),
|
|
_buildStep("8",
|
|
"Jika nilai pH berada di bawah batas minimum maka pompa pH Up akan aktif. Jika nilai pH berada di atas batas maksimum maka pompa pH Down akan aktif hingga pH kembali ke rentang yang ditentukan."),
|
|
_buildStep("9",
|
|
"Data monitoring seperti nilai pH, TDS, status relay, status sistem, dan kondisi tangki dikirim ke Firebase sehingga dapat dipantau melalui aplikasi Android secara real-time."),
|
|
_buildStep(
|
|
"10",
|
|
"Proses monitoring dan kontrol dilakukan secara berulang sehingga kondisi larutan hidroponik tetap berada pada rentang yang sesuai untuk pertumbuhan tanaman.",
|
|
isLast: true,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
const SizedBox(height: 8),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
} |