styling "pseudo-element" using Dart lang

Issue

I’m building a ctusom element with DART, and styling it without using seperate css file, using the ..style as below:

    innerInput = new InputElement()
    ..style.color= '#FF8F66'
    ..style.fontFamily='openSansItalic';

I want to use “pseudo-element” styling, like styling the ‘placeholder’, ‘before’, ‘after’ ,… is there a way to do it using dart, or I’ve to use separate css file, thanks

Solution

Seems these can only be read using code innerInput.getComputedStyle(':after').content but not changed but you can create stylesheet rules by code (like the one built from CSS) How to create CSS keyframe rule in Dart

Answered By – Günter Zöchbauer

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *