Repository: flutter
Issue: MaterialLocalizations not respecting locale formatting
Labels: framework,f: material design,a: internationalization,has reproducible steps,found in release: 3.7,found in release: 3.9,team-design,triaged-design

The MaterialLocations class seems to be only accounting for the language part of the locale, not for the formatting in some circumstances.

For example, the locale en_DE sets the device to English language with German formatting for numbers, dates, currency, etc.
This can be easily verified by checking the first day of week: Sunday in the US, Monday in Germany.

This is respected by Android in the default calendar app, but not by MaterialLocations.

Looking a bit deeper, it seems the problem is that there are variants of MaterialLocations for each specific locale.
For example, the UK uses Monday as first week day: `MaterialLocalizations.of(context)` returns `MaterialLocalizationEn` or `MaterialLocalizationEnGb` accordingly.

The issue with this strategy is that it can't account for all possible permutations of [language]_[formatting], so a deeper intervention may be required to solve this issue.

## Steps to Reproduce

1. Set system to non-common locale, e.g. en_DE (English language, German formatting).
2. Get first day of week from the system

**Expected results:**

First day of week reported as 1 (Monday)

**Actual results:**

First day of week is reported as 0 (Sunday)

<details>
<summary>Code sample</summary>

```dart
main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatelessWidget {
  @override
  Widget build(context) => Center(
    child: Text(
      'FDoW: ${MaterialLocalizations.of(context).firstDayOfWeekIndex}',
    )
  );
}
```

</details>

<details>
  <summary>Flutter doctor</summary>

```
[✓] Flutter (Channel beta, 3.8.0-10.1.pre, on Fedora Linux 37 (Workstation
    Edition) 6.1.14-200.fc37.x86_64, locale en_US.UTF-8)
    • Flutter version 3.8.0-10.1.pre on channel beta at /home/cachapa/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1a0a03a41d (3 weeks ago), 2023-02-16 22:03:58 -0600
    • Engine revision 639e313f99
    • Dart version 3.0.0 (build 3.0.0-218.1.beta)
    • DevTools version 2.21.1

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /home/cachapa/Android/Sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for
      more details.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 15.0.7 (Fedora 15.0.7-1.fc37)
    • cmake version 3.26.0-rc4
    • ninja version 1.10.2
    • pkg-config version 1.8.0

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup
      for detailed instructions).

[✓] IntelliJ IDEA Community Edition (version 2022.3)
    • IntelliJ at /opt/idea
    • Flutter plugin version 72.1.4
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (3 available)
    • Pixel 3 (mobile) • 89KX0AQS1 • android-arm64  • Android 12 (API 31)
    • Linux (desktop)  • linux     • linux-x64      • Fedora Linux 37
      (Workstation Edition) 6.1.14-200.fc37.x86_64
    • Chrome (web)     • chrome    • web-javascript • Google Chrome
      110.0.5481.177

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.
```

</details>