-
Notifications
You must be signed in to change notification settings - Fork 27.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: blockquote
property not being applied in MarkdownBody
widget
#81720
Comments
Hi @guilhermepata minimal code sample// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import '../shared/markdown_demo_widget.dart';
// ignore_for_file: public_member_api_docs
const String _data = '''
# Minimal Markdown Test
---
This is a simple Markdown test. Provide a text string with Markdown tags
to the Markdown widget and it will display the formatted output in a scrollable
widget.
> This is my block quote
## Section 1
Maecenas eget **arcu egestas**, mollis ex vitae, posuere magna. Nunc eget
aliquam tortor. Vestibulum porta sodales efficitur. Mauris interdum turpis
eget est condimentum, vitae porttitor diam ornare.
### Subsection A
Sed et massa finibus, blandit massa vel, vulputate velit. Vestibulum vitae
venenatis libero. ***Curabitur sem lectus, feugiat eu justo in, eleifend
accumsan ante.*** Sed a fermentum elit. Curabitur sodales metus id mi ornare,
in ullamcorper magna congue.
''';
const String _notes = """
# Minimal Markdown Demo
---
## Overview
The simplest use case that illustrates how to make use of the
flutter_markdown package is to include a Markdown widget in a widget tree
and supply it with a character string of text containing Markdown formatting
syntax. Here is a simple Flutter app that creates a Markdown widget that
formats and displays the text in the string _markdownData. The resulting
Flutter app demonstrates the use of headers, rules, and emphasis text from
plain text Markdown syntax.
## Usage
The code sample below demonstrates a simple Flutter app with a Markdown widget.
import 'package:flutter/material.dart'; const String _markdownData = """ Minimal Markdown TestThis is a simple Markdown test. Provide a text string with Markdown tags Section 1Maecenas eget arcu egestas, mollis ex vitae, posuere magna. Nunc eget Subsection ASed et massa finibus, blandit massa vel, vulputate velit. Vestibulum vitae void main() {
Check flutter doctor -v[✓] Flutter (Channel stable, 2.2.3, on macOS 12.0 21A5506j darwin-x64, locale en-GB)
• Flutter version 2.2.3 at /Users/tahatesser/Code/flutter_stable
• Framework revision f4abaa0735 (9 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/tahatesser/Code/SDK
• Platform android-31, build-tools 30.0.3
• ANDROID_HOME = /Users/tahatesser/Code/SDK
• Java binary at: /Users/tahatesser/Code/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Xcode 13.0, Build version 13A5212g
• CocoaPods version 1.10.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 2020.3)
• Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] VS Code (version 1.59.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.26.0
[✓] Connected device (3 available)
• Taha’s iPhone (mobile) • 00008020-001059882212002E • ios • iOS 15.0
• macOS (desktop) • macos • darwin-x64 • macOS 12.0 21A5506j darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
! Doctor found issues in 1 category. [✓] Flutter (Channel master, 2.6.0-1.0.pre.170, on macOS 12.0 21A5506j darwin-x64, locale en-GB)
• Flutter version 2.6.0-1.0.pre.170 at /Users/tahatesser/Code/flutter_master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4069c6355b (8 hours ago), 2021-09-03 02:11:05 -0400
• Engine revision d6f6a0fe90
• Dart version 2.15.0 (build 2.15.0-69.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/tahatesser/Code/SDK
• Platform android-31, build-tools 30.0.3
• ANDROID_HOME = /Users/tahatesser/Code/SDK
• Java binary at: /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• CocoaPods version 1.10.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] Android Studio (version 2020.3)
• Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.59.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.26.0
[✓] Connected device (3 available)
• Taha’s iPhone (mobile) • 00008020-001059882212002E • ios • iOS 15.0 19A5340a
• macOS (desktop) • macos • darwin-x64 • macOS 12.0 21A5506j darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
• No issues found! ✅: No Issue ❗️: Issue reproduced |
I’m having this same issue (in late 2022). Is there any hope of getting this fixed? |
Still facing this issue in November 2022. Any fix? |
@cliftonlabrum @patakihara @TahaTesser UPDATE: I think I was able to figure out the solution. In the
to:
|
Thanks for your help. I switched to a different package that works really well and is actively maintained: https://pub.dev/packages/markdown_viewer The developer even added some enhancements that I requested. 😄 |
Platform: Android, iOS The same issue exists for Blockquote in the
The
This change works. |
This is definitely still an issue. Changing the |
any updates?
|
@darshankawar This still doesn't seem to work in the latest version.
Maybe can you explain why it should take such a long time to fix such issue? |
Yes you have to fix it manually. |
This commit fixes the style of blockquotes when we render the item description as Markdown. Until now blockquotes had a weird blue background, so that the text wasn't readable. Now we are using the surface color as background and we add a border on the left site with the primary color. We would also like to use italic as font family, but there is currently a bug, so that the defined blockquote style is not applied. See flutter/flutter#81720
This commit fixes the style of blockquotes when we render the item description as Markdown. Until now blockquotes had a weird blue background, so that the text wasn't readable. Now we are using the secondary color as background and we add a border on the left site with the primary color. We would also like to use italic as font family, but there is currently a bug, so that the defined blockquote style is not applied. See flutter/flutter#81720
This commit fixes the style of blockquotes when we render the item description as Markdown. Until now blockquotes had a weird blue background, so that the text wasn't readable. Now we are using the secondary color as background and we add a border on the left site with the primary color. We would also like to use italic as font family, but there is currently a bug, so that the defined blockquote style is not applied. See flutter/flutter#81720
This commit fixes the style of blockquotes when we render the item description as Markdown. Until now blockquotes had a weird blue background, so that the text wasn't readable. Now we are using the secondary color as background and we add a border on the left site with the primary color. We would also like to use italic as font family, but there is currently a bug, so that the defined blockquote style is not applied. See flutter/flutter#81720
Blockquote is ignored when building a custom MarkdownElementBuilder. |
Omg! Please fix it. it is foundation feature |
Supposedly fixes flutter/flutter#81720
Describe the bug
The
blockquote
property is not being applied in theMarkdownBody
widget. All otherTextStyle
properties appear to be working, and so are theblockquotePadding
andblockQuoteDecoration
.How to reproduce
Steps to reproduce the behavior:
MarkdownBody
widgetblockquote
property to something likeTextTheme.of(context).bodyText2.copyWith(color: Colors.red)
Expected behavior
Text should become red in the above example.
Additional context
Only tested on flutter web
The text was updated successfully, but these errors were encountered: