Differences from Spring

Spring Boot has no Flutter counterpart, so most of this starter is new: widgets that receive beans, themes from YAML, a splash. Where it does take something from Spring Boot (the configuration files, profiles, @ConfigurationProperties, the lifecycle, DevTools' restart), it keeps Spring's names and behaviour. This page lists where a Flutter app behaves differently from a Spring Boot application, and why.

Why

When you come from Spring, or share code with a Spring server, you need to know which habits carry over. Most differences come from three facts:

Example

The same settings in both. The files are the same; the differences are in who reads what.

# Spring Boot: src/main/resources/application.yml
# Flutter:     lib/resources/application.yml
spring:
  profiles:
    active: dev
shop:
  api-url: https://api.neon.books

Starting the application

Spring Boot Here
SpringApplication.run(App.class, args) in main runApp(SpringApplicationWidget(application: () => springApplication)); the context starts asynchronously behind a splash
@SpringBootApplication on a class @SpringBootApplication() on the main function; the generator writes springApplication
The classpath is scanned at start The generator scans lib/ at build time; run build_runner after you change annotations
A failed start prints a report and exits The report is logged and a failure screen shows; a hot reload that fixes it starts again

Configuration

Beans and widgets

Lifecycle

Hot reload

Design libraries

Exports

Known limits

See also