Files
eatvio_app/lib/core/widgets/item_widget.dart
2025-04-04 20:21:31 +07:00

48 lines
1.2 KiB
Dart

import 'package:eatvio_app/core/theme/custom_text_style.dart';
import 'package:eatvio_app/core/theme/theme_helper.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class ItemWidget extends StatelessWidget {
const ItemWidget({super.key, required this.text, this.reversed = false, this.iconSize = 20});
final String text;
final bool reversed;
final double iconSize;
@override
Widget build(BuildContext context) {
if (reversed) {
return Row(
children: [
SvgPicture.asset(
'assets/icons/ok.svg',
width: iconSize,
height: iconSize,
),
const SizedBox(width: 8),
Expanded(
child: Text(
text,
style: TextStyles.textMMedium.copyWith(color: appTheme.black),
),
),
],
);
}
return Row(
children: [
Expanded(
child: Text(
text,
style: TextStyles.textMMedium.copyWith(color: appTheme.black),
),
),
SvgPicture.asset(
'assets/icons/ok.svg',
width: iconSize,
height: iconSize,
),
],
);
}
}