From 939dd9b358c727e66f6c41beab3fb749ed56a42f Mon Sep 17 00:00:00 2001 From: MohammadTaha Basiri Date: Sun, 3 Apr 2022 03:22:53 +0430 Subject: [PATCH] bug fix --- .../authentication/screens/password.dart | 2 + .../studio_details/studio_details.mobile.dart | 4 +- .../widgets/studio_details_widget.dart | 42 ++++++++++--------- lib/views/home/studio/widgets/slider.dart | 31 +++++++------- 4 files changed, 42 insertions(+), 37 deletions(-) diff --git a/lib/views/authentication/screens/password.dart b/lib/views/authentication/screens/password.dart index 6402d6a..d558a49 100644 --- a/lib/views/authentication/screens/password.dart +++ b/lib/views/authentication/screens/password.dart @@ -76,7 +76,9 @@ class _PasswordInputState extends State { final token = await state.login(userProvider); if (token != null) { log(token); + ActionSheetUtils.showLogoLoadingIndicator(); await ServerDataProvider.getData(); + ActionSheetUtils.pop(); Navigator.of(context).pushReplacementNamed(Routes.home); _showResetPasswordDialog(); } diff --git a/lib/views/home/studio/studio_details/studio_details.mobile.dart b/lib/views/home/studio/studio_details/studio_details.mobile.dart index 4e4f404..6ee9550 100644 --- a/lib/views/home/studio/studio_details/studio_details.mobile.dart +++ b/lib/views/home/studio/studio_details/studio_details.mobile.dart @@ -145,8 +145,8 @@ class _StudioDetailsState extends State { child: Stack( children: [ WebView( - backgroundColor: - Theme.of(context).colorScheme.black, + zoomEnabled: false, + backgroundColor: Colors.black, allowsInlineMediaPlayback: true, initialUrl: Uri.dataFromString( ''' diff --git a/lib/views/home/studio/studio_details/widgets/studio_details_widget.dart b/lib/views/home/studio/studio_details/widgets/studio_details_widget.dart index 02ebd40..12150b3 100644 --- a/lib/views/home/studio/studio_details/widgets/studio_details_widget.dart +++ b/lib/views/home/studio/studio_details/widgets/studio_details_widget.dart @@ -141,33 +141,35 @@ class StudioDetailsWidget extends StatelessWidget { ), ); } - return Column( - children: [ - if (state.studio.relatedContents.isEmpty) - for (var i = 0; i < 3; i++) + return SingleChildScrollView( + child: Column( + children: [ + if (state.studio.relatedContents.isEmpty) + for (var i = 0; i < 3; i++) + Padding( + padding: const EdgeInsets.only( + bottom: 8, + left: 16, + right: 16, + ), + child: MultitypeOverview.placeholder, + ), + for (var i = 0; + i < state.studio.relatedContents.length; + i++) Padding( padding: const EdgeInsets.only( bottom: 8, left: 16, right: 16, ), - child: MultitypeOverview.placeholder, + child: MultitypeOverview( + item: state.studio.relatedContents[i], + onMarkChanged: (id, value) {}, + ), ), - for (var i = 0; - i < state.studio.relatedContents.length; - i++) - Padding( - padding: const EdgeInsets.only( - bottom: 8, - left: 16, - right: 16, - ), - child: MultitypeOverview( - item: state.studio.relatedContents[i], - onMarkChanged: (id, value) {}, - ), - ), - ], + ], + ), ); }, ), diff --git a/lib/views/home/studio/widgets/slider.dart b/lib/views/home/studio/widgets/slider.dart index 8f80c6a..78bf110 100644 --- a/lib/views/home/studio/widgets/slider.dart +++ b/lib/views/home/studio/widgets/slider.dart @@ -97,22 +97,23 @@ class _StudioSliderState extends State { ), ), ), - Container( - height: 52, - width: 52, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Theme.of(context) - .colorScheme - .secondary - .withOpacity(0.7), + if (state.videosSelected) + Container( + height: 52, + width: 52, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Theme.of(context) + .colorScheme + .secondary + .withOpacity(0.7), + ), + child: Icon( + DidvanIcons.play_solid, + color: Theme.of(context).colorScheme.white, + size: 48, + ), ), - child: Icon( - DidvanIcons.play_solid, - color: Theme.of(context).colorScheme.white, - size: 48, - ), - ), ], ), ),