first commit
This commit is contained in:
58
lib/modules/berkas/presentation/widgets/berkas_card.dart
Normal file
58
lib/modules/berkas/presentation/widgets/berkas_card.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:frontend_eccp_mobile/app/core/constants/constants.dart';
|
||||
import 'package:frontend_eccp_mobile/modules/berkas/data/models/berkas_model.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
class BerkasCard extends StatelessWidget {
|
||||
const BerkasCard({
|
||||
required this.item,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final BerkasModel item;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: AppPadding.v16.add(AppPadding.h16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.neutralWhite,
|
||||
borderRadius: AppRadius.r8,
|
||||
boxShadow: AppShadows.sm,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const ShadAvatar(
|
||||
'https://sample.com/avatar-1.png',
|
||||
placeholder: Text('RS'),
|
||||
),
|
||||
AppSpacing.w12,
|
||||
Expanded(child: _buildContent()),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildContent() {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.title,
|
||||
style: AppTextStyles.small.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColors.neutral900,
|
||||
),
|
||||
),
|
||||
AppSpacing.h2,
|
||||
Text(
|
||||
item.description,
|
||||
style: AppTextStyles.xs.copyWith(
|
||||
color: AppColors.neutral700,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user