lang_apptimus 1.0.0 copy "lang_apptimus: ^1.0.0" to clipboard
lang_apptimus: ^1.0.0 copied to clipboard

LanguageHandling 1.0.0 is a powerful Flutter package designed to simplify language localization within your Flutter applications. With LanguageHandling, developers can effortlessly integrate multi-lan [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:lang_apptimus/languagehandling.dart';

import 'homepage.dart';
import 'localization/locale.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

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

class _MyAppState extends State<MyApp> {
  final LanguageHandling localization = LanguageHandling.instance;

  @override
  void initState() {
    configureLocalization();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Language Testing',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.black),
        useMaterial3: true,
      ),
      supportedLocales: localization.supportedLocales,
      localizationsDelegates: localization.localizationsDelegates,
      home: const Homepage(),
    );
  }

  void configureLocalization() {
    localization.init(
        mapLocales: LOCALES, initLanguageCode: "en"); // Pass LOCALES here
    localization.onTranslatedLanguage = onTranslatedLanguage;
  }

  void onTranslatedLanguage(Locale? locale) {
    setState(() {});
  }
}
copied to clipboard
3
likes
140
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

2024.08.27 - 2025.03.11

LanguageHandling 1.0.0 is a powerful Flutter package designed to simplify language localization within your Flutter applications. With LanguageHandling, developers can effortlessly integrate multi-language support, providing a seamless experience for users across different linguistic backgrounds.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_localizations, flutter_web_plugins, plugin_platform_interface, shared_preferences

More

Packages that depend on lang_apptimus