feat: Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:krow/core/presentation/gen/assets.gen.dart';
|
||||
import 'package:krow/core/presentation/styles/kw_text_styles.dart';
|
||||
import 'package:krow/core/presentation/styles/theme.dart';
|
||||
import 'package:krow/core/presentation/widgets/contact_icon_button.dart';
|
||||
|
||||
class ContactTileWidget extends StatelessWidget {
|
||||
const ContactTileWidget({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.label,
|
||||
required this.contact,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
final SvgGenImage icon;
|
||||
final String label;
|
||||
final String contact;
|
||||
final void Function() onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Row(
|
||||
children: [
|
||||
ContactIconButton(icon: icon, onTap: onTap),
|
||||
const Gap(12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: AppTextStyles.captionReg.copyWith(
|
||||
color: AppColors.bgColorLight,
|
||||
),
|
||||
),
|
||||
const Gap(8),
|
||||
Text(
|
||||
contact,
|
||||
style: AppTextStyles.bodyMediumMed.copyWith(
|
||||
color: AppColors.primaryYellow,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user