part of 'dialog.dart'; class OutletDialog extends StatefulWidget { const OutletDialog({super.key}); @override State createState() => _OutletDialogState(); } class _OutletDialogState extends State { @override void initState() { super.initState(); context.read().add( OutletLoaderEvent.fetched(isRefresh: true), ); } @override Widget build(BuildContext context) { return CustomModalDialog( title: 'Outlet', subtitle: 'Silahkan pilih outlet', minWidth: context.deviceWidth * 0.4, contentPadding: const EdgeInsets.symmetric( horizontal: 16.0, vertical: 24.0, ), child: BlocBuilder( builder: (context, state) { if (state.isFetching) { return LoaderWithText(); } return Column( children: [ ...List.generate( state.outlets.length, (index) => GestureDetector( onTap: () { // selectOutlet(outlets[index]); }, child: OutletCard( outlet: state.outlets[index], isSelected: false, ), ), ), SpaceHeight(24), AppElevatedButton.filled(onPressed: null, label: 'Terapkan'), ], ); }, ), ); } }