Some more layouts and state control

This commit is contained in:
2024-04-19 16:41:40 +03:00
parent 8c93d57492
commit 1b606d9fa6
4 changed files with 128 additions and 8 deletions

View File

@@ -0,0 +1,29 @@
import 'package:eatvio_app/core/app_export.dart';
/// This class is used in the [userprofile_item_widget] screen.
// ignore_for_file: must_be_immutable
class UserprofileItemModel {
UserprofileItemModel(
{this.userImage,
this.username,
this.dateText,
this.greetingText,
this.id}) {
userImage = userImage ?? ImageConstant.imageNotFound;
username = username ?? "Ксения Обрамова";
dateText = dateText ?? "9/29";
greetingText = greetingText ?? "Привет, хорошая статья";
id = id ?? "";
}
String? userImage;
String? username;
String? dateText;
String? greetingText;
String? id;
}

View File

@@ -1,16 +1,20 @@
// ignore_for_file: must_be_immutable
import 'package:equatable/equatable.dart';
import 'package:eatvio_app/presentation/chat/chat_select_screen/models/chat_entry.dart'; // ignore: must_be_immutable
/// This class defines the variables used in the [chat_select_screen],
/// and is typically used to hold data that is passed between different parts of the application.
class ChatSelectModel extends Equatable {
ChatSelectModel();
ChatSelectModel({this.userprofileItemList = const []});
ChatSelectModel copyWith() {
return ChatSelectModel();
List<UserprofileItemModel> userprofileItemList;
ChatSelectModel copyWith({List<UserprofileItemModel>? userprofileItemList}) {
return ChatSelectModel(
userprofileItemList: userprofileItemList ?? this.userprofileItemList,
);
}
@override
List<Object?> get props => [];
List<Object?> get props => [userprofileItemList];
}