You are on page 1of 2

Sdasdsads zcz

Xz
C
Zc
Z
C
xzc

```dart
import 'package:flutter/material.dart';

class DialogRekeningView extends StatelessWidget {


final Widget widgetSamping;
final String namaRek;
final String strDeksripsi;
final VoidCallback? onTap;

const DialogRekeningView({
Key? key,
required this.widgetSamping,
required this.namaRek,
required this.strDeksripsi,
this.onTap,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap, // Call the onTap callback when tapped
child: Container(
// Your dialog content here
child: Column(
children: [
// Add your content here
Text(namaRek),
Text(strDeksripsi),
widgetSamping,
],
),
),
);
}
}
```

In this modified `DialogRekeningView` class, I've added an `onTap` parameter of type


`VoidCallback?`. You can pass a function to this parameter when you create an instance of
`DialogRekeningView`. If you want to make the widget tappable, provide a function to the
`onTap` parameter when you use it:

```dart
DialogRekeningView(
widgetSamping: YourWidget(),
namaRek: 'Your Name',
strDeksripsi: 'Your Description',
onTap: () {
// Your onTap action here
print('Widget tapped!');
},
)
```

Now, when you tap the `DialogRekeningView` widget, the provided `onTap` callback will be
executed.

You might also like