68 changed files with 273 additions and 320 deletions
-
3.gitignore
-
13analysis_options.yaml
-
4compile_svg.zsh
-
64lib/common_ui/resources/my_assets.dart
-
2lib/core/routers/hero_dialog_route.dart
-
2lib/core/routers/my_routes.dart
-
4lib/core/utils/storage_path.dart
-
4lib/core/widgets/animations/fade_anim.dart
-
4lib/core/widgets/animations/fade_anim_delayed.dart
-
20lib/core/widgets/animations/globe_animation.dart
-
2lib/core/widgets/animations/rotation_anim.dart
-
4lib/core/widgets/animations/scale_anim.dart
-
4lib/core/widgets/animations/ship_anim.dart
-
2lib/core/widgets/animations/slide_anim.dart
-
6lib/core/widgets/animations/slide_down_fade.dart
-
6lib/core/widgets/animations/slide_up_fade.dart
-
18lib/core/widgets/answer_box/styles/picture_box.dart
-
6lib/core/widgets/answer_box/styles/text_box.dart
-
2lib/core/widgets/button/my_blue_button.dart
-
2lib/core/widgets/button/my_white_button.dart
-
2lib/core/widgets/button/my_yellow_button.dart
-
60lib/core/widgets/confetti/my_confetti.dart
-
10lib/core/widgets/dialog/about_us_dialog.dart
-
14lib/core/widgets/dialog/exit_dialog.dart
-
8lib/core/widgets/dialog/hadith_dialog.dart
-
12lib/core/widgets/dialog/reward_dialog.dart
-
6lib/core/widgets/error/error_state.dart
-
12lib/core/widgets/showcase/my_showcase_widget.dart
-
4lib/core/widgets/video/my_video_player.dart
-
4lib/features/download/presentation/bloc/download_bloc.dart
-
8lib/features/download/presentation/ui/download_page.dart
-
10lib/features/download/presentation/ui/widgets/download_loading_widget.dart
-
4lib/features/guider/presentation/bloc/guider_bloc.dart
-
22lib/features/guider/presentation/ui/guider_page.dart
-
8lib/features/home/presentation/ui/home_page.dart
-
2lib/features/intro/presentation/bloc/intro_bloc.dart
-
4lib/features/intro/presentation/ui/intro_page.dart
-
6lib/features/intro/presentation/ui/screens/intro_1_screen.dart
-
4lib/features/intro/presentation/ui/screens/intro_2_screen.dart
-
4lib/features/intro/presentation/ui/screens/intro_3_screen.dart
-
4lib/features/intro/presentation/ui/screens/intro_4_screen.dart
-
4lib/features/intro/presentation/ui/screens/intro_5_screen.dart
-
12lib/features/intro/presentation/ui/widgets/bubble_chat_widget.dart
-
4lib/features/language/presentation/bloc/language_bloc.dart
-
10lib/features/language/presentation/ui/language_page.dart
-
14lib/features/language/presentation/ui/widgets/language_widget.dart
-
2lib/features/level/data/datasource/level_datasource.dart
-
2lib/features/level/presentation/bloc/level_bloc.dart
-
8lib/features/level/presentation/ui/level_page.dart
-
2lib/features/level/presentation/ui/widgets/bottom_path.dart
-
4lib/features/level/presentation/ui/widgets/diamond_level.dart
-
30lib/features/level/presentation/ui/widgets/node_widget.dart
-
12lib/features/level/presentation/ui/widgets/play_button.dart
-
2lib/features/question/data/datasource/question_datasource.dart
-
8lib/features/question/presentation/bloc/question_bloc.dart
-
12lib/features/question/presentation/ui/question_page.dart
-
8lib/features/question/presentation/ui/screens/diamond_screen.dart
-
22lib/features/question/presentation/ui/screens/question_screen.dart
-
4lib/features/question/presentation/ui/widgets/glassy_button.dart
-
18lib/features/question/presentation/ui/widgets/question_stepper.dart
-
2lib/features/question/presentation/ui/widgets/question_title.dart
-
2lib/features/sample/presentation/ui/sample_page.dart
-
2lib/features/splash/presentation/bloc/splash_bloc.dart
-
6lib/features/splash/presentation/ui/splash_page.dart
-
6lib/init_bindings.dart
-
2lib/main.dart
-
8pubspec.lock
-
7pubspec.yaml
@ -1 +1,14 @@ |
|||
include: package:flutter_lints/flutter.yaml |
|||
|
|||
linter: |
|||
rules: |
|||
prefer_const_constructors: true |
|||
prefer_const_declarations: true |
|||
prefer_const_constructors_in_immutables: true |
|||
prefer_final_fields: true |
|||
prefer_final_locals: true |
|||
avoid_classes_with_only_static_members: true |
|||
avoid_print: true |
|||
always_declare_return_types: true |
|||
use_key_in_widget_constructors: true |
|||
require_trailing_commas: true |
|||
@ -0,0 +1,4 @@ |
|||
for f in assets/svg/*.svg; do |
|||
echo "Compiling $f" |
|||
fvm dart run vector_graphics_compiler -i "$f" -o "${f}.vec" |
|||
done |
|||
@ -1,60 +0,0 @@ |
|||
import 'dart:math'; |
|||
|
|||
import 'package:confetti/confetti.dart'; |
|||
import 'package:flutter/material.dart'; |
|||
|
|||
class MyConfetti extends StatelessWidget { |
|||
const MyConfetti({super.key, required this.controller}); |
|||
|
|||
final ConfettiController controller; |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return ConfettiWidget( |
|||
confettiController: controller, |
|||
shouldLoop: false, |
|||
blastDirectionality: BlastDirectionality.explosive, |
|||
blastDirection: pi / 2, |
|||
gravity: 1, |
|||
emissionFrequency: 0.5, |
|||
numberOfParticles: 15, |
|||
particleDrag: 0.1, |
|||
colors: const [ |
|||
Colors.red, |
|||
Colors.orange, |
|||
Colors.yellow, |
|||
Colors.green, |
|||
Colors.blue, |
|||
Colors.purple, |
|||
Colors.pink, |
|||
Colors.cyan, |
|||
], |
|||
createParticlePath: (size) { |
|||
double degToRad(double deg) => deg * (pi / 180.0); |
|||
|
|||
const numberOfPoints = 5; |
|||
final halfWidth = size.width / 2; |
|||
final externalRadius = halfWidth; |
|||
final internalRadius = halfWidth / 2.5; |
|||
final degreesPerStep = degToRad(360 / numberOfPoints); |
|||
final halfDegreesPerStep = degreesPerStep / 2; |
|||
final path = Path(); |
|||
final fullAngle = degToRad(360); |
|||
path.moveTo(size.width, halfWidth); |
|||
|
|||
for (double step = 0; step < fullAngle; step += degreesPerStep) { |
|||
path.lineTo( |
|||
halfWidth + externalRadius * cos(step), |
|||
halfWidth + externalRadius * sin(step), |
|||
); |
|||
path.lineTo( |
|||
halfWidth + internalRadius * cos(step + halfDegreesPerStep), |
|||
halfWidth + internalRadius * sin(step + halfDegreesPerStep), |
|||
); |
|||
} |
|||
path.close(); |
|||
return path; |
|||
}, |
|||
); |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue