turkmen_localization_support 0.0.5 copy "turkmen_localization_support: ^0.0.5" to clipboard
turkmen_localization_support: ^0.0.5 copied to clipboard

Provides an unofficial localization for the Turkmen language for the Turkmenistan region. Here it is possible to use the Turkmen language without adding additional classes.

example/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
// Add this import
import 'package:turkmen_localization_support/turkmen_localization_support.dart';

// Entry point
void main() {
  runApp(const ExampleApp());
}

// App
class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // This should be mutable
      locale: L10n.supportedLocales[0],
      supportedLocales: L10n.supportedLocales,
      // Delegates should be placed here
      localizationsDelegates: L10n.appDelegates,
      theme: ThemeData.light(),
      home: const Scaffold(),
    );
  }
}

// Helper class
class L10n {
  // Actual delegates
  static List<LocalizationsDelegate> appDelegates = [
    GlobalMaterialLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
    // Add this line
    ...TkDelegates.delegates,
  ];
  // Supported locales list
  static const List<Locale> supportedLocales = <Locale>[
    // Add this line
    Locale('tk'),

    Locale('ru'),
    Locale('en')
  ];
}
8
likes
0
pub points
70%
popularity

Publisher

unverified uploader

Provides an unofficial localization for the Turkmen language for the Turkmenistan region. Here it is possible to use the Turkmen language without adding additional classes.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_localizations, intl

More

Packages that depend on turkmen_localization_support