148 lines
4.3 KiB
Dart
148 lines
4.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'register.dart';
|
|
|
|
class WelcomePage extends StatelessWidget {
|
|
const WelcomePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Container(
|
|
width: double.infinity,
|
|
decoration: const BoxDecoration(
|
|
gradient: LinearGradient(
|
|
begin: Alignment.topCenter,
|
|
end: Alignment.bottomCenter,
|
|
colors: [
|
|
Color(0xFF5F7F7A),
|
|
Color(0xFFE8ECEB),
|
|
],
|
|
),
|
|
),
|
|
|
|
child: SafeArea(
|
|
child: Column(
|
|
children: [
|
|
|
|
const SizedBox(height: 30),
|
|
|
|
// ===== JUDUL =====
|
|
const Text(
|
|
'Selamat Datang!',
|
|
style: TextStyle(
|
|
fontSize: 30,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
const Text(
|
|
'Monitoring Fermentasi Tempe',
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
color: Colors.white70,
|
|
),
|
|
),
|
|
|
|
const SizedBox(height: 25),
|
|
|
|
// ===== GAMBAR =====
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 24),
|
|
child: Image.asset(
|
|
'assets/images/tempe.png',
|
|
height: 220,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
// ===== DESKRIPSI =====
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 28),
|
|
child: Text(
|
|
'Aplikasi ini membantu Anda memantau dan mengontrol suhu proses fermentasi tempe secara real-time menggunakan teknologi Internet of Things (IoT).',
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
color: Colors.grey[800],
|
|
),
|
|
),
|
|
),
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
// ===== FITUR =====
|
|
buildFeature('Pantau suhu fermentasi dengan mudah'),
|
|
buildFeature('Dapatkan informasi suhu secara real-time'),
|
|
buildFeature('Lihat status sistem kapan saja dan di mana saja'),
|
|
|
|
const Spacer(),
|
|
|
|
// ===== BUTTON =====
|
|
Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(horizontal: 24, vertical: 24),
|
|
child: SizedBox(
|
|
width: double.infinity,
|
|
height: 52,
|
|
child: ElevatedButton(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: const Color(0xFF5F7F7A),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(30),
|
|
),
|
|
elevation: 5,
|
|
),
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const RegisterPage(),
|
|
),
|
|
);
|
|
},
|
|
child: const Text(
|
|
'MULAI',
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.bold,
|
|
letterSpacing: 1,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
// ===== WIDGET FITUR =====
|
|
static Widget buildFeature(String text) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 6),
|
|
child: Row(
|
|
children: [
|
|
const Icon(
|
|
Icons.check_circle,
|
|
color: Color(0xFF5F7F7A),
|
|
size: 22,
|
|
),
|
|
const SizedBox(width: 10),
|
|
Expanded(
|
|
child: Text(
|
|
text,
|
|
style: const TextStyle(fontSize: 14),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
} |