title: How to set the locale property to TableCalendar widget
body: <p>Flutter has a widget called <a href="https://pub.dev/packages/table_calendar" rel="nofollow noreferrer">Table calendar</a>. I'm trying to use it but I need to get the locale language from the device, or at minimum can set my language. In the documentation they code at main file, but I'm in another then I can't reproduce the example.</p>
  <p>This is what I tried until now:</p>
  <pre class="lang-dart prettyprint-override"><code>Widget build(BuildContext context) {
      return SingleChildScrollView(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              TableCalendar(
                //locale: &quot;pt_BR&quot;,
                initialCalendarFormat: CalendarFormat.month,
                calendarStyle: CalendarStyle(
                  todayColor: CustomColors.goldMD,
                  selectedColor: CustomColors.blackMD,
                  todayStyle: TextStyle(
                      fontWeight: FontWeight.bold, fontSize: 18, color: CustomColors.white
  ......
  </code></pre>
  <p>If I uncomment the line 'locale' and run the app, it throws this error:</p>
  <blockquote>
  <p>Locale data has not been initialized, call initializeDateFormatting().</p>
  </blockquote>
  <p>So.. I go to the <code>initState</code> method and write:</p>
  <p><code>initializeDateFormatting('pt_BR', null);</code> (it receives 2 args)</p>
  <p>And the error keeps equal. What can I do to handle this?</p>