diff --git a/lib/features/level/presentation/bloc/level_bloc.dart b/lib/features/level/presentation/bloc/level_bloc.dart index ef5cde4..1fcf20e 100644 --- a/lib/features/level/presentation/bloc/level_bloc.dart +++ b/lib/features/level/presentation/bloc/level_bloc.dart @@ -43,7 +43,7 @@ class LevelBloc extends Bloc { LevelLocation(bottom: 50, left: 100, index: 2), LevelLocation(bottom: 150, left: 60, index: 3), LevelLocation(bottom: 210, left: 110, index: 4), - LevelLocation(bottom: 250, right: 60, index: 5), + LevelLocation(bottom: 260, right: 70, index: 5), LevelLocation(top: 170, right: 40, index: 6), LevelLocation(top: 70, right: 70, index: 7), LevelLocation(top: -20, right: 70, index: 8), diff --git a/lib/features/level/presentation/ui/level_page.dart b/lib/features/level/presentation/ui/level_page.dart index 92f7c14..edf3b25 100644 --- a/lib/features/level/presentation/ui/level_page.dart +++ b/lib/features/level/presentation/ui/level_page.dart @@ -133,10 +133,7 @@ class LevelPage extends StatelessWidget { builder: (context, state) => Stack( clipBehavior: Clip.none, children: [ - BottomPath( - width: context.widthScreen * 0.75, - height: context.heightScreen * 0.65, - ), + BottomPath(), ...List.generate( context.read().bottom8LevelList.length, (index) => Positioned( diff --git a/lib/features/level/presentation/ui/widgets/bottom_path.dart b/lib/features/level/presentation/ui/widgets/bottom_path.dart index cb2d5a5..0d5e1b3 100644 --- a/lib/features/level/presentation/ui/widgets/bottom_path.dart +++ b/lib/features/level/presentation/ui/widgets/bottom_path.dart @@ -1,34 +1,28 @@ import 'package:flutter/material.dart'; +import 'package:hadi_hoda_flutter/common_ui/resources/my_colors.dart'; +import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; import 'package:path_drawing/path_drawing.dart'; class BottomPath extends StatelessWidget { - const BottomPath({ - super.key, - this.width = 500, - this.height = 1523, - this.color = Colors.white, - }); + const BottomPath({super.key}); - final double width; - final double height; - final Color color; @override Widget build(BuildContext context) { return CustomPaint( - painter: _Path(color), + painter: _Path(), size: Size( - width, - height, + context.widthScreen * 0.76, + context.heightScreen * 0.64, ), // or Size.infinite inside a parent with constraints ); } } class _Path extends CustomPainter { - _Path(this.color); + const _Path(); - final Color color; + final Color color = MyColors.white; // SVG viewBox static const double _vbW = 500;