diff --git a/.env b/.env index eb03cb7..9e63d65 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ #DB -DB_VERSION=73 \ No newline at end of file +DB_VERSION=131 \ No newline at end of file diff --git a/assets/db/mova.db b/assets/db/mova.db index 90a7b5e..90f21a6 100644 Binary files a/assets/db/mova.db and b/assets/db/mova.db differ diff --git a/lib/themes/markdown.dart b/lib/themes/markdown.dart index a5ca02b..6ae00d9 100644 --- a/lib/themes/markdown.dart +++ b/lib/themes/markdown.dart @@ -6,7 +6,29 @@ stylesheet(BuildContext context) { h1: ThemeData() .textTheme .titleLarge! - .copyWith(fontSize: 24, color: Colors.blue), + .copyWith( + fontSize: 24, + fontWeight: FontWeight.w600, + decoration: TextDecoration.underline, + decorationThickness: 0.5, + decorationStyle: TextDecorationStyle.solid + ), + h1Padding: EdgeInsets.only(top: 20, bottom: 10), + h2: ThemeData() + .textTheme + .headlineMedium! + .copyWith( + fontSize: 21, + fontWeight: FontWeight.w600 + ), + h2Padding: EdgeInsets.only(top: 10, bottom: 10), + h3: ThemeData() + .textTheme + .headlineSmall! + .copyWith( + fontSize: 18, + fontWeight: FontWeight.w600 + ), h6: ThemeData().textTheme.bodyLarge!.copyWith(), h6Padding: EdgeInsets.all(0), h6Align: WrapAlignment.start, @@ -18,15 +40,13 @@ stylesheet(BuildContext context) { p: Theme.of(context).textTheme.bodyMedium!.copyWith( color: Theme.of(context).colorScheme.onSurface, ), - strong: Theme.of(context).textTheme.bodyMedium!.copyWith( - fontSize: 20, - fontWeight: FontWeight.w600, - ), - em: Theme.of(context).textTheme.bodyMedium!.copyWith( - fontStyle: FontStyle.italic, - fontWeight: FontWeight.w100, - color: Theme.of(context).colorScheme.onSurfaceVariant, - ), + strong: const TextStyle( + fontWeight: FontWeight.w600, + ), + em: TextStyle( + fontWeight: FontWeight.w100, + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), code: Theme.of(context) .textTheme .bodyLarge! @@ -38,7 +58,8 @@ stylesheet(BuildContext context) { left: BorderSide( color: Theme.of(context).colorScheme.surfaceContainer, width: 3))), - //listIndent: 0, + listIndent: 26, + //listBulletPadding: EdgeInsets.only(right: 10), orderedListAlign: WrapAlignment.start, //p: ThemeData().textTheme.bodyMedium!.copyWith(), // pPadding: const EdgeInsets.only(bottom: 15), @@ -56,22 +77,27 @@ stylesheet(BuildContext context) { // right: BorderSide(color: Theme.of(context).colorScheme.shadow) // ) ), - tableBorder: TableBorder( - verticalInside: BorderSide( - color: Theme.of(context).colorScheme.surfaceContainerHigh, + tableBorder: TableBorder.all( + color: Theme.of(context).colorScheme.onSurfaceVariant, width: 1, + borderRadius: BorderRadius.circular(10) ), - ), + // tableBorder: TableBorder( + // verticalInside: BorderSide( + // color: Theme.of(context).colorScheme.surfaceContainerHigh, + // width: 1, + // ), + // ), tableCellsPadding: const EdgeInsets.fromLTRB(10, 5, 5, 5), - tableHead: TextStyle( - fontSize: Theme.of(context).textTheme.bodySmall!.fontSize, + tableHead: Theme.of(context).textTheme.bodySmall!.copyWith( + fontWeight: FontWeight.w600 ), - tableBody: TextStyle( - fontSize: Theme.of(context).textTheme.bodySmall!.fontSize, + tableBody: Theme.of(context).textTheme.bodySmall!.copyWith( + fontStyle: FontStyle.normal ), tableColumnWidth: IntrinsicColumnWidth(), tableCellsDecoration: BoxDecoration( - color: Theme.of(context).colorScheme.surfaceContainerHigh, + color: Theme.of(context).colorScheme.surfaceContainerHighest, ), textAlign: WrapAlignment.start ); diff --git a/lib/themes/material.dart b/lib/themes/material.dart index d1cb826..da389c9 100644 --- a/lib/themes/material.dart +++ b/lib/themes/material.dart @@ -78,9 +78,12 @@ class MaterialTheme { fontWeight: FontWeight.w800, color: colorScheme.onSurface ), + // # Heading 3 headlineSmall: - ThemeData().textTheme.headlineSmall!.copyWith(fontSize: 24), - + ThemeData().textTheme.headlineSmall!.copyWith( + fontSize: 16, + color: colorScheme.onSurface + ), bodyLarge: GoogleFonts.roboto(textStyle: ThemeData().textTheme.bodyMedium!.copyWith( fontSize: 18, color: colorScheme.onSurfaceVariant, @@ -89,8 +92,8 @@ class MaterialTheme { fontSize: 18, color: colorScheme.onSurfaceVariant, )), - bodySmall: GoogleFonts.lato(textStyle: ThemeData().textTheme.bodyMedium!.copyWith( - fontSize: 18, + bodySmall: GoogleFonts.roboto(textStyle: ThemeData().textTheme.bodyMedium!.copyWith( + fontSize: 15, color: colorScheme.onSurfaceVariant, )), ); diff --git a/lib/utils/db.dart b/lib/utils/db.dart index 2faf315..c969aac 100644 --- a/lib/utils/db.dart +++ b/lib/utils/db.dart @@ -47,7 +47,7 @@ Future openDatabase() async { Future deleteDatabase() async { var path = await getDatabasePath(); log.info("Delete database: $path"); - sql.deleteDatabase(path); + await sql.deleteDatabase(path); } Future initDb() async { diff --git a/lib/widgets/content_list.dart b/lib/widgets/content_list.dart index d75d0a6..60a9d35 100644 --- a/lib/widgets/content_list.dart +++ b/lib/widgets/content_list.dart @@ -35,9 +35,13 @@ class ContentList extends StatelessWidget { scrollDirection: Axis.vertical, itemCount: content.length, itemBuilder: (context, index) { - Widget numeration = content[index].numeration.toString().isNotEmpty - ? Text(content[index].numeration, style: Theme.of(context).textTheme.titleLarge) - : Text('•', style: Theme.of(context).textTheme.titleLarge); + // Widget numeration = content[index].numeration.toString().isNotEmpty + // ? Text(content[index].numeration, style: Theme.of(context).textTheme.titleLarge) + // : Text('•', style: Theme.of(context).textTheme.titleLarge); + + String numerationText = content[index].numeration.toString().isNotEmpty + ? content[index].numeration + ' ' + : ''; return InkWell( onTap: () { @@ -57,17 +61,17 @@ class ContentList extends StatelessWidget { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Column( - children: [ - numeration, - const SizedBox(width: 25) - ], - ), + // Column( + // children: [ + // numeration, + // const SizedBox(width: 25) + // ], + // ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(content[index].data, + Text('$numerationText${content[index].data}', style: Theme.of(context).textTheme.titleLarge) ], ),