Repository navigation
Commit 3bd8bac
authored
[material_ui] Fix for time picker error in locales that do not use Latin digits (flutter#13035)
Port of flutter#186311, fixes flutter#85527
The time picker currently uses `int.parse` and `int.tryParse` to parse the entered number. However, in some locales, numbers are not represented using Latin digits, which causes the parsing to fail. In this implementation, I use `MaterialLocalizations` to parse the number directly, ensuring that it works correctly for all locales.
A test has been added to ensure that the new implementation works as expected and does not cause any breaking changes.
## Pre-Review Checklist1 parent 95c83e5 commit 3bd8bac
3 files changed
Lines changed: 114 additions & 3 deletions
File tree
- packages/material_ui
- lib/src
- pending_changelogs
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
1755 | 1767 | | |
1756 | 1768 | | |
1757 | 1769 | | |
| |||
1776 | 1788 | | |
1777 | 1789 | | |
1778 | 1790 | | |
1779 | | - | |
| 1791 | + | |
1780 | 1792 | | |
1781 | 1793 | | |
1782 | 1794 | | |
| |||
1802 | 1814 | | |
1803 | 1815 | | |
1804 | 1816 | | |
1805 | | - | |
| 1817 | + | |
1806 | 1818 | | |
1807 | 1819 | | |
1808 | 1820 | | |
| |||
1813 | 1825 | | |
1814 | 1826 | | |
1815 | 1827 | | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
1816 | 1858 | | |
1817 | 1859 | | |
1818 | 1860 | | |
| |||
1833 | 1875 | | |
1834 | 1876 | | |
1835 | 1877 | | |
1836 | | - | |
| 1878 | + | |
1837 | 1879 | | |
1838 | 1880 | | |
1839 | 1881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2096 | 2096 | | |
2097 | 2097 | | |
2098 | 2098 | | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
2099 | 2165 | | |
2100 | 2166 | | |
2101 | 2167 | | |
| |||
0 commit comments