Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions lib/ui/widgets/brand/brand_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/brand.model.dart';

class BrandComponent extends StatelessWidget {
final Brand brand;

const BrandComponent({super.key, required this.brand});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
child: Text(
brand.name,
style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
);
}
}
30 changes: 30 additions & 0 deletions lib/ui/widgets/community_post/community_post_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/community_post.model.dart';
import 'package:openwardrobe/ui/widgets/user_profile/user_profile_component.dart';

class CommunityPostComponent extends StatelessWidget {
final CommunityPost post;

const CommunityPostComponent({super.key, required this.post});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (post.userProfile != null)
UserProfileComponent(item: post.userProfile!),
const SizedBox(height: 8),
Text(
post.content,
style: const TextStyle(fontSize: 16),
),
if (post.imageUrl != null)
Image.network(post.imageUrl!),
],
),
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/community_post_comment.model.dart';
import 'package:openwardrobe/ui/widgets/user_profile/user_profile_component.dart';

class CommunityPostCommentComponent extends StatelessWidget {
final CommunityPostComment comment;

const CommunityPostCommentComponent({super.key, required this.comment});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (comment.userProfile != null)
UserProfileComponent(item: comment.userProfile!),
const SizedBox(height: 8),
Text(
comment.comment,
style: const TextStyle(fontSize: 16),
),
],
),
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/community_post_like.model.dart';
import 'package:openwardrobe/ui/widgets/user_profile/user_profile_component.dart';

class CommunityPostLikeComponent extends StatelessWidget {
final CommunityPostLike like;

const CommunityPostLikeComponent({super.key, required this.like});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (like.userProfile != null)
UserProfileComponent(item: like.userProfile!),
],
),
);
}
}
19 changes: 19 additions & 0 deletions lib/ui/widgets/item_category/item_category_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/item_category.model.dart';

class ItemCategoryComponent extends StatelessWidget {
final ItemCategory itemCategory;

const ItemCategoryComponent({super.key, required this.itemCategory});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
child: Text(
itemCategory.name,
style: Theme.of(context).textTheme.headline6,
),
);
}
}
34 changes: 34 additions & 0 deletions lib/ui/widgets/item_metadata/item_metadata_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/item_metadata.model.dart';

class ItemMetadataComponent extends StatelessWidget {
final ItemMetadata item;

const ItemMetadataComponent({super.key, required this.item});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Item Metadata Details',
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
Text('Bought For: ${item.boughtFor ?? 'N/A'} ${item.currency}'),
Text('Purchase Date: ${item.purchaseDate ?? 'N/A'}'),
Text('Condition: ${item.condition ?? 'N/A'}'),
Text('Material: ${item.material ?? 'N/A'}'),
Text('Size: ${item.size ?? 'N/A'}'),
Text('Color: ${item.color ?? 'N/A'}'),
Text('Notes: ${item.notes ?? 'N/A'}'),
Text('Created At: ${item.createdAt}'),
Text('Updated At: ${item.updatedAt}'),
],
),
);
}
}
35 changes: 35 additions & 0 deletions lib/ui/widgets/lookbook_item/lookbook_item_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/lookbook_item.model.dart';

class LookbookItemComponent extends StatelessWidget {
final LookbookItem item;

const LookbookItemComponent({super.key, required this.item});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
constraints: BoxConstraints(maxWidth: 400), // Set max width like a card
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
item.itemId,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
Text(
item.itemType,
style: TextStyle(fontSize: 16),
),
const SizedBox(height: 8),
Text(
item.createdAt.toString(),
style: TextStyle(fontSize: 16),
),
],
),
);
}
}
30 changes: 30 additions & 0 deletions lib/ui/widgets/outfit_item/outfit_item_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/outfit_item.model.dart';

class OutfitItemComponent extends StatelessWidget {
final OutfitItem item;

const OutfitItemComponent({super.key, required this.item});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
constraints: const BoxConstraints(maxWidth: 400),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
item.outfit.name,
style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
Text(
item.wardrobeItem.imagePath,
style: const TextStyle(fontSize: 16),
),
],
),
);
}
}
35 changes: 35 additions & 0 deletions lib/ui/widgets/use_item/use_item_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/use_item.model.dart';

class UseItemComponent extends StatelessWidget {
final UseItem item;

const UseItemComponent({super.key, required this.item});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Used At: ${item.usedAt}',
style: const TextStyle(fontSize: 16),
),
const SizedBox(height: 8),
Text(
'Wardrobe Item: ${item.wardrobeItem.id}',
style: const TextStyle(fontSize: 16),
),
const SizedBox(height: 8),
if (item.userProfile != null)
Text(
'User: ${item.userProfile!.username}',
style: const TextStyle(fontSize: 16),
),
],
),
);
}
}
35 changes: 35 additions & 0 deletions lib/ui/widgets/use_outfit/use_outfit_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
import 'package:openwardrobe/brick/models/use_outfit.model.dart';

class UseOutfitComponent extends StatelessWidget {
final UseOutfit item;

const UseOutfitComponent({super.key, required this.item});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Outfit: ${item.outfit.name}',
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
Text(
'Used at: ${item.usedAt}',
style: const TextStyle(fontSize: 16),
),
const SizedBox(height: 8),
if (item.userProfile != null)
Text(
'User: ${item.userProfile!.username}',
style: const TextStyle(fontSize: 16),
),
],
),
);
}
}