Showing
5 changed files
with
39 additions
and
41 deletions
@@ -136,46 +136,40 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -136,46 +136,40 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | ||
136 | ), | 136 | ), |
137 | child: | 137 | child: |
138 | LayoutBuilder(builder: (context, constraints) { | 138 | LayoutBuilder(builder: (context, constraints) { |
139 | - return SingleChildScrollView( | ||
140 | - scrollDirection: Axis.horizontal, | ||
141 | - reverse: _direction == TextDirection.rtl, | ||
142 | - child: SizedBox( | ||
143 | - width: 550, | ||
144 | - child: Theme( | ||
145 | - data: Theme.of(context).copyWith( | ||
146 | - textTheme: const TextTheme( | ||
147 | - // For H1. | ||
148 | - headlineLarge: TextStyle(fontSize: 55), | ||
149 | - // For H2. | ||
150 | - headlineMedium: TextStyle(fontSize: 45), | ||
151 | - // For H3. | ||
152 | - headlineSmall: TextStyle(fontSize: 35), | ||
153 | - // For H4. | ||
154 | - titleLarge: TextStyle(fontSize: 25), | ||
155 | - // For H5. | ||
156 | - titleMedium: TextStyle(fontSize: 15), | ||
157 | - // For H6. | ||
158 | - titleSmall: TextStyle(fontSize: 10), | ||
159 | - ), | ||
160 | - ), | ||
161 | - child: TexMarkdown( | ||
162 | - _controller.text, | ||
163 | - textDirection: _direction, | ||
164 | - onLinkTab: (url, title) { | ||
165 | - log(title, name: "title"); | ||
166 | - log(url, name: "url"); | ||
167 | - }, | ||
168 | - textAlign: TextAlign.justify, | ||
169 | - textScaler: | ||
170 | - MediaQuery.textScalerOf(context), | ||
171 | - style: const TextStyle( | ||
172 | - // Regular text font size here. | ||
173 | - fontSize: 15, | ||
174 | - ), | ||
175 | - ), | ||
176 | - // child: const Text("Hello"), | 139 | + return Theme( |
140 | + data: Theme.of(context).copyWith( | ||
141 | + textTheme: const TextTheme( | ||
142 | + // For H1. | ||
143 | + headlineLarge: TextStyle(fontSize: 55), | ||
144 | + // For H2. | ||
145 | + headlineMedium: TextStyle(fontSize: 45), | ||
146 | + // For H3. | ||
147 | + headlineSmall: TextStyle(fontSize: 35), | ||
148 | + // For H4. | ||
149 | + titleLarge: TextStyle(fontSize: 25), | ||
150 | + // For H5. | ||
151 | + titleMedium: TextStyle(fontSize: 15), | ||
152 | + // For H6. | ||
153 | + titleSmall: TextStyle(fontSize: 10), | ||
177 | ), | 154 | ), |
178 | ), | 155 | ), |
156 | + child: TexMarkdown( | ||
157 | + _controller.text, | ||
158 | + textDirection: _direction, | ||
159 | + onLinkTab: (url, title) { | ||
160 | + log(title, name: "title"); | ||
161 | + log(url, name: "url"); | ||
162 | + }, | ||
163 | + textAlign: TextAlign.justify, | ||
164 | + textScaler: const TextScaler.linear(1.3), | ||
165 | + // textScaler: | ||
166 | + // MediaQuery.textScalerOf(context), | ||
167 | + style: const TextStyle( | ||
168 | + // Regular text font size here. | ||
169 | + fontSize: 15, | ||
170 | + ), | ||
171 | + ), | ||
172 | + // child: const Text("Hello"), | ||
179 | ); | 173 | ); |
180 | }), | 174 | }), |
181 | ); | 175 | ); |
@@ -182,7 +182,7 @@ packages: | @@ -182,7 +182,7 @@ packages: | ||
182 | path: ".." | 182 | path: ".." |
183 | relative: true | 183 | relative: true |
184 | source: path | 184 | source: path |
185 | - version: "0.0.2" | 185 | + version: "0.0.3" |
186 | http: | 186 | http: |
187 | dependency: transitive | 187 | dependency: transitive |
188 | description: | 188 | description: |
@@ -18,9 +18,9 @@ abstract class MarkdownComponent { | @@ -18,9 +18,9 @@ abstract class MarkdownComponent { | ||
18 | HrLine(), | 18 | HrLine(), |
19 | ImageMd(), | 19 | ImageMd(), |
20 | BoldMd(), | 20 | BoldMd(), |
21 | - ItalicMd(), | ||
22 | LatexMathMultyLine(), | 21 | LatexMathMultyLine(), |
23 | LatexMath(), | 22 | LatexMath(), |
23 | + ItalicMd(), | ||
24 | ATagMd(), | 24 | ATagMd(), |
25 | ]; | 25 | ]; |
26 | 26 |
1 | name: gpt_markdown | 1 | name: gpt_markdown |
2 | description: "The purpose of this package is to render the response of ChatGPT into a Flutter app." | 2 | description: "The purpose of this package is to render the response of ChatGPT into a Flutter app." |
3 | -version: 0.0.2 | 3 | +version: 0.0.3 |
4 | homepage: https://github.com/saminsohag/flutter_packages/tree/main/gpt_markdown | 4 | homepage: https://github.com/saminsohag/flutter_packages/tree/main/gpt_markdown |
5 | 5 | ||
6 | environment: | 6 | environment: |
-
Please register or login to post a comment