mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-11 10:45:25 -04:00
pagination
This commit is contained in:
parent
5473bd2ee4
commit
2c38fc6489
22 changed files with 1071 additions and 545 deletions
34
lib/chat/models/chat_component_state.dart
Normal file
34
lib/chat/models/chat_component_state.dart
Normal file
|
@ -0,0 +1,34 @@
|
|||
import 'package:async_tools/async_tools.dart';
|
||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_chat_types/flutter_chat_types.dart' show Message, User;
|
||||
import 'package:flutter_chat_ui/flutter_chat_ui.dart' show ChatState;
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:scroll_to_index/scroll_to_index.dart';
|
||||
import 'package:veilid_support/veilid_support.dart';
|
||||
|
||||
import 'window_state.dart';
|
||||
|
||||
part 'chat_component_state.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class ChatComponentState with _$ChatComponentState {
|
||||
const factory ChatComponentState(
|
||||
{
|
||||
// GlobalKey for the chat
|
||||
required GlobalKey<ChatState> chatKey,
|
||||
// ScrollController for the chat
|
||||
required AutoScrollController scrollController,
|
||||
// Local user
|
||||
required User localUser,
|
||||
// Remote users
|
||||
required IMap<TypedKey, User> remoteUsers,
|
||||
// Messages state
|
||||
required AsyncValue<WindowState<Message>> messageWindow,
|
||||
// Title of the chat
|
||||
required String title}) = _ChatComponentState;
|
||||
}
|
||||
|
||||
extension ChatComponentStateExt on ChatComponentState {
|
||||
//
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue