Installing

Installing WebApp Package dart

Installing WebApp Package

Install WebApp Package

To add webapp as a dependency in your project, follow these steps:

With Dart:

dart pub add webapp

With Flutter:

flutter pub add webapp

This will automatically add the webapp package to your pubspec.yaml file:

dependencies:
  webapp: ^2.0.1

Install WebApp CLI

The WebApp CLI provides powerful tools to help you manage your WebApp projects:

dart pub global activate webapp
webapp --version

Using WebApp CLI

The WebApp CLI offers several useful commands:

webapp --help                    # Show help
webapp create --name example     # Create new project
webapp get                       # Get all packages from pub.dev (dart pub get)
webapp runner                    # Build all models (dart pub run build_runner build)
webapp run                       # Run project

Import WebApp

Once the package is added, you can import it into your Dart or Flutter code:

import 'package:webapp/wa_console.dart';
import 'package:webapp/wa_mail.dart';
import 'package:webapp/wa_model.dart';
import 'package:webapp/wa_model_less.dart';
import 'package:webapp/wa_route.dart';
import 'package:webapp/wa_server.dart';
import 'package:webapp/wa_tools.dart';
import 'package:webapp/wa_ui.dart';
import 'package:webapp/wa_mysql.dart';  // For MySQL support

Quick Start

After installation, you can quickly set up a basic WebApp server. Check out the Example Server Setup section for a complete example.

With these imports, you'll have access to all the powerful features that the webapp package offers.


This document should provide you with a comprehensive guide to getting started with the webapp package. Happy coding!