From e5d83f20934cb57b1484806ba71522b1dbe9b016 Mon Sep 17 00:00:00 2001 From: Hasan Ragab Eltantawy <50374022+HasanEltantawy@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:22:12 +0200 Subject: [PATCH] Moving title --- .../screens/zikr_content_viewer_screen.dart | 27 +++++++++++++------ alazkar/pubspec.lock | 16 +++++++++++ alazkar/pubspec.yaml | 1 + 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/alazkar/lib/src/features/zikr_content_viewer/presentation/screens/zikr_content_viewer_screen.dart b/alazkar/lib/src/features/zikr_content_viewer/presentation/screens/zikr_content_viewer_screen.dart index 096fe19..b8aa786 100644 --- a/alazkar/lib/src/features/zikr_content_viewer/presentation/screens/zikr_content_viewer_screen.dart +++ b/alazkar/lib/src/features/zikr_content_viewer/presentation/screens/zikr_content_viewer_screen.dart @@ -6,6 +6,7 @@ import 'package:alazkar/src/features/zikr_content_viewer/presentation/components import 'package:alazkar/src/features/zikr_content_viewer/presentation/controller/bloc/zikr_content_viewer_bloc.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:marquee/marquee.dart'; class ZikrContentViewerScreen extends StatelessWidget { static const String routeName = "ZikrContentViewer"; @@ -41,14 +42,24 @@ class ZikrContentViewerScreen extends StatelessWidget { } return Scaffold( appBar: AppBar( - toolbarHeight: 75, - title: Text( - state.zikrTitle.name, - maxLines: 2, - textAlign: TextAlign.center, - style: const TextStyle( - fontFamily: "Kitab", - fontWeight: FontWeight.bold, + title: SizedBox( + height: 60, + child: Marquee( + text: state.zikrTitle.name, + blankSpace: MediaQuery.of(context).size.width, + pauseAfterRound: const Duration(seconds: 1), + startPadding: 10.0, + accelerationDuration: const Duration(seconds: 1), + accelerationCurve: Curves.linear, + decelerationDuration: const Duration(milliseconds: 500), + decelerationCurve: Curves.easeOut, + fadingEdgeEndFraction: .5, + fadingEdgeStartFraction: .5, + showFadingOnlyWhenScrolling: false, + style: const TextStyle( + fontFamily: "Kitab", + fontWeight: FontWeight.bold, + ), ), ), centerTitle: true, diff --git a/alazkar/pubspec.lock b/alazkar/pubspec.lock index 58cfd80..3589eba 100644 --- a/alazkar/pubspec.lock +++ b/alazkar/pubspec.lock @@ -129,6 +129,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.5" + fading_edge_scrollview: + dependency: transitive + description: + name: fading_edge_scrollview + sha256: c25c2231652ce774cc31824d0112f11f653881f43d7f5302c05af11942052031 + url: "https://pub.dev" + source: hosted + version: "3.0.0" fake_async: dependency: transitive description: @@ -277,6 +285,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + marquee: + dependency: "direct main" + description: + name: marquee + sha256: "4b5243d2804373bdc25fc93d42c3b402d6ec1f4ee8d0bb72276edd04ae7addb8" + url: "https://pub.dev" + source: hosted + version: "2.2.3" matcher: dependency: transitive description: diff --git a/alazkar/pubspec.yaml b/alazkar/pubspec.yaml index 4d312d2..705bedf 100644 --- a/alazkar/pubspec.yaml +++ b/alazkar/pubspec.yaml @@ -21,6 +21,7 @@ dependencies: sdk: flutter fluttertoast: ^8.2.2 get_storage: ^2.1.1 + marquee: ^2.2.3 material_design_icons_flutter: ^7.0.7296 path: ^1.8.3 path_provider: ^2.1.0