|
|
|
@ -6,6 +6,7 @@ import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/core/widgets/images/my_image.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/domain/entity/level_entity.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/bloc/level_bloc.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/bloc/level_event.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/bloc/level_state.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/ui/widgets/bottom_path.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/ui/widgets/hint_level_widget.dart'; |
|
|
|
@ -113,10 +114,15 @@ class LevelPage extends StatelessWidget { |
|
|
|
bottom: context.read<LevelBloc>().topLocationList[index].bottom, |
|
|
|
right: context.read<LevelBloc>().topLocationList[index].right, |
|
|
|
left: context.read<LevelBloc>().topLocationList[index].left, |
|
|
|
child: LevelWidget( |
|
|
|
level: context.read<LevelBloc>().top12LevelList[index], |
|
|
|
type: context.read<LevelBloc>().getLevelType(index + 9), |
|
|
|
onTap: (LevelEntity level) {}, |
|
|
|
child: BlocBuilder<LevelBloc, LevelState>( |
|
|
|
builder: (context, state) => LevelWidget( |
|
|
|
chooseLevel: state.chooseLevel, |
|
|
|
level: context.read<LevelBloc>().top12LevelList[index], |
|
|
|
type: context.read<LevelBloc>().getLevelType(index + 9), |
|
|
|
onTap: (LevelEntity level, LevelType type) { |
|
|
|
context.read<LevelBloc>().add(ChooseLevelEvent(level, type)); |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
@ -142,10 +148,17 @@ class LevelPage extends StatelessWidget { |
|
|
|
bottom: context.read<LevelBloc>().bottomLocationList[index].bottom, |
|
|
|
right: context.read<LevelBloc>().bottomLocationList[index].right, |
|
|
|
left: context.read<LevelBloc>().bottomLocationList[index].left, |
|
|
|
child: LevelWidget( |
|
|
|
level: context.read<LevelBloc>().bottom8LevelList[index], |
|
|
|
type: context.read<LevelBloc>().getLevelType(index + 1), |
|
|
|
onTap: (LevelEntity level) {}, |
|
|
|
child: BlocBuilder<LevelBloc, LevelState>( |
|
|
|
buildWhen: (previous, current) => |
|
|
|
previous.chooseLevel?.id != current.chooseLevel?.id, |
|
|
|
builder: (context, state) => LevelWidget( |
|
|
|
chooseLevel: state.chooseLevel, |
|
|
|
level: context.read<LevelBloc>().bottom8LevelList[index], |
|
|
|
type: context.read<LevelBloc>().getLevelType(index + 1), |
|
|
|
onTap: (LevelEntity level, LevelType type) { |
|
|
|
context.read<LevelBloc>().add(ChooseLevelEvent(level, type)); |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|