Update codebase
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import 'package:siro_driver/constant/info.dart';
|
||||
import 'package:tripz_driver/constant/info.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
|
||||
|
||||
import '../../../../controller/home/captin/help/video_controller.dart';
|
||||
import '../../../widgets/ui/siro_ui.dart';
|
||||
import '../../../widgets/ui/tripz_ui.dart';
|
||||
|
||||
class VideoListPage extends StatelessWidget {
|
||||
VideoListPage({super.key});
|
||||
@@ -14,13 +14,13 @@ class VideoListPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SiroPage(
|
||||
return TripzPage(
|
||||
title: 'Videos Tutorials'.tr,
|
||||
padding: SiroUi.pageInsets,
|
||||
padding: TripzUi.pageInsets,
|
||||
body: GetBuilder<VideoController>(
|
||||
builder: (videoController) {
|
||||
if (videoController.videos.isEmpty) {
|
||||
return SiroEmptyState(
|
||||
return TripzEmptyState(
|
||||
icon: Icons.video_library_rounded,
|
||||
title: 'No videos available'.tr,
|
||||
);
|
||||
@@ -30,13 +30,13 @@ class VideoListPage extends StatelessWidget {
|
||||
itemCount: videoController.videos.length,
|
||||
itemBuilder: (context, index) {
|
||||
final video = videoController.videos[index];
|
||||
return SiroCard(
|
||||
return TripzCard(
|
||||
onTap: () =>
|
||||
Get.to(() => VideoPlayerPage1(videoUrl: video['url'])),
|
||||
child: Row(
|
||||
children: [
|
||||
SiroIconBadge(Icons.play_arrow_rounded,
|
||||
color: SiroUi.interactive(context), size: 24),
|
||||
TripzIconBadge(Icons.play_arrow_rounded,
|
||||
color: TripzUi.interactive(context), size: 24),
|
||||
const SizedBox(width: 14),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -58,7 +58,7 @@ class VideoListPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Icon(Icons.arrow_forward_ios_rounded,
|
||||
size: 13, color: SiroUi.subtle(context)),
|
||||
size: 13, color: TripzUi.subtle(context)),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -82,13 +82,13 @@ class VideoPlayerPage extends StatelessWidget {
|
||||
// Initialize the video when the page is loaded
|
||||
videoController.initializeVideo(videoUrl);
|
||||
|
||||
return SiroPage(
|
||||
return TripzPage(
|
||||
title: AppInformation.appName,
|
||||
body: Center(
|
||||
child: GetBuilder<VideoController>(
|
||||
builder: (controller) {
|
||||
if (!controller.videoPlayerController.value.isInitialized) {
|
||||
return const SiroLoading();
|
||||
return const TripzLoading();
|
||||
}
|
||||
|
||||
return Column(
|
||||
@@ -140,9 +140,9 @@ class VideoPlayerPage1 extends StatelessWidget {
|
||||
// رابط غير صالح كان يرمي `Null check operator used on a null value`
|
||||
// ويُسقط الشاشة بيضاء بدل رسالة مفهومة.
|
||||
if (videoId == null) {
|
||||
return SiroPage(
|
||||
return TripzPage(
|
||||
title: AppInformation.appName,
|
||||
body: SiroEmptyState(
|
||||
body: TripzEmptyState(
|
||||
icon: Icons.videocam_off_rounded,
|
||||
title: 'Video unavailable'.tr,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user