template_parser

Creator: coderz1093

Last updated:

0 purchases

template_parser Image
template_parser Images

Languages

Categories

Add to Cart

Description:

template parser

TemplateParser #
A flutter package to parse String template.
Installation #
You just need to add template_parser as a dependency in your pubspec.yaml file.
dependencies:
template_parser: ^0.0.2
copied to clipboard
Example #
A simple usage example:
import 'package:template_parser/template_parser.dart';

main() {
final template = 'My name is {{FullName}}. I am {{ Age }}, have worked as a '
'{{designation}} for a bigger company, in an agile team, working mostly '
'on {{Skills}} platform.';

final List<TemplateModel> models = [
TemplateModel(variable: 'FullName', value: 'Sodipto Saha'),
TemplateModel(variable: 'Age', value: '26'),
TemplateModel(variable: 'designation', value: 'Senior Software Engineer'),
TemplateModel(variable: 'Skills', value: 'Flutter,C# And .NET Core'),
];

final parseTemplate=TemplateParser.parse(template, models);
print(parseTemplate);
}
copied to clipboard
TemplateModel #



Name
Description
Example




variable
variable of the template
{{FullName}}


value
Value of the template variable
Sodipto Saha



Warning #

Note: {{}} is required for template rendering.


{{}} ❌

{Variable} ❌

{Variable ❌

{Variable}} ❌

{{Variable} ❌

{{Variable}} ✔️

{{ Variable }} ✔️

{{variable }} ✔️

{{ variable}} ✔️

{{ variable variable }} ✔️
Features and bugs #
Please file feature requests and bugs at the issue tracker.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.