Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tutorial video feature #1532

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets
12 changes: 0 additions & 12 deletions lib/gateway/pubdoc_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'dart:convert';
import 'package:autonomy_flutter/model/play_list_model.dart';
import 'package:autonomy_flutter/model/suggested_artist.dart';
import 'package:autonomy_flutter/model/version_info.dart';
import 'package:autonomy_flutter/screen/customer_support/tutorial_videos_page.dart';
import 'package:dio/dio.dart';
import 'package:retrofit/retrofit.dart';

Expand All @@ -29,9 +28,6 @@ abstract class PubdocAPI {
@GET('/demo/demo_account.json')
Future<String> getDemoAccount();

@GET('/tutorial_videos/tutorial_videos.json')
Future<String> getTutorialVideos();

@GET('/artists/suggested_artists.json')
Future<String> getSuggestedArtists();

Expand All @@ -56,14 +52,6 @@ extension PubdocAPIHelpers on PubdocAPI {
return list ?? [];
}

Future<List<VideoData>> getTutorialVideosFromGithub() async {
final value = await getTutorialVideos();
final list = (jsonDecode(value) as List?)?.map((element) {
return VideoData.fromJson(element);
}).toList();
return list ?? [];
}

Future<List<SuggestedArtist>> getSuggestedArtistsFromGithub() async {
final value = await getSuggestedArtists();
final list = (jsonDecode(value) as List<dynamic>?)?.map((element) {
Expand Down
26 changes: 0 additions & 26 deletions lib/gateway/pubdoc_api.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions lib/screen/app_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import 'package:autonomy_flutter/screen/customer_support/merchandise_order/merch
import 'package:autonomy_flutter/screen/customer_support/support_customer_page.dart';
import 'package:autonomy_flutter/screen/customer_support/support_list_page.dart';
import 'package:autonomy_flutter/screen/customer_support/support_thread_page.dart';
import 'package:autonomy_flutter/screen/customer_support/tutorial_videos_page.dart';
import 'package:autonomy_flutter/screen/detail/artwork_detail_bloc.dart';
import 'package:autonomy_flutter/screen/detail/artwork_detail_page.dart';
import 'package:autonomy_flutter/screen/detail/preview/artwork_preview_bloc.dart';
Expand Down Expand Up @@ -819,13 +818,6 @@ class AppRouter {
settings: settings,
builder: (context) => const MerchandiseOrderPage());

case tutorialVideoPage:
return CupertinoPageRoute(
settings: settings,
builder: (context) => TutorialVideo(
payload: settings.arguments! as TutorialVideosPayload,
));

case supportThreadPage:
return CupertinoPageRoute(
settings: settings,
Expand Down
32 changes: 0 additions & 32 deletions lib/screen/customer_support/support_customer_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import 'package:autonomy_flutter/gateway/pubdoc_api.dart';
import 'package:autonomy_flutter/main.dart';
import 'package:autonomy_flutter/screen/app_router.dart';
import 'package:autonomy_flutter/screen/customer_support/support_thread_page.dart';
import 'package:autonomy_flutter/screen/customer_support/tutorial_videos_page.dart';
import 'package:autonomy_flutter/service/configuration_service.dart';
import 'package:autonomy_flutter/service/customer_support_service.dart';
import 'package:autonomy_flutter/util/constants.dart';
Expand Down Expand Up @@ -113,7 +112,6 @@ class _SupportCustomerPageState extends State<SupportCustomerPage>
addOnlyDivider(),
_resourcesWidget(),
_transactionHistoryTap(context, orderIds),
_videoTutorials(),
],
),
),
Expand Down Expand Up @@ -214,34 +212,4 @@ class _SupportCustomerPageState extends State<SupportCustomerPage>
],
);
}

Widget _videoTutorials() {
final theme = Theme.of(context);
return FutureBuilder<List<VideoData>>(
// ignore: discarded_futures
future: injector<PubdocAPI>().getTutorialVideosFromGithub(),
builder: (context, snapshot) {
if (snapshot.hasData && snapshot.data!.isNotEmpty) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TappableForwardRow(
leftWidget: Text('tutorial_videos'.tr(),
style: theme.textTheme.ppMori400Black14),
onTap: () async {
await Navigator.of(context).pushNamed(
AppRouter.tutorialVideoPage,
arguments:
TutorialVideosPayload(videos: snapshot.data!));
},
padding: ResponsiveLayout.tappableForwardRowEdgeInsets,
),
addOnlyDivider(),
],
);
} else {
return const SizedBox();
}
});
}
}
171 changes: 0 additions & 171 deletions lib/screen/customer_support/tutorial_videos_page.dart

This file was deleted.

16 changes: 0 additions & 16 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2978,22 +2978,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.2"
youtube_player_iframe:
dependency: "direct main"
description:
name: youtube_player_iframe
sha256: d7aec9083430db4e5da83a3b5d7b7fcbb93cfa027d9f680ce3c7e7cd20724305
url: "https://pub.dev"
source: hosted
version: "4.0.4"
youtube_player_iframe_web:
dependency: transitive
description:
name: youtube_player_iframe_web
sha256: c7020816031600349b56d2729d4e8be011fcb723ff7dc2dd0cdf72096a0e5ff4
url: "https://pub.dev"
source: hosted
version: "2.0.2"
sdks:
dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.10.0"
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ dependencies:
flutter_inappwebview: ^5.8.0
html: ^0.15.1
video_player: ^2.4.8
youtube_player_iframe: ^4.0.4
awesome_notifications: ^0.8.3
shimmer: ^3.0.0
graphql_flutter: ^5.1.2
Expand Down
Loading