From 58adbfb47a93f60586b5e73c9445fea8c0592edc Mon Sep 17 00:00:00 2001 From: Tushar Ghige Date: Mon, 3 Jun 2024 02:19:54 +0530 Subject: [PATCH] Fix Deprecated API removed after v3.19 --- lib/src/renderer.dart | 2 +- test/theme_data.dart | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/renderer.dart b/lib/src/renderer.dart index fc74de5..2f2b7f7 100644 --- a/lib/src/renderer.dart +++ b/lib/src/renderer.dart @@ -47,7 +47,7 @@ class MarkdownRenderer implements NodeVisitor { fontSize: 16, height: 1.5, color: (context != null - ? Theme.of(context).textTheme.bodyText2?.color + ? Theme.of(context).textTheme.bodyMedium?.color : null) ?? const Color(0xff333333), ), diff --git a/test/theme_data.dart b/test/theme_data.dart index 6e9558b..a171f88 100644 --- a/test/theme_data.dart +++ b/test/theme_data.dart @@ -2,31 +2,31 @@ import 'package:flutter/material.dart'; final themeData = ThemeData( textTheme: const TextTheme( - headline5: TextStyle( + headlineSmall: TextStyle( fontFamily: '.SF UI Display', fontWeight: FontWeight.w400, fontSize: 24.0, color: Color(0xdd000000), ), - headline6: TextStyle( + titleLarge: TextStyle( fontFamily: '.SF UI Display', fontWeight: FontWeight.w500, fontSize: 20.0, color: Color(0xdd000000), ), - subtitle1: TextStyle( + titleMedium: TextStyle( fontFamily: '.SF UI Text', fontWeight: FontWeight.w400, fontSize: 16.0, color: Color(0xdd000000), ), - bodyText1: TextStyle( + bodyLarge: TextStyle( fontFamily: '.SF UI Text', fontWeight: FontWeight.w500, fontSize: 14.0, color: Color(0xdd000000), ), - bodyText2: TextStyle( + bodyMedium: TextStyle( fontFamily: '.SF UI Text', fontWeight: FontWeight.w400, fontSize: 14.0,