재고 상세 다이얼로그화 및 마스터 레이아웃 개선
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
import '../../../../../widgets/components/superport_dialog.dart';
|
||||
|
||||
/// 재고 트랜잭션 상세 정보를 Superport 다이얼로그로 표시하는 헬퍼이다.
|
||||
Future<T?> showInventoryTransactionDetailDialog<T>({
|
||||
required BuildContext context,
|
||||
required String title,
|
||||
required String transactionNumber,
|
||||
required Widget body,
|
||||
List<Widget> actions = const [],
|
||||
bool includeDefaultClose = true,
|
||||
BoxConstraints? constraints,
|
||||
EdgeInsetsGeometry? contentPadding,
|
||||
bool scrollable = true,
|
||||
bool barrierDismissible = true,
|
||||
FutureOr<void> Function()? onSubmit,
|
||||
}) {
|
||||
final resolvedActions = <Widget>[
|
||||
...actions,
|
||||
if (includeDefaultClose)
|
||||
ShadButton.ghost(
|
||||
onPressed: () => Navigator.of(context).maybePop(),
|
||||
child: const Text('닫기'),
|
||||
),
|
||||
];
|
||||
|
||||
return showSuperportDialog<T>(
|
||||
context: context,
|
||||
title: title,
|
||||
description: '트랜잭션번호 $transactionNumber',
|
||||
body: body,
|
||||
actions: resolvedActions,
|
||||
constraints: constraints,
|
||||
contentPadding: contentPadding,
|
||||
scrollable: scrollable,
|
||||
barrierDismissible: barrierDismissible,
|
||||
onSubmit: onSubmit,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user