step 17 : extract widget field row history transaksi
This commit is contained in:
42
app_petty_cash/lib/widget/field_row_history_transaksi.dart
Normal file
42
app_petty_cash/lib/widget/field_row_history_transaksi.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
||||
import '../app/constant.dart';
|
||||
|
||||
class FieldRowHistoryTransaksi extends HookConsumerWidget {
|
||||
final String label;
|
||||
final String value;
|
||||
const FieldRowHistoryTransaksi({
|
||||
Key? key,
|
||||
required this.label,
|
||||
required this.value,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 10),
|
||||
child: SizedBox(
|
||||
width: Constant.getActualXPhone(context: context, x: 100),
|
||||
child: Text(label),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Text(':'),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(right: 10),
|
||||
child: Text(
|
||||
value,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user