Profile class
Represents an AI profile/persona definition.
Constructors
-
Profile({required String id, required String name, String? description, String version = '1.0.0', List<
ProfileSection> sections = const [], List<Capability> capabilities = const [], Map<String, dynamic> metadata = const {}, List<String> tags = const [], String? parentId, bool active = true, DateTime? createdAt, DateTime? updatedAt}) -
const
-
Profile.fromJson(Map<
String, dynamic> json) -
Create from JSON.
factory
Properties
- active → bool
-
Whether this profile is active.
final
-
capabilities
→ List<
Capability> -
Capabilities this profile has.
final
- createdAt → DateTime?
-
Creation timestamp.
final
- description → String?
-
Profile description.
final
-
enabledCapabilities
→ List<
Capability> -
Get all enabled capabilities.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Unique identifier for this profile.
final
-
metadata
→ Map<
String, dynamic> -
Profile metadata.
final
- name → String
-
Display name of the profile.
final
- parentId → String?
-
Parent profile ID (for inheritance).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sections
→ List<
ProfileSection> -
Profile sections containing prompt content.
final
-
Tags for categorization.
final
- updatedAt → DateTime?
-
Last update timestamp.
final
- version → String
-
Profile version.
final
Methods
-
copyWith(
{String? id, String? name, String? description, String? version, List< ProfileSection> ? sections, List<Capability> ? capabilities, Map<String, dynamic> ? metadata, List<String> ? tags, String? parentId, bool? active, DateTime? createdAt, DateTime? updatedAt}) → Profile - Copy with modifications.
-
getSection(
String name) → ProfileSection? - Get a section by name.
-
getSectionsByType(
SectionType type) → List< ProfileSection> - Get sections by type.
-
hasCapability(
String capabilityId) → bool - Check if profile has a capability.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON.
-
toString(
) → String -
A string representation of this object.
override
-
validate(
) → List< String> - Validate the profile.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override