Coder Social home page Coder Social logo

liquid_dart's People

Contributors

kechankrisna avatar stefanrusek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

liquid_dart's Issues

Putting objects into the context

Any chance to enhance the tags to accept objects in the context?
Something like (similar to your introductionary example):

class User {
    final String name;
    final String email;
    final List<String> roles;

    // constructor
}


List<User> users = List();
// add some users
context.variables['users'] = users;
final template = Template.parse(context, Source.fromString(raw));
print(template.render(context));

This would greatly simplify my code.

plus Filter

Hi,

the plus Filter does not seem to work:

{% assign we = 33 |plus: 22 %}

Error

E/flutter (25024): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Parse Exception: Unexpected Token: <TokenType.identifier line=1 column=19 value='plus'> expected null

Regards,
Sebastian

Unable to create external tags

I wanted to implement the regroup tag in my project since it is missing in the builtin tags. Unfortunately I am not able to create tags in my project because a couple of classes are not exposed. These are: Expression, Tag, Token, TagParser, TokenType, Parser, ParseException.
There may be other necessary classes but for my first try that's it. Please make them available.
Regards,
Mike

Please support the web platform

The package currently depends on dart:io, which prevents it from running on the web. Please remove this dependency or make it optional.

Parser Error: assign in loops

Hi,

I get an error when variables are assigned in a loop. This works with other liquid engines, is it possible to fix that?

Minimum example which causes the error:

{% for row in test %} {% assign a = 34 %} {% endfor %}

Error

E/flutter (25024): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Parse Exception: Unexpected Token: <TokenType.identifier line=10 column=7 value='endfor'> expected null

Thanks,
Sebastian

unable to get list length

I was trying to get list length by doing

<b>Total Users {{ users | length }}</b>

and also by doing

<b>Total Users {{ users.length }}</b>

but none of them worked!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.