forked from eatvio/eatvio_app
diet creation scrren is done
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/core/widgets/animated_option_button.dart';
|
||||
import 'package:eatvio_app/features/create_plan/presentation/cubit/create_plan_cubit.dart';
|
||||
import 'package:eatvio_app/features/create_plan/presentation/cubit/create_plan_state.dart';
|
||||
import 'package:eatvio_app/generated/l10n.dart';
|
||||
@@ -25,7 +25,7 @@ class OptionsCountButton extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _AnimatedOptionButton(
|
||||
child: AnimatedOptionButton(
|
||||
isSelected: selectedOption == null,
|
||||
text: s.one_option,
|
||||
onTap: () {
|
||||
@@ -34,7 +34,7 @@ class OptionsCountButton extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: _AnimatedOptionButton(
|
||||
child: AnimatedOptionButton(
|
||||
isSelected: selectedOption != null,
|
||||
text: s.three_options,
|
||||
onTap: () {
|
||||
@@ -50,33 +50,3 @@ class OptionsCountButton extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _AnimatedOptionButton extends StatelessWidget {
|
||||
const _AnimatedOptionButton({required this.text, required this.isSelected, required this.onTap});
|
||||
final String text;
|
||||
final bool isSelected;
|
||||
final void Function() onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
color: isSelected ? appTheme.blueA400 : appTheme.whiteA700,
|
||||
),
|
||||
child: Center(
|
||||
child: AnimatedDefaultTextStyle(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
style: TextStyles.textMSemibold.copyWith(
|
||||
color: isSelected ? appTheme.whiteA700 : appTheme.black,
|
||||
),
|
||||
child: Text(text),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user