forked from eatvio/eatvio_app
fix: handle null context in MarkdownHtmlWidget and improve test stability with pumpAndSettle calls
This commit is contained in:
@@ -41,7 +41,7 @@ class MarkdownHtmlWidget extends StatelessWidget {
|
||||
extensionSet: md.ExtensionSet.gitHubFlavored,
|
||||
);
|
||||
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
final screenWidth = MediaQuery.maybeOf(context)?.size.width ?? 400.0;
|
||||
final defaultImageWidth = imageWidth ?? (screenWidth - 32);
|
||||
final defaultTextColor = textColor ?? Colors.black87;
|
||||
final defaultFontSize = fontSize ?? 16.0;
|
||||
|
||||
Reference in New Issue
Block a user