fromString static method

FakerXLocale fromString(
  1. String locale
)

Implementation

static FakerXLocale fromString(String locale) {
  final splits = locale.split('_');
  return FakerXLocale(splits[0], splits.length > 1 ? splits[1] : '');
}