Build Flutter apps with Cubit, MVVM-style views, and presenter-driven navigation—while adapting the UI to your app's design language.
README.md

presented_bloc Hello World template #

A small Flutter app that displays Hello, world! and an incrementing counter using presented_bloc. It includes an app cubit and state, one route, a presenter builder, and a view with its own cubit and view model.

Create an app from the template #

Follow Start a new app from the template in the main README. It creates a Flutter project, copies this template into it, renames the package and points the presented_bloc dependency at your clone.

Linux desktop #

The template includes a Linux runner and explicitly selects Material design on Linux. From the template/ directory, install Flutter's Linux desktop dependencies, then run:

fvm flutter pub get
fvm flutter run -d linux

For another existing app without a Linux runner, add one with fvm flutter create --platforms=linux .. Use fvm flutter doctor -v to check the desktop toolchain.

Structure #

lib/
├── barrel.dart               # Single app import (package:hello_world/barrel.dart)
├── main.dart                 # Flutter entry point
├── client.dart               # Starts the app, wires the repositories
├── domain/
│   └── repositories/         # Repository interfaces (HelloWorldRepository)
├── data/
│   └── repositories/         # Implementations (MockHelloWorldRepository)
└── app/
    ├── barrel.dart           # App exports
    ├── builder.dart          # Material/Cupertino presentation chrome
    ├── cubits/               # App-wide cubit, registers the repositories
    ├── models/               # App view model and view type
    ├── route_settings.dart   # Route names and titles
    ├── routes.dart           # Initial route and hello screen route
    ├── states/               # App-wide state
    └── features/hello/
        ├── cubits/           # Hello screen state owner
        ├── models/           # Display-ready hello text
        ├── states/           # Hello screen state
        └── views/            # Shared, Material, and Cupertino views
test/
└── app_test.dart             # Checks the hello screen in both design languages

Application code can import package:hello_world/barrel.dart to access the package API and app modules through one barrel.

The app uses Cupertino on iOS and macOS and Material elsewhere. Fluent, Adwaita, and KDE are not implemented by presented_bloc.