drawcall / c2f Goto Github PK
View Code? Open in Web Editor NEWC2F can convert css style to Flutter code online.
Home Page: https://drawcall.github.io/c2f/
License: MIT License
C2F can convert css style to Flutter code online.
Home Page: https://drawcall.github.io/c2f/
License: MIT License
it is gold metaric css.
background: linear-gradient(120.07deg, #FFE5C5 17.61%, #D2B38B 50.22%, #F1DDC3 83.52%);
result is below
new Container(
decoration: BoxDecoration(
image: new DecorationImage(
image: new ExactAssetImage('linear-gradient(120.07deg, rgb(255, 229, 197) 17.61%, rgb(210, 179, 139) 50.22%, rgb(241, 221, 195) 83.52%'),
fit: BoxFit.auto,
repeat: ImageRepeat.repeat,
),
)
),
but, strange
and BoxFit.auto,
is a mistake.
BoxFit.fill,
is better.
I am using this site to get Gradient colors in CSS. The code puts in a percentage in every color and Flutter throws an error while using the conversion. Can you fix it or tell me the way around it.
CSS Code
background-image: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
Flutter Code generated -
Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment(0.0, 0.0),
end: Alignment(0.707, -0.707),
colors: [Color(0xff9a9e 0%00),Color(0xfad0c4 99%00),Color(0xfad0c4 100%00)],
),
)
),
Error Message -
Expected to find ','.
Too many positional arguments: 1 expected, but 2 found.
Try removing the extra arguments.
Thanks for your code, this is helpful for my project with NodeJS.
I hope to install this from NPM.
Like npm install c2f
.
Looks like this repository was transfered from organization flutterkit
to tnfe
. Now those links are failed.
css input:
background-color: #e0e0e0;
color:#e0e0e0;
Flutter
Container(
child: Text(
"Hello World",
style: TextStyle(
color: Color(0xE0E0E000),
),
),
decoration: BoxDecoration(
color: Color(0xE0E0E000),
)
),
error:
#e0e0e0 should be 0xFFE0E0E0 not 0xE0E0E000
FF 0xFFE0E0E0
css input:
text-decoration: underline;
Flutter output:
Container(
child: Text(
"Hello World",
style: TextStyle(
textDecorationLine: TextDecoration.underline,
textDecorationStyle: TextDecorationStyle.solid,
textDecorationColor: Color(0x00000000),
),
),
),
error:
The named parameter 'textDecorationLine' isn't defined.
Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'textDecorationLine'.dartundefined_named_parameter
flutter version sdk
sdk: ">=2.16.1 <3.0.0"
This works for me
Text(
"Hello World",
style: TextStyle(
decoration: TextDecoration.underline
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.