From 7ca774e66e8d2e06b671fd2ec2a27ae52698f58f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Nov 2023 11:30:42 +0700 Subject: [PATCH] Update: tampilan form Kondisi Barang --- lib/pages/pengembalian_barang/create.dart | 25 +++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/pages/pengembalian_barang/create.dart b/lib/pages/pengembalian_barang/create.dart index 57fd7bc..6bfbf58 100644 --- a/lib/pages/pengembalian_barang/create.dart +++ b/lib/pages/pengembalian_barang/create.dart @@ -510,15 +510,24 @@ class _CreatePengembalianBarangPageState ), ), ), - Padding( - padding: EdgeInsets.symmetric(vertical: 8.0), - child: TextField( - controller: _kondisiPetiController, - decoration: InputDecoration( - labelText: 'Kondisi Barang', - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(10.0), + + SizedBox(height: 16.0), + Card( + elevation: 2, + child: Padding( + padding: const EdgeInsets.all(8), + child: TextFormField( + controller: _kondisiPetiController, + decoration: InputDecoration( + labelText: 'Kondisi Barang', + border: OutlineInputBorder(), ), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Harus diisi'; + } + return null; // Return null jika tidak ada kesalahan + }, ), ), ),