feat: app 端 ui 设计完成
This commit is contained in:
23
wei_ai_app/lib/models/character.dart
Normal file
23
wei_ai_app/lib/models/character.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class Character {
|
||||
final String id;
|
||||
final String name;
|
||||
final String tagline;
|
||||
final String avatar;
|
||||
final String description;
|
||||
final List<String> tags;
|
||||
final double compatibility; // 硬件契合度 %
|
||||
final String status; // 'online' | 'busy' | 'offline'
|
||||
final bool isLocked;
|
||||
|
||||
const Character({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.tagline,
|
||||
required this.avatar,
|
||||
required this.description,
|
||||
required this.tags,
|
||||
required this.compatibility,
|
||||
required this.status,
|
||||
this.isLocked = false,
|
||||
});
|
||||
}
|
||||
33
wei_ai_app/lib/models/device_status.dart
Normal file
33
wei_ai_app/lib/models/device_status.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
enum DeviceMode { idle, pattern, manual }
|
||||
|
||||
class DeviceStatus {
|
||||
final bool connected;
|
||||
final double battery;
|
||||
final double temperature;
|
||||
final int signalStrength;
|
||||
final DeviceMode currentMode;
|
||||
|
||||
const DeviceStatus({
|
||||
this.connected = false,
|
||||
this.battery = 100.0,
|
||||
this.temperature = 36.5,
|
||||
this.signalStrength = 0,
|
||||
this.currentMode = DeviceMode.idle,
|
||||
});
|
||||
|
||||
DeviceStatus copyWith({
|
||||
bool? connected,
|
||||
double? battery,
|
||||
double? temperature,
|
||||
int? signalStrength,
|
||||
DeviceMode? currentMode,
|
||||
}) {
|
||||
return DeviceStatus(
|
||||
connected: connected ?? this.connected,
|
||||
battery: battery ?? this.battery,
|
||||
temperature: temperature ?? this.temperature,
|
||||
signalStrength: signalStrength ?? this.signalStrength,
|
||||
currentMode: currentMode ?? this.currentMode,
|
||||
);
|
||||
}
|
||||
}
|
||||
22
wei_ai_app/lib/models/message.dart
Normal file
22
wei_ai_app/lib/models/message.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
enum MessageType { text, image, audio }
|
||||
enum MessageSender { user, ai }
|
||||
|
||||
class Message {
|
||||
final String id;
|
||||
final String text;
|
||||
final MessageSender sender;
|
||||
final MessageType type;
|
||||
final DateTime timestamp;
|
||||
final String? imageUrl;
|
||||
final bool isLocked;
|
||||
|
||||
const Message({
|
||||
required this.id,
|
||||
required this.text,
|
||||
required this.sender,
|
||||
required this.type,
|
||||
required this.timestamp,
|
||||
this.imageUrl,
|
||||
this.isLocked = false,
|
||||
});
|
||||
}
|
||||
21
wei_ai_app/lib/models/scenario.dart
Normal file
21
wei_ai_app/lib/models/scenario.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
class Scenario {
|
||||
final String id;
|
||||
final String title;
|
||||
final String category;
|
||||
final String cover;
|
||||
final String duration;
|
||||
final String intensity; // 'Low' | 'Medium' | 'High' | 'Extreme'
|
||||
final bool isLocked;
|
||||
final List<String> tags;
|
||||
|
||||
const Scenario({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.category,
|
||||
required this.cover,
|
||||
required this.duration,
|
||||
required this.intensity,
|
||||
required this.isLocked,
|
||||
required this.tags,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user