|
- import 'package:flutter/material.dart';
- import './constants.dart';
-
- enum Device { MAC, WIN }
-
- class Conversation {
- final String avatar;
- final String title;
- final Color titleColor;
- final String desc;
- final String updateAt;
- final int unreadMsgCount;
- final bool dispalyDot;
-
- const Conversation(
- {@required this.avatar,
- @required this.title,
- this.titleColor: AppColors.TitleColor,
- this.desc,
- @required this.updateAt,
- this.unreadMsgCount: 0,
- this.dispalyDot: false})
- : assert(avatar != null),
- assert(title != null),
- assert(updateAt != null);
-
- bool isAvatarFromNet() {
- if (this.avatar.indexOf('http') == 0 || this.avatar.indexOf('https') == 0) {
- return true;
- }
- return false;
- }
- }
-
- class ConversationPageData {
- final Device device;
- final List<Conversation> conversations;
-
- const ConversationPageData({
- this.device,
- this.conversations,
- });
-
- }
|