Do I need to include the country code in the locale in Flutter? 

No.

However, if you want to cover more variations of the language (e.g. es-ES, es-MX, etc.), then it is required.
The same applies to script codes (e.g. zh-Hans, zh-Hant, etc.).

It should also be noted that it is a good practice to have a generic fallback language in order to avoid wrong language resolution.

// Full Chinese support for CN, TW, and HK
supportedLocales: <Locale>[
  const Locale.fromSubtags(languageCode: 'zh'), // generic Chinese 'zh'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'), // generic simplified Chinese 'zh_Hans'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'), // generic traditional Chinese 'zh_Hant'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'), // 'zh_Hans_CN'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant', countryCode: 'TW'), // 'zh_Hant_TW'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant', countryCode: 'HK'), // 'zh_Hant_HK'
],

Flutter internationalization tutorial:

Copyrights 2024 © Localizely