57 lines
1.8 KiB
Dart
57 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import '../../../../application/outlet/selected_outlet/selected_outlet_bloc.dart';
|
|
import '../../../../common/theme/theme.dart';
|
|
import '../../../components/spacer/spacer.dart';
|
|
import 'header_outlet_bottom_sheet.dart';
|
|
|
|
class HeaderOutletSelector extends StatelessWidget {
|
|
const HeaderOutletSelector({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocBuilder<SelectedOutletBloc, SelectedOutletState>(
|
|
builder: (context, state) {
|
|
return GestureDetector(
|
|
onTap: () => HeaderOutletBottomSheet.show(context),
|
|
child: Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
|
decoration: BoxDecoration(
|
|
color: AppColor.white.withOpacity(0.15),
|
|
borderRadius: BorderRadius.circular(12),
|
|
border: Border.all(color: AppColor.white.withOpacity(0.3)),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Icon(
|
|
Icons.location_on_outlined,
|
|
color: AppColor.white,
|
|
size: 18,
|
|
),
|
|
const SpaceWidth(8),
|
|
Expanded(
|
|
child: Text(
|
|
state.displayName,
|
|
style: AppStyle.md.copyWith(
|
|
color: AppColor.white,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
maxLines: 1,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
),
|
|
Icon(
|
|
Icons.keyboard_arrow_down_rounded,
|
|
color: AppColor.white,
|
|
size: 20,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|