MIF_E31222653/aplikasi/lib/presentation/screens/features/delivery_address_page.dart

161 lines
5.8 KiB
Dart

import 'package:flutter/material.dart';
class DeliveryAddressPage extends StatelessWidget {
const DeliveryAddressPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.white,
elevation: 0,
leading: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.black),
onPressed: () => Navigator.pop(context),
),
title: const Text(
'Alamat Pengiriman',
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
body: Column(
children: [
// Map Container
Container(
height: 300,
width: double.infinity,
color: Colors.grey[200],
child: Stack(
children: [
// Here you would integrate actual map
Image.asset(
'assets/images/map.png',
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
),
// Location button overlay
Positioned(
top: 16,
left: 16,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
),
child: IconButton(
icon: const Icon(Icons.my_location, color: Colors.blue),
onPressed: () {
// Handle location button press
},
),
),
),
],
),
),
// Address Details
Expanded(
child: Container(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[300]!),
borderRadius: BorderRadius.circular(8),
),
child: ListTile(
leading: Icon(Icons.location_on_outlined, color: Colors.grey[600]),
title: const Text(
'Gedung Jurusan Teknologi Informasi',
style: TextStyle(
fontSize: 14,
color: Colors.black87,
),
),
trailing: const Icon(Icons.keyboard_arrow_down, color: Colors.grey),
contentPadding: const EdgeInsets.symmetric(horizontal: 12),
),
),
const SizedBox(height: 16),
Text(
'Detail Lokasi',
style: TextStyle(
fontSize: 14,
color: Colors.grey[600],
),
),
const SizedBox(height: 8),
TextField(
decoration: InputDecoration(
hintText: 'Lantai 1 Ruang Baca JTI',
hintStyle: TextStyle(color: Colors.grey[600]),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(color: Colors.grey[300]!),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(color: Colors.grey[300]!),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: const BorderSide(color: Colors.blue),
),
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16),
),
style: const TextStyle(
fontSize: 14,
color: Colors.black87,
),
),
const Spacer(),
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: () {
WidgetsBinding.instance.addPostFrameCallback((_) {
Navigator.pop(context);
});
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2196F3),
padding: const EdgeInsets.symmetric(vertical: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
elevation: 0,
),
child: const Text(
'Konfirmasi',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.white,
),
),
),
),
],
),
),
),
],
),
);
}
}