system_date_time_format 0.2.0 copy "system_date_time_format: ^0.2.0" to clipboard
system_date_time_format: ^0.2.0 copied to clipboard

A plugin for getting date and time format patterns from device system settings.

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:system_date_time_format/system_date_time_format.dart';
import 'package:system_date_time_format_example/widgets/widgets.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await SystemDateTimeFormat().initialize();
  runApp(const App());
}

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

  @override
  Widget build(BuildContext context) {
    final formats = {
      'System date format:': SystemDateTimeFormat().dateFormat,
      'System medium date format:': SystemDateTimeFormat().mediumDateFormat,
      'System long date format:': SystemDateTimeFormat().longDateFormat,
      'System time format:': SystemDateTimeFormat().timeFormat,
    };

    return MaterialApp(
      home: Scaffold(
        appBar: const Toolbar(),
        body: Body(
          children: formats.entries
              .map((e) => RowItem(title: e.key, value: e.value))
              .toList(),
        ),
      ),
    );
  }
}
14
likes
0
pub points
91%
popularity

Publisher

verified publisherdominikkrajcer.com

A plugin for getting date and time format patterns from device system settings.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on system_date_time_format