Giter Site home page Giter Site logo

youchant / webf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openwebf/webf

0.0 0.0 0.0 170.45 MB

A W3C standard compliant Web rendering engine based on Flutter.

License: Apache License 2.0

Shell 0.01% JavaScript 4.54% Ruby 0.14% C++ 16.15% C 0.09% Objective-C 0.17% Java 0.10% Kotlin 0.01% Dart 26.09% TypeScript 51.21% CSS 0.02% Swift 0.05% HTML 0.20% CMake 1.22%

webf's Introduction

WebF (Web on the Flutter) is a W3C standard compliant Web rendering engine based on Flutter, it can run web application on Flutter natively.

  • W3C Standard Compliant: WebF use HTML/CSS and JavaScript to rendering contents on the flutter. It can achieve 100% consistency with browser rendering.
  • Front-End Framework Support: WebF is W3C standard compliant, so it can be used by many Front-End frameworks, including React, Vue.
  • Expand your Web with Flutter: WebF is fully customizable. You can define a customized HTML element with Flutter Widget and used it in your application. Or add a JavaScript API with any Dart library from pub.dev registry.
  • Web Development Experience: WebF support inspect your HTML structure, CSS style and Debugging JavaScript with Chrome Developer Tools, just like the web development experience of your browser.
  • Write Once, Run AnyWhere: By the power of WebF, You can write your web application and run it on any device flutter supports, and you can still run your apps in Node.js and Web Browser with the same code base.

Version requirement

WebF Flutter
>= 0.12.0 < 0.13.0 3.0.5

How to use

packages.yaml

dependencies:
  webf: <lastest version>

import

import 'package:webf/webf.dart';

Use WebF Widget

@override
Widget build(BuildContext context) {
  final MediaQueryData queryData = MediaQuery.of(context);
  final Size viewportSize = queryData.size;

  return Scaffold(
      body: Center(
    child: Column(
      children: [
        WebF(
          devToolsService: ChromeDevToolsService(), // Enable Chrome DevTools Services
          viewportWidth: viewportSize.width - queryData.padding.horizontal, // Adjust the viewportWidth
          viewportHeight: viewportSize.height - queryData.padding.vertical, // Adjust the viewportHeight
          bundle: WebFBundle.fromUrl('https://andycall.oss-cn-beijing.aliyuncs.com/demo/demo-vue.js'), // The page entry point
        ),
      ],
    ),
  ));
}

How it works

WebF provide a rendering engine which follow the W3C standard like the browser does. It can render HTML/CSS and execute JavaScript. It's built on top of the flutter rendering pipelines and implements its' own layout and paint algorithms.

With WebF, Web Apps and Flutter Apps are sharing the rendering context. It means that you can use Flutter Widgets define your HTML elements and embedded your Web App as a Flutter Widget in your flutter apps.

๐Ÿ‘ Contributing PRs Welcome

By contributing to WebF, you agree that your contributions will be licensed under its Apache-2.0 License.

Read our contributing guide and let's build a better kraken project together.

Thank you to all the people who already contributed to OpenWebF and OpenKraken!

Copyright (c) 2022-present, The OpenWebF authors.

webf's People

Contributors

airingursb avatar andycall avatar anjihang avatar answershuto avatar cnryb avatar devjiangzhou avatar diyism avatar hydra1983 avatar lilong7676 avatar pba-cra avatar qingyangmoke avatar suyulin avatar temper357 avatar whn9527 avatar wssgcg1213 avatar xgheaven avatar xuzhongpeng avatar yifei8 avatar yuanyan avatar zpferyb avatar

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.