42 lines
1.1 KiB
Dart
42 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
/// Widget untuk tombol tambah item
|
|
class AddItemButton extends StatelessWidget {
|
|
final VoidCallback onTap;
|
|
|
|
const AddItemButton({super.key, required this.onTap});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final courierPrime = GoogleFonts.courierPrime(
|
|
textStyle: const TextStyle(
|
|
fontSize: 14,
|
|
height: 1.2,
|
|
),
|
|
);
|
|
|
|
return GestureDetector(
|
|
onTap: onTap,
|
|
child: Container(
|
|
width: double.infinity,
|
|
padding: const EdgeInsets.all(8.0),
|
|
color: Colors.white,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Icon(Icons.add, size: 16, color: Colors.grey[700]),
|
|
const SizedBox(width: 8),
|
|
Text(
|
|
'Tambah Item',
|
|
style: courierPrime.copyWith(
|
|
color: Colors.grey[700],
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |