romanNumerals top-level constant
Lookup table mapping integers to their Roman numeral representations.
Includes common values up to 1000. For arbitrary conversions, use intToRomanNumeral which handles values from 1 to 3999.
Implementation
const romanNumerals = <int, String>{
1: 'I', // One
2: 'II', // Two
3: 'III', // Three
4: 'IV', // Four
5: 'V', // Five
6: 'VI', // Six
7: 'VII', // Seven
8: 'VIII', // Eight
9: 'IX', // Nine
10: 'X', // Ten
11: 'XI', // Eleven
12: 'XII', // Twelve
13: 'XIII', // Thirteen
14: 'XIV', // Fourteen
15: 'XV', // Fifteen
20: 'XX', // Twenty
30: 'XXX', // Thirty
40: 'XL', // Forty
50: 'L', // Fifty
60: 'LX', // Sixty
70: 'LXX', // Seventy
90: 'XC', // Ninety
99: 'IC', // Ninety-Nine (rarely used; common alternative is XCIX)
100: 'C', // One Hundred
200: 'CC', // Two Hundred
400: 'CD', // Four Hundred
500: 'D', // Five Hundred
600: 'DC', // Six Hundred
900: 'CM', // Nine Hundred
990: 'XM', // Nine Hundred Ninety (non-standard; commonly use CMXC)
1000: 'M', // One Thousand
};