C2F can convert css style to Flutter code online.

Overview

C2F is an interesting little project. I hope to find a way to convert css styles to flutter styles. I believe many web developers will like it. https://drawcall.github.io/c2f/

Statement

For beginners, the flutter style is really hard to remember. I want to build a website that converts css styles to flutter style online. Maybe it will help those web developers get started quickly.

NOTE

Although I have already written a part of the code, there are still a lot of styles that I have not converted. I very much hope that you can join and participate, sincerely invite

I want to use postcss to do a lot of things, we can get a style attribute and value, and then do a big mapping table... If you have a better idea, you can implement it together.

Run and build

Clone the project

git clone https://github.com/drawcall/c2f.git

Startup project

npm i

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

License

c2f is licensed under MIT license. View license. https://github.com/drawcall/c2f/blob/master/LICENSE

You might also like...

Color-Converter - A minimalist application made with flutter to convert hexadecimal colors to RGB colors and vise-versa.

Color-Converter - A minimalist application made with flutter to convert hexadecimal colors to RGB colors and vise-versa.

Color Converter A minimalist application made with flutter to convert hexadecimal colors to RGB colors and vise-versa for Flutter Create Competition.

Sep 16, 2020

A simple dart package to convert large numbers to a human readable format. 1278 to 1.2K instead, for example.

A simple dart package to convert large numbers to a human readable format. 1278 to 1.2K instead, for example. Features Represents large numbers in ter

Oct 8, 2022

Csv to list for web - Convert a CSV into a list in order to populate a firebase database

Csv to list for web - Convert a CSV into a list in order to populate a firebase database

My goal is to convert a CSV into a list in order to populate a firebase database

Jan 26, 2022

A JSON serialize class to convert 'to' and 'from' JSON format Enums, DateTime and any of your own classes.

A JSON serialize class to convert 'to' and 'from' JSON format Enums, DateTime and any of your own classes. Introduction Jsonize solves the problem of

Nov 17, 2022

A free tool to convert any website into a cross platform native application.

A free tool to convert any website into a cross platform native application.

SWAB (Spyxpo Web to App Builder) Convert any website into an iOS/Android/Windows/macOS/Linux app. This is a preview build for testing purposes major u

Jan 1, 2023

This library helps you to convert Delta to HTML. Based on Flutter_Quill Delta

Delta_To_HTML This library helps you to convert Delta to HTML. Based on Flutter_Quill Delta [ currently in under development ] Usage import 'package:d

Dec 20, 2022

Iosish indicator - ๐ŸŽ Create awesome and simple iOS style floating indicator which can be found when silent/sleep mode switched on Flutter.

Iosish indicator - ๐ŸŽ Create awesome and simple iOS style floating indicator which can be found when silent/sleep mode switched on Flutter.

Iosish indicator - ๐ŸŽ Create awesome and simple iOS style floating indicator which can be found when silent/sleep mode switched on Flutter.

Apr 1, 2022

Verify code input. You can create a verify code input.

flutter_verification_code_input A Flutter package that help you create a verification input. Installing flutter_verification_code_input: git:

Dec 7, 2022
Comments
  • Not working with percentage property

    Not working with percentage property

    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.

    Color from Website - image

    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 - image

    Error Message -

    Expected to find ','.
    Too many positional arguments: 1 expected, but 2 found.
    Try removing the extra arguments.
    
    opened by zyllus17 2
  • text-decoration css property don't convert correctly

    text-decoration css property don't convert correctly

    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 )

    opened by mohagali 1
  • can't convert

    can't convert

    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.

    opened by shinriyo 1
  • Color css property don't convert correctly

    Color css property don't convert correctly

    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

    opened by mohagali 0
Releases(v0.1.0)
Owner
Anonymous Namespace
Wir mรผssen wissen, wir werden wissen.
Anonymous Namespace
Neumorphic style - Example app with Flutter that displays a neumorphic style container

Flutter Neumorphic Style Example App Example app with Flutter that displays a ne

Piyush Nagpal 2 Mar 24, 2022
A Flutter widget for rendering HTML and CSS as Flutter widgets

flutter_html A Flutter widget for rendering HTML and CSS as Flutter widgets. Screenshot 1 Screenshot 2 Screenshot 3 Table of Contents: Installing Curr

Vishal Raj 1 Dec 15, 2021
A grid-based layout system for Flutter, inspired by CSS Grid Layout

Flutter Layout Grid A powerful grid layout system for Flutter, optimized for complex user interface design. Click images to see their code โœจ Featuring

Felt 307 Dec 24, 2022
A grid-based layout system for Flutter, inspired by CSS Grid Layout

Flutter Layout Grid A powerful grid layout system for Flutter, optimized for complex user interface design. Click images to see their code โœจ Featuring

Felt 307 Dec 24, 2022
๐Ÿ“ It's a set of common utility strategies to work with responsive styles with Flutter and CSS in JS

@displaykit/responsive_styles You don't need to be worried just because you have to support multiple screens ?? ?? ?? ?? . It's a set of common utilit

DisplayKit Tech 42 Dec 16, 2022
Apply values per media breakpoints. Breakpoints are similar to the breakpoints used in bootstrap css framework.

Apply values per media breakpoints. Breakpoints are similar to the breakpoints used in bootstrap css framework.

Glenford Williams 4 Mar 26, 2021
Advanced & beautiful animations inspired by animate_do and Animate.css, every animation is a widget that contains default but customizable values ๐Ÿ’™

animate_it An animation package inspired by animate_do and Animate.css. Since the original animate_do is not being maintained, I have decided to creat

Luke Moody 3 Oct 1, 2022
A cross-platform flutter package to convert your links into rich beautiful previews.

Link Preview Generator A cross-platform flutter package to convert your links into rich beautiful previews. This package is inspired from Any Link Pre

Pranav Bedre 12 Oct 21, 2022
Convert Json to Form for Flutter apps

Convert Json to Form for Flutter apps. ?? Star and Share ?? the repo to support the project. Thanks! A flutter plugin to use convert Json to Form Exam

Victor Alfonso Rodas Oรฑa 95 Dec 19, 2022
Convert Widget To Image in Flutter

Convert Widget To Image You can transform all of your widgets into images in Flu

Behruz Hurramov 1 Dec 28, 2022