OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library bidi_utils_test; |
| 6 |
| 7 import 'package:intl/intl.dart'; |
| 8 import 'package:unittest/unittest.dart'; |
| 9 |
| 10 /** |
| 11 * Tests the bidi utilities library. |
| 12 */ |
| 13 main() { |
| 14 var LRE = '\u202A'; |
| 15 var RLE = '\u202B'; |
| 16 var PDF = '\u202C'; |
| 17 |
| 18 test('isRtlLang', () { |
| 19 expect(Bidi.isRtlLanguage('en'), isFalse); |
| 20 expect(Bidi.isRtlLanguage('fr'), isFalse); |
| 21 expect(Bidi.isRtlLanguage('zh-CN'), isFalse); |
| 22 expect(Bidi.isRtlLanguage('fil'), isFalse); |
| 23 expect(Bidi.isRtlLanguage('az'), isFalse); |
| 24 expect(Bidi.isRtlLanguage('iw-Latn'), isFalse); |
| 25 expect(Bidi.isRtlLanguage('iw-LATN'), isFalse); |
| 26 expect(Bidi.isRtlLanguage('iw_latn'), isFalse); |
| 27 expect(Bidi.isRtlLanguage('ar'), isTrue); |
| 28 expect(Bidi.isRtlLanguage('AR'), isTrue); |
| 29 expect(Bidi.isRtlLanguage('iw'), isTrue); |
| 30 expect(Bidi.isRtlLanguage('he'), isTrue); |
| 31 expect(Bidi.isRtlLanguage('fa'), isTrue); |
| 32 expect(Bidi.isRtlLanguage('ar-EG'), isTrue); |
| 33 expect(Bidi.isRtlLanguage('az-Arab'), isTrue); |
| 34 expect(Bidi.isRtlLanguage('az-ARAB-IR'), isTrue); |
| 35 expect(Bidi.isRtlLanguage('az_arab_IR'), isTrue); |
| 36 }); |
| 37 |
| 38 test('hasAnyLtr', () { |
| 39 expect(Bidi.hasAnyLtr(''), isFalse); |
| 40 expect(Bidi.hasAnyLtr('\u05e0\u05e1\u05e2'), isFalse); |
| 41 expect(Bidi.hasAnyLtr('\u05e0\u05e1z\u05e2'), isTrue); |
| 42 expect(Bidi.hasAnyLtr('123\t... \n'), isFalse); |
| 43 expect(Bidi.hasAnyLtr('<br>123<', false), isTrue); |
| 44 expect(Bidi.hasAnyLtr('<br>123<', true), isFalse); |
| 45 }); |
| 46 |
| 47 test('hasAnyRtl', () { |
| 48 expect(Bidi.hasAnyRtl(''), isFalse); |
| 49 expect(Bidi.hasAnyRtl('abc'), isFalse); |
| 50 expect(Bidi.hasAnyRtl('ab\u05e0c'), isTrue); |
| 51 expect(Bidi.hasAnyRtl('123\t... \n'), isFalse); |
| 52 expect(Bidi.hasAnyRtl('<input value=\u05e0>123', false), isTrue); |
| 53 expect(Bidi.hasAnyRtl('<input value=\u05e0>123', true), isFalse); |
| 54 }); |
| 55 |
| 56 test('endsWithLtr', () { |
| 57 expect(Bidi.endsWithLtr('a'), isTrue); |
| 58 expect(Bidi.endsWithLtr('abc'), isTrue); |
| 59 expect(Bidi.endsWithLtr('a (!)'), isTrue); |
| 60 expect(Bidi.endsWithLtr('a.1'), isTrue); |
| 61 expect(Bidi.endsWithLtr('http://www.google.com '), isTrue); |
| 62 expect(Bidi.endsWithLtr('\u05e0a'), isTrue); |
| 63 expect(Bidi.endsWithLtr(' \u05e0\u05e1a\u05e2\u05e3 a (!)'), isTrue); |
| 64 expect(Bidi.endsWithLtr(''), isFalse); |
| 65 expect(Bidi.endsWithLtr(' '), isFalse); |
| 66 expect(Bidi.endsWithLtr('1'), isFalse); |
| 67 expect(Bidi.endsWithLtr('\u05e0'), isFalse); |
| 68 expect(Bidi.endsWithLtr('\u05e0 1(!)'), isFalse); |
| 69 expect(Bidi.endsWithLtr('a\u05e0'), isFalse); |
| 70 expect(Bidi.endsWithLtr('a abc\u05e0\u05e1def\u05e2. 1'), isFalse); |
| 71 expect(Bidi.endsWithLtr(' \u05e0\u05e1a\u05e2 <', true), isFalse); |
| 72 expect(Bidi.endsWithLtr(' \u05e0\u05e1a\u05e2 <', false), isTrue); |
| 73 }); |
| 74 |
| 75 test('endsWithRtl', () { |
| 76 expect(Bidi.endsWithRtl('\u05e0'), isTrue); |
| 77 expect(Bidi.endsWithRtl('\u05e0\u05e1\u05e2'), isTrue); |
| 78 expect(Bidi.endsWithRtl('\u05e0 (!)'), isTrue); |
| 79 expect(Bidi.endsWithRtl('\u05e0.1'), isTrue); |
| 80 expect(Bidi.endsWithRtl('http://www.google.com/\u05e0 '), isTrue); |
| 81 expect(Bidi.endsWithRtl('a\u05e0'), isTrue); |
| 82 expect(Bidi.endsWithRtl(' a abc\u05e0def\u05e3. 1'), isTrue); |
| 83 expect(Bidi.endsWithRtl(''), isFalse); |
| 84 expect(Bidi.endsWithRtl(' '), isFalse); |
| 85 expect(Bidi.endsWithRtl('1'), isFalse); |
| 86 expect(Bidi.endsWithRtl('a'), isFalse); |
| 87 expect(Bidi.endsWithRtl('a 1(!)'), isFalse); |
| 88 expect(Bidi.endsWithRtl('\u05e0a'), isFalse); |
| 89 expect(Bidi.endsWithRtl('\u05e0 \u05e0\u05e1ab\u05e2 a (!)'), isFalse); |
| 90 expect(Bidi.endsWithRtl(' \u05e0\u05e1a\u05e2 <', true), isTrue); |
| 91 expect(Bidi.endsWithRtl(' \u05e0\u05e1a\u05e2 <', false), isFalse); |
| 92 }); |
| 93 |
| 94 test('guardBracketInHtml', () { |
| 95 var strWithRtl = "asc \u05d0 (\u05d0\u05d0\u05d0)"; |
| 96 expect(Bidi.guardBracketInHtml(strWithRtl), |
| 97 equals("asc \u05d0 <span dir=rtl>(\u05d0\u05d0\u05d0)</span>")); |
| 98 expect(Bidi.guardBracketInHtml(strWithRtl, true), |
| 99 equals("asc \u05d0 <span dir=rtl>(\u05d0\u05d0\u05d0)</span>")); |
| 100 expect(Bidi.guardBracketInHtml(strWithRtl, false), |
| 101 equals("asc \u05d0 <span dir=ltr>(\u05d0\u05d0\u05d0)</span>")); |
| 102 |
| 103 var strWithRtl2 = "\u05d0 a (asc:))"; |
| 104 expect(Bidi.guardBracketInHtml(strWithRtl2), |
| 105 equals("\u05d0 a <span dir=rtl>(asc:))</span>")); |
| 106 expect(Bidi.guardBracketInHtml(strWithRtl2, true), |
| 107 equals("\u05d0 a <span dir=rtl>(asc:))</span>")); |
| 108 expect(Bidi.guardBracketInHtml(strWithRtl2, false), |
| 109 equals("\u05d0 a <span dir=ltr>(asc:))</span>")); |
| 110 |
| 111 var strWithoutRtl = "a (asc) {{123}}"; |
| 112 expect(Bidi.guardBracketInHtml(strWithoutRtl), |
| 113 equals("a <span dir=ltr>(asc)</span> <span dir=ltr>{{123}}</span>")); |
| 114 expect(Bidi.guardBracketInHtml(strWithoutRtl, true), |
| 115 equals("a <span dir=rtl>(asc)</span> <span dir=rtl>{{123}}</span>")); |
| 116 expect(Bidi.guardBracketInHtml(strWithoutRtl, false), |
| 117 equals("a <span dir=ltr>(asc)</span> <span dir=ltr>{{123}}</span>")); |
| 118 }); |
| 119 |
| 120 test('guardBracketInText', () { |
| 121 var strWithRtl = "asc \u05d0 (\u05d0\u05d0\u05d0)"; |
| 122 expect(Bidi.guardBracketInText(strWithRtl), |
| 123 equals("asc \u05d0 \u200f(\u05d0\u05d0\u05d0)\u200f")); |
| 124 expect(Bidi.guardBracketInText(strWithRtl, true), |
| 125 equals("asc \u05d0 \u200f(\u05d0\u05d0\u05d0)\u200f")); |
| 126 expect(Bidi.guardBracketInText(strWithRtl, false), |
| 127 equals("asc \u05d0 \u200e(\u05d0\u05d0\u05d0)\u200e")); |
| 128 |
| 129 var strWithRtl2 = "\u05d0 a (asc:))"; |
| 130 expect(Bidi.guardBracketInText(strWithRtl2), |
| 131 equals("\u05d0 a \u200f(asc:))\u200f")); |
| 132 expect(Bidi.guardBracketInText(strWithRtl2, true), |
| 133 equals("\u05d0 a \u200f(asc:))\u200f")); |
| 134 expect(Bidi.guardBracketInText(strWithRtl2, false), |
| 135 equals("\u05d0 a \u200e(asc:))\u200e")); |
| 136 |
| 137 var strWithoutRtl = "a (asc) {{123}}"; |
| 138 expect(Bidi.guardBracketInText(strWithoutRtl), |
| 139 equals("a \u200e(asc)\u200e \u200e{{123}}\u200e")); |
| 140 expect(Bidi.guardBracketInText(strWithoutRtl, true), |
| 141 equals("a \u200f(asc)\u200f \u200f{{123}}\u200f")); |
| 142 expect(Bidi.guardBracketInText(strWithoutRtl, false), |
| 143 equals("a \u200e(asc)\u200e \u200e{{123}}\u200e")); |
| 144 }); |
| 145 |
| 146 test('enforceRtlInHtml', () { |
| 147 var str = '<div> first <br> second </div>'; |
| 148 expect(Bidi.enforceRtlInHtml(str), |
| 149 equals('<div dir=rtl> first <br> second </div>')); |
| 150 str = 'first second'; |
| 151 expect(Bidi.enforceRtlInHtml(str), |
| 152 equals('\n<span dir=rtl>first second</span>')); |
| 153 }); |
| 154 |
| 155 test('enforceRtlInText', () { |
| 156 var str = 'first second'; |
| 157 expect(Bidi.enforceRtlInText(str), equals('${RLE}first second$PDF')); |
| 158 }); |
| 159 |
| 160 test('enforceLtrInHtml', () { |
| 161 var str = '<div> first <br> second </div>'; |
| 162 expect(Bidi.enforceLtrInHtml(str), |
| 163 equals('<div dir=ltr> first <br> second </div>')); |
| 164 str = 'first second'; |
| 165 expect(Bidi.enforceLtrInHtml(str), |
| 166 equals('\n<span dir=ltr>first second</span>')); |
| 167 }); |
| 168 |
| 169 test('enforceLtrInText', () { |
| 170 var str = 'first second'; |
| 171 expect(Bidi.enforceLtrInText(str), equals('${LRE}first second$PDF')); |
| 172 }); |
| 173 |
| 174 test('normalizeHebrewQuote', () { |
| 175 expect(Bidi.normalizeHebrewQuote('\u05d0"'), equals('\u05d0\u05f4')); |
| 176 expect(Bidi.normalizeHebrewQuote('\u05d0\''), equals('\u05d0\u05f3')); |
| 177 expect(Bidi.normalizeHebrewQuote('\u05d0"\u05d0\''), |
| 178 equals('\u05d0\u05f4\u05d0\u05f3')); |
| 179 }); |
| 180 |
| 181 test('estimateDirectionOfText', () { |
| 182 expect(Bidi.estimateDirectionOfText('', isHtml: false).value, |
| 183 equals(TextDirection.UNKNOWN.value)); |
| 184 expect(Bidi.estimateDirectionOfText(' ', isHtml: false).value, |
| 185 equals(TextDirection.UNKNOWN.value)); |
| 186 expect(Bidi.estimateDirectionOfText('! (...)', isHtml: false).value, |
| 187 equals(TextDirection.UNKNOWN.value)); |
| 188 expect( |
| 189 Bidi.estimateDirectionOfText('All-Ascii content', isHtml: false).value, |
| 190 equals(TextDirection.LTR.value)); |
| 191 expect(Bidi.estimateDirectionOfText('-17.0%', isHtml: false).value, |
| 192 equals(TextDirection.LTR.value)); |
| 193 expect(Bidi.estimateDirectionOfText('http://foo/bar/', isHtml: false).value, |
| 194 equals(TextDirection.LTR.value)); |
| 195 expect(Bidi.estimateDirectionOfText( |
| 196 'http://foo/bar/?s=\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0' |
| 197 '\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0\u05d0' |
| 198 '\u05d0\u05d0\u05d0\u05d0\u05d0').value, |
| 199 equals(TextDirection.LTR.value)); |
| 200 expect(Bidi.estimateDirectionOfText('\u05d0', isHtml: false).value, |
| 201 equals(TextDirection.RTL.value)); |
| 202 expect(Bidi.estimateDirectionOfText('9 \u05d0 -> 17.5, 23, 45, 19', |
| 203 isHtml: false).value, equals(TextDirection.RTL.value)); |
| 204 expect(Bidi.estimateDirectionOfText( |
| 205 'http://foo/bar/ \u05d0 http://foo2/bar2/ http://foo3/bar3/').value, |
| 206 equals(TextDirection.RTL.value)); |
| 207 expect(Bidi.estimateDirectionOfText( |
| 208 '\u05d0\u05d9\u05df \u05de\u05de\u05e9 \u05de\u05d4 \u05dc\u05e8\u05d0' |
| 209 '\u05d5\u05ea: \u05dc\u05d0 \u05e6\u05d9\u05dc\u05de\u05ea\u05d9 \u05d4' |
| 210 '\u05e8\u05d1\u05d4 \u05d5\u05d2\u05dd \u05d0\u05dd \u05d4\u05d9\u05d9' |
| 211 '\u05ea\u05d9 \u05de\u05e6\u05dc\u05dd, \u05d4\u05d9\u05d4 \u05e9' |
| 212 '\u05dd').value, equals(TextDirection.RTL.value)); |
| 213 expect(Bidi.estimateDirectionOfText( |
| 214 '\u05db\u05d0 - http://geek.co.il/gallery/v/2007-06 - \u05d0\u05d9' |
| 215 '\u05df \u05de\u05de\u05e9 \u05de\u05d4 \u05dc\u05e8\u05d0\u05d5\u05ea:' |
| 216 ' \u05dc\u05d0 \u05e6\u05d9\u05dc\u05de\u05ea\u05d9 \u05d4\u05e8\u05d1 ' |
| 217 '\u05d5\u05d2\u05dd \u05d0\u05dd \u05d4\u05d9\u05d9\u05d9 \u05de\u05e6' |
| 218 '\u05dc\u05dd, \u05d4\u05d9\u05d4 \u05e9\u05dd \u05d1\u05e2\u05d9\u05e7' |
| 219 ' \u05d4\u05e8\u05d1\u05d4 \u05d0\u05e0\u05e9\u05d9\u05dd. \u05de\u05d4' |
| 220 ' \u05e9\u05db\u05df - \u05d0\u05e4\u05e9\u05e8 \u05dc\u05e0\u05e6' |
| 221 '\u05dc \u05d0\u05ea \u05d4\u05d4 \u05d3\u05d6\u05de\u05e0\u05d5 ' |
| 222 '\u05dc\u05d4\u05e1\u05ea\u05db\u05dc \u05e2\u05dc \u05db\u05de\u05d4 ' |
| 223 '\u05ea\u05de\u05d5\u05e0\u05d5\u05ea \u05de\u05e9\u05e9\u05e2\u05d5' |
| 224 '\u05ea \u05d9\u05e9\u05e0\u05d5 \u05d9\u05d5\u05ea\u05e8 \u05e9\u05d9' |
| 225 '\u05e9 \u05dc\u05d9 \u05d1\u05d0\u05ea\u05e8', |
| 226 isHtml: false).value, equals(TextDirection.RTL.value)); |
| 227 expect(Bidi.estimateDirectionOfText( |
| 228 'CAPTCHA \u05de\u05e9\u05d5\u05db\u05dc\u05dc ' |
| 229 '\u05de\u05d3\u05d9?').value, equals(TextDirection.RTL.value)); |
| 230 expect(Bidi.estimateDirectionOfText( |
| 231 'Yes Prime Minister \u05e2\u05d3\u05db\u05d5\u05df. \u05e9\u05d0\u05dc' |
| 232 '\u05d5 \u05d0\u05d5\u05ea\u05d9 \u05de\u05d4 \u05d0\u05e0\u05d9 ' |
| 233 '\u05e8\u05d5\u05e6\u05d4 \u05de\u05ea\u05e0\u05d4 \u05dc\u05d7' |
| 234 '\u05d2').value, equals(TextDirection.RTL.value)); |
| 235 expect(Bidi.estimateDirectionOfText( |
| 236 '17.4.02 \u05e9\u05e2\u05d4:13-20 .15-00 .\u05dc\u05d0 \u05d4\u05d9' |
| 237 '\u05d9\u05ea\u05d9 \u05db\u05d0\u05df.').value, |
| 238 equals(TextDirection.RTL.value)); |
| 239 expect(Bidi.estimateDirectionOfText( |
| 240 '5710 5720 5730. \u05d4\u05d3\u05dc\u05ea. \u05d4\u05e0\u05e9\u05d9' |
| 241 '\u05e7\u05d4', isHtml: false).value, equals(TextDirection.RTL.value)); |
| 242 expect(Bidi.estimateDirectionOfText( |
| 243 '\u05d4\u05d3\u05dc\u05ea http://www.google.com ' |
| 244 'http://www.gmail.com').value, equals(TextDirection.RTL.value)); |
| 245 expect(Bidi.estimateDirectionOfText( |
| 246 '\u05d4\u05d3\u05dc <some quite nasty html mark up>').value, |
| 247 equals(TextDirection.LTR.value)); |
| 248 expect(Bidi.estimateDirectionOfText( |
| 249 '\u05d4\u05d3\u05dc <some quite nasty html mark up>').value, |
| 250 equals(TextDirection.LTR.value)); |
| 251 expect(Bidi.estimateDirectionOfText( |
| 252 '\u05d4\u05d3\u05dc\u05ea & < >').value, |
| 253 equals(TextDirection.LTR.value)); |
| 254 expect(Bidi.estimateDirectionOfText( |
| 255 '\u05d4\u05d3\u05dc\u05ea & < >', isHtml: true).value, |
| 256 equals(TextDirection.RTL.value)); |
| 257 }); |
| 258 |
| 259 test('detectRtlDirectionality', () { |
| 260 var bidiText = []; |
| 261 var item = new SampleItem('Pure Ascii content'); |
| 262 bidiText.add(item); |
| 263 |
| 264 item = new SampleItem('\u05d0\u05d9\u05df \u05de\u05de\u05e9 \u05de\u05d4' |
| 265 ' \u05dc\u05e8\u05d0\u05d5\u05ea: \u05dc\u05d0 \u05e6\u05d9\u05dc' |
| 266 '\u05de\u05ea\u05d9 \u05d4\u05e8\u05d1\u05d4 \u05d5\u05d2\u05dd ' |
| 267 '\u05d0\u05dd \u05d4\u05d9\u05d9\u05ea\u05d9 \u05de\u05e6\u05dc\u05dd, ' |
| 268 '\u05d4\u05d9\u05d4 \u05e9\u05dd', true); |
| 269 bidiText.add(item); |
| 270 |
| 271 item = new SampleItem('\u05db\u05d0\u05df - http://geek.co.il/gallery/v/' |
| 272 '2007-06 - \u05d0\u05d9\u05df \u05de\u05de\u05e9 \u05de\u05d4 \u05dc' |
| 273 '\u05e8\u05d0\u05d5\u05ea: \u05dc\u05d0 \u05e6\u05d9\u05dc\u05de\u05ea' |
| 274 '\u05d9 \u05d4\u05e8\u05d1\u05d4 \u05d5\u05d2\u05dd \u05d0\u05dd \u05d4' |
| 275 '\u05d9\u05d9\u05ea\u05d9 \u05de\u05e6\u05dc\u05dd, \u05d4\u05d9\u05d4 ' |
| 276 '\u05e9\u05dd \u05d1\u05e2\u05d9\u05e7\u05e8 \u05d4\u05e8\u05d1\u05d4 ' |
| 277 '\u05d0\u05e0\u05e9\u05d9\u05dd. \u05de\u05d4 \u05e9\u05db\u05df - ' |
| 278 '\u05d0\u05e4\u05e9\u05e8 \u05dc\u05e0\u05e6\u05dc \u05d0\u05ea \u05d4' |
| 279 '\u05d4\u05d3\u05d6\u05de\u05e0\u05d5\u05ea \u05dc\u05d4\u05e1\u05ea' |
| 280 '\u05db\u05dc \u05e2\u05dc \u05db\u05de\u05d4 \u05ea\u05de\u05d5\u05e0' |
| 281 '\u05d5\u05ea \u05de\u05e9\u05e2\u05e9\u05e2\u05d5\u05ea \u05d9\u05e9' |
| 282 '\u05e0\u05d5\u05ea \u05d9\u05d5\u05ea\u05e8 \u05e9\u05d9\u05e9 \u05dc' |
| 283 '\u05d9 \u05d1\u05d0\u05ea\u05e8', true); |
| 284 bidiText.add(item); |
| 285 |
| 286 item = new SampleItem('CAPTCHA \u05de\u05e9\u05d5\u05db\u05dc\u05dc ' |
| 287 '\u05de\u05d3\u05d9?', true); |
| 288 bidiText.add(item); |
| 289 |
| 290 item = new SampleItem('Yes Prime Minister \u05e2\u05d3\u05db\u05d5\u05df. ' |
| 291 '\u05e9\u05d0\u05dc\u05d5 \u05d0\u05d5\u05ea\u05d9 \u05de\u05d4 \u05d0' |
| 292 '\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05de\u05ea\u05e0\u05d4 ' |
| 293 '\u05dc\u05d7\u05d2', true); |
| 294 bidiText.add(item); |
| 295 |
| 296 item = new SampleItem('17.4.02 \u05e9\u05e2\u05d4:13-20 .15-00 .\u05dc' |
| 297 '\u05d0 \u05d4\u05d9\u05d9\u05ea\u05d9 \u05db\u05d0\u05df.', true); |
| 298 bidiText.add(item); |
| 299 |
| 300 item = new SampleItem('5710 5720 5730. \u05d4\u05d3\u05dc\u05ea. \u05d4' |
| 301 '\u05e0\u05e9\u05d9\u05e7\u05d4', true); |
| 302 bidiText.add(item); |
| 303 |
| 304 item = new SampleItem('\u05d4\u05d3\u05dc\u05ea http://www.google.com ' |
| 305 'http://www.gmail.com', true); |
| 306 bidiText.add(item); |
| 307 |
| 308 item = new SampleItem('>\u05d4<', true, true); |
| 309 bidiText.add(item); |
| 310 |
| 311 item = new SampleItem('>\u05d4<', false); |
| 312 bidiText.add(item); |
| 313 |
| 314 for (var i = 0; i < bidiText.length; i++) { |
| 315 var isRtlDir = Bidi.detectRtlDirectionality(bidiText[i].text, |
| 316 isHtml: bidiText[i].isHtml); |
| 317 if (isRtlDir != bidiText[i].isRtl) { |
| 318 var str = '"${bidiText[i].text} " should be ' |
| 319 '${bidiText[i].isRtl ? "rtl" : "ltr"} but detected as ' |
| 320 '${isRtlDir ? "rtl" : "ltr"}'; |
| 321 //alert(str); |
| 322 } |
| 323 expect(bidiText[i].isRtl, isRtlDir); |
| 324 } |
| 325 }); |
| 326 } |
| 327 |
| 328 class SampleItem { |
| 329 String text; |
| 330 bool isRtl; |
| 331 bool isHtml; |
| 332 SampleItem([someText = '', someIsRtl = false, isHtml = false]) |
| 333 : this.text = someText, |
| 334 this.isRtl = someIsRtl, |
| 335 this.isHtml = isHtml; |
| 336 } |
OLD | NEW |