Getting Started
Initialize a new EasyCord project or integrate it into an existing application.
Overview
EasyCord embeds a web application inside a native Flutter shell. It provides a bridge between the JavaScript runtime and native device APIs.
Choose the integration path that matches your architecture:
- New Application: Scaffolds a complete Flutter and React/Vue/Svelte/Angular environment.
- Existing Flutter Application: Embeds the EasyCord WebView into an existing Flutter route.
- Remote Web Application: Loads a production URL inside the native shell.
- Local Web Application: Bundles an existing static web export (e.g., Next.js
out/, Vitedist/, Angulardist/) into the native binary.
Example
The fastest way to scaffold a new EasyCord project is using the initialization script.
dart pub global activate easycord_core
easycord init my_easycord_app
cd my_easycord_app
easycord runInstallation Paths
Path 1: New Application
Use the CLI to generate a new project. The CLI configures the native Android/iOS projects, sets up the Flutter dependencies, and scaffolds a web frontend.
dart pub global activate easycord_core
easycord init my_easycord_appPath 2: Existing Flutter Application
Install the Dart package into your existing Flutter repository.
flutter pub add easycordImport the module and mount the EasyCordWebView widget.
import 'package:easycord/easycord.dart';
import 'package:flutter/material.dart';
class WebRoute extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: EasyCordWebView(
initialUrl: 'https://localhost:3000',
),
);
}
}System Requirements
EasyCord relies on standard mobile and web development toolchains. Ensure your environment meets the minimum versions.
| Dependency | Minimum Version | Required For |
|---|---|---|
| Node.js | 18+ | Web development server |
| Flutter | 3.19.0+ | Native compilation |
| Dart | 3.3.0+ | Native compilation |
| Xcode | 15+ | iOS compilation |
| Android SDK | API 24+ | Android compilation |
Cause: Flutter cannot compile Android binaries without accepted licenses.
Solution:
- Run
flutter doctor --android-licensesin your terminal. - Accept all prompts.
- Restart the build process.