From 59d467c6921a3ec8726e61e960de23174e01e81d Mon Sep 17 00:00:00 2001 From: Piyush Suthar Date: Mon, 21 Aug 2023 20:25:23 +0530 Subject: [PATCH] fixed: fontsize and background color --- lib/ui/components/page_title_widget.dart | 10 +++++----- lib/ui/components/snack_bar_widget.dart | 8 ++++---- lib/ui/epub_viewer.dart | 13 +++++++------ lib/ui/pdf_viewer.dart | 17 +++++++---------- 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/lib/ui/components/page_title_widget.dart b/lib/ui/components/page_title_widget.dart index 2c39c3a..f6a6e95 100644 --- a/lib/ui/components/page_title_widget.dart +++ b/lib/ui/components/page_title_widget.dart @@ -7,13 +7,13 @@ class TitleText extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( - padding: const EdgeInsets.only(left: 10, bottom: 7), + padding: const EdgeInsets.only(left: 10, right: 10, top: 20, bottom: 10), child: Text( text, - style: TextStyle( - fontSize: 19, - fontWeight: FontWeight.bold, - color: Theme.of(context).colorScheme.secondary, + style: const TextStyle( + fontSize: 40, + // fontWeight: FontWeight.w500, + // color: Theme.of(context).colorScheme.onInverseSurface, ), ), ); diff --git a/lib/ui/components/snack_bar_widget.dart b/lib/ui/components/snack_bar_widget.dart index 2bd9769..e14fd23 100644 --- a/lib/ui/components/snack_bar_widget.dart +++ b/lib/ui/components/snack_bar_widget.dart @@ -5,14 +5,14 @@ void showSnackBar({required BuildContext context, required String message}) { content: Text( message, style: const TextStyle( - fontSize: 11, - fontWeight: FontWeight.bold, - color: Colors.white, + fontSize: 12, + // fontWeight: FontWeight.bold, + // color: Colors.white, ), textAlign: TextAlign.center, ), // ignore: use_build_context_synchronously - backgroundColor: Theme.of(context).colorScheme.secondary, + // backgroundColor: Theme.of(context).colorScheme.secondary, width: 300, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(50))), diff --git a/lib/ui/epub_viewer.dart b/lib/ui/epub_viewer.dart index 726e389..78931b5 100644 --- a/lib/ui/epub_viewer.dart +++ b/lib/ui/epub_viewer.dart @@ -23,18 +23,18 @@ class _EpubViewState extends ConsumerState { }, error: (error, stack) { return Scaffold( appBar: AppBar( - backgroundColor: Theme.of(context).colorScheme.primary, + // backgroundColor: Theme.of(context).colorScheme.primary, title: const Text("Openlib"), - titleTextStyle: Theme.of(context).textTheme.displayLarge, + // titleTextStyle: Theme.of(context).textTheme.displayLarge, ), body: Center(child: Text(error.toString())), ); }, loading: () { return Scaffold( appBar: AppBar( - backgroundColor: Theme.of(context).colorScheme.primary, + // backgroundColor: Theme.of(context).colorScheme.primary, title: const Text("Openlib"), - titleTextStyle: Theme.of(context).textTheme.displayLarge, + // titleTextStyle: Theme.of(context).textTheme.displayLarge, ), body: Center( child: SizedBox( @@ -82,9 +82,10 @@ class _EpubViewerState extends ConsumerState { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - backgroundColor: Theme.of(context).colorScheme.primary, + // backgroundColor: Theme.of(context).colorScheme.primary, title: const Text("Openlib"), - titleTextStyle: Theme.of(context).textTheme.displayLarge, + titleSpacing: 0, + // titleTextStyle: Theme.of(context).textTheme.displayLarge, ), endDrawer: Drawer( child: EpubViewTableOfContents(controller: _epubReaderController), diff --git a/lib/ui/pdf_viewer.dart b/lib/ui/pdf_viewer.dart index 08c766c..0b08bd5 100644 --- a/lib/ui/pdf_viewer.dart +++ b/lib/ui/pdf_viewer.dart @@ -38,9 +38,9 @@ class _PdfViewState extends ConsumerState { }, loading: () { return Scaffold( appBar: AppBar( - backgroundColor: Theme.of(context).colorScheme.primary, + // backgroundColor: Theme.of(context).colorScheme.primary, title: const Text("Openlib"), - titleTextStyle: Theme.of(context).textTheme.displayLarge, + // titleTextStyle: Theme.of(context).textTheme.displayLarge, ), body: Center( child: SizedBox( @@ -106,9 +106,10 @@ class _PdfViewerState extends ConsumerState { final totalPages = ref.watch(totalPdfPage); return Scaffold( appBar: AppBar( - backgroundColor: Theme.of(context).colorScheme.primary, + // backgroundColor: Theme.of(context).colorScheme.primary, title: const Text("Openlib"), - titleTextStyle: Theme.of(context).textTheme.displayLarge, + titleSpacing: 0, + // titleTextStyle: Theme.of(context).textTheme.displayLarge, actions: isMobile ? [ IconButton( @@ -181,12 +182,8 @@ class _PdfViewerState extends ConsumerState { }, loading: () { return Center( - child: SizedBox( - width: 25, - height: 25, - child: CircularProgressIndicator( - color: Theme.of(context).colorScheme.secondary, - ), + child: CircularProgressIndicator( + color: Theme.of(context).colorScheme.secondary, )); }, )