part of 'courierspage.dart'; class CouriersDetails extends StatelessWidget { const CouriersDetails({super.key}); @override Widget build(final BuildContext context) => BrandBottomSheet( child: BlocProvider( create: (final BuildContext context) => CourierFormCubit( cubit: context.read(), ), child: Builder( builder: (final BuildContext context) => BlocListener( listener: (final BuildContext context, final FormCubitState state) { if (state.isSubmitted) { Navigator.pop(context); } }, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ AppBar( title: const Padding( padding: EdgeInsets.only(top: 4.0), child: Text('Новый курьер!'), ), ), const SizedBox(width: 14), Padding( padding: const EdgeInsets.symmetric(horizontal: 15), child: Column( mainAxisSize: MainAxisSize.min, children: [ const SizedBox(width: 14), IntrinsicHeight( child: CubitFormTextField( formFieldCubit: context.read().name, decoration: const InputDecoration( labelText: 'Имя', ), ), ), const SizedBox(height: 20), CubitFormTextField( formFieldCubit: context.read().surname, decoration: const InputDecoration( alignLabelWithHint: false, labelText: 'Фамилия', ), ), const SizedBox(height: 20), CubitFormTextField( formFieldCubit: context.read().phone, decoration: const InputDecoration( alignLabelWithHint: false, labelText: 'Телефон', ), ), const SizedBox(height: 30), FilledButton( onPressed: () => context.read().trySubmit(), title: 'Создать', ), const SizedBox(height: 40), ], ), ), ], ), ), ), ), ); }