template_string 0.6.0 copy "template_string: ^0.6.0" to clipboard
template_string: ^0.6.0 copied to clipboard

A simple command-line application.

example/example.dart

import 'package:intl/date_symbol_data_local.dart';
import 'package:template_string/template_string.dart';

void main() {
  initializeDateFormatting();

  print(
    'Hello {{first_name[lowercase]}}! Your score is {{score:Int[percentPattern]}} as of {{date:DateTime[yMMMM]}}.'
        .insertTemplateValues(
      {
        'first_name': 'John',
        'score': 67.8,
        'date': DateTime.now(),
      },
      locale: 'en',
    ),
  );
}
3
likes
120
pub points
39%
popularity

Publisher

unverified uploader

A simple command-line application.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

intl

More

Packages that depend on template_string