language_code 0.4.2 copy "language_code: ^0.4.2" to clipboard
language_code: ^0.4.2 copied to clipboard

Get the current language code and Locale of the device. Also includes almost the language codes with English names and native names.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:language_code/language_code.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: ${LanguageCode.rawCode}'),
        ),
      ),
    );
  }
}
6
likes
140
pub points
89%
popularity

Publisher

verified publisherlamnhan.dev

Get the current language code and Locale of the device. Also includes almost the language codes with English names and native names.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on language_code