forked from eatvio/eatvio_app
fix: fixed analyzer issues and merge conflicts
This commit is contained in:
@@ -47,7 +47,7 @@ class ChatRoomCubit extends Cubit<ChatRoomState> {
|
||||
_timer?.cancel();
|
||||
}
|
||||
|
||||
loadNextPage(String chatId) async {
|
||||
Future<void> loadNextPage(String chatId) async {
|
||||
if (currentPage < lastPage && !isLoading) {
|
||||
isLoading = true;
|
||||
|
||||
@@ -89,7 +89,7 @@ class ChatRoomCubit extends Cubit<ChatRoomState> {
|
||||
}
|
||||
}
|
||||
|
||||
initChat(String chatId, {bool sendInitialMessage = false}) async {
|
||||
Future<void> initChat(String chatId, {bool sendInitialMessage = false}) async {
|
||||
try {
|
||||
final chatRoom = await chatRepository.getChatRoom(chatId);
|
||||
ChosenPlanModel? chosenPlan;
|
||||
|
||||
@@ -69,7 +69,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
_listener = AppLifecycleListener(onHide: _onHide, onResume: _onResume);
|
||||
}
|
||||
|
||||
_onScroll() {
|
||||
void _onScroll() {
|
||||
if (scrollController.offset >= scrollController.position.maxScrollExtent && !scrollController.position.outOfRange) {
|
||||
chatRoomCubit.loadNextPage(widget.chatId);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
_buildChat(BuildContext context, ChatRoomStateLoaded state) {
|
||||
Scaffold _buildChat(BuildContext context, ChatRoomStateLoaded state) {
|
||||
final chosenPlan = state.chatRoom.chosenPlan;
|
||||
final amIConsultant = chosenPlan?.consultantId == state.chatRoom.users.sender.id;
|
||||
final showUserDetailsButton = [
|
||||
@@ -560,7 +560,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
return 0;
|
||||
}
|
||||
|
||||
showImagePicker(String slug) {
|
||||
void showImagePicker(String slug) {
|
||||
showCupertinoModalPopup<void>(
|
||||
context: context,
|
||||
builder: (context) => CupertinoActionSheet(
|
||||
@@ -661,7 +661,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
_messageDate(DateTime date) {
|
||||
Center _messageDate(DateTime date) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 32),
|
||||
|
||||
@@ -83,7 +83,7 @@ class _ChatsScreenState extends State<ChatsScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
_buildChatList(BuildContext context, ChatsState state) {
|
||||
NotificationListener<ScrollNotification> _buildChatList(BuildContext context, ChatsState state) {
|
||||
return NotificationListener<ScrollNotification>(
|
||||
onNotification: (notification) {
|
||||
loadNewContent(notification, context.read<ChatsCubit>().loadMoreChatRooms);
|
||||
|
||||
@@ -167,7 +167,7 @@ class _EmptyChatScreenState extends State<EmptyChatScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
showImagePicker(String slug) {
|
||||
void showImagePicker(String slug) {
|
||||
showCupertinoModalPopup<void>(
|
||||
context: context,
|
||||
builder: (context) => CupertinoActionSheet(
|
||||
|
||||
@@ -78,7 +78,7 @@ class ChatSearchBarWidget extends StatelessWidget {
|
||||
return searchViewWidget(context);
|
||||
}
|
||||
|
||||
searchViewWidget(BuildContext context) => SizedBox(
|
||||
SizedBox searchViewWidget(BuildContext context) => SizedBox(
|
||||
width: width ?? MediaQuery.of(context).size.width,
|
||||
child: TextFormField(
|
||||
textCapitalization: TextCapitalization.sentences,
|
||||
|
||||
Reference in New Issue
Block a user