|
1 |
| -// video_player/presentation/pages/video_player_page.dart |
2 |
| - |
3 | 1 | import 'package:animate_do/animate_do.dart';
|
4 | 2 | import 'package:flutter/cupertino.dart';
|
5 |
| -// import 'package:floating/floating.dart'; |
6 | 3 | import 'package:flutter/material.dart';
|
7 | 4 | import 'package:flutter/services.dart';
|
8 | 5 | import 'package:flutter_bloc/flutter_bloc.dart';
|
9 | 6 | import 'package:flutter_hooks/flutter_hooks.dart';
|
10 | 7 | import 'package:go_router/go_router.dart';
|
11 | 8 | import 'package:hugeicons/hugeicons.dart';
|
12 |
| -// import 'package:open_player/base/di/injection.dart'; |
13 | 9 | import 'package:open_player/logic/Control_visibility/controls_visibility_cubit.dart';
|
14 | 10 | import 'package:open_player/logic/video_player_bloc/video_player_bloc.dart';
|
15 | 11 | import 'package:open_player/presentation/pages/players/video/widgets/video_player_icon_button_widget.dart';
|
16 | 12 | import 'package:velocity_x/velocity_x.dart';
|
17 |
| -// import '../../../../../data/services/picture_in_picture_service/picture_in_picture_service.dart'; |
18 | 13 | import '../../../../../data/services/favorites_video_hive_service/favorites_video_hive_service.dart';
|
19 | 14 | import '../../../../common/methods/set_orientation_potrait.dart';
|
20 | 15 | import '../../../../common/methods/system_ui_mode.dart';
|
| 16 | +import '../../../../common/widgets/animated_auto_scroll_text_widget.dart'; |
21 | 17 | import 'video_player_audios_selector_widget.dart';
|
22 | 18 |
|
23 | 19 | class VideoPlayerTopBarWidget extends HookWidget {
|
@@ -58,26 +54,27 @@ class VideoPlayerTopBarWidget extends HookWidget {
|
58 | 54 | },
|
59 | 55 | ),
|
60 | 56 |
|
61 |
| - //---------- Video Title |
| 57 | + //------------- TITLE ----------------// |
62 | 58 | Expanded(
|
63 |
| - child: Text( |
64 |
| - "Now Playing", |
65 |
| - style: const TextStyle( |
66 |
| - color: Colors.white, |
67 |
| - fontSize: 18, |
68 |
| - fontWeight: FontWeight.w600, |
69 |
| - ), |
70 |
| - textAlign: TextAlign.center, |
| 59 | + child: AnimatedAutoScrollTextWidget( |
| 60 | + state.currentVideo.title, |
| 61 | + style: TextStyle( |
| 62 | + fontSize: 18, |
| 63 | + color: Colors.white, |
| 64 | + shadows: [ |
| 65 | + Shadow( |
| 66 | + blurRadius: 3, |
| 67 | + offset: Offset(0, 0), |
| 68 | + color: Colors.black38), |
| 69 | + ]), |
71 | 70 | ),
|
72 | 71 | ),
|
73 | 72 |
|
74 | 73 | //--------- Favorite/Like Button
|
75 |
| - |
76 | 74 | IconButton(
|
77 | 75 | iconSize: 28,
|
78 | 76 | color: Colors.white,
|
79 | 77 | onPressed: () async {
|
80 |
| - |
81 | 78 | //-------- Update the favorite status and retrun it
|
82 | 79 | final favorite = await FavoritesVideoHiveService()
|
83 | 80 | .toggleFavorite(state.playingVideoPath);
|
|
0 commit comments