language_code 0.2.0 language_code: ^0.2.0 copied to clipboard
This plugin helps you to get the current language code and Locale.
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}'),
),
),
);
}
}