felangel / flow_builder

Flutter Flows made easy! A Flutter package which simplifies navigation flows with a flexible, declarative API.
https://pub.dev/packages/flow_builder
MIT License
395 stars 65 forks source link

feat!: remove controller from builder #2

Closed felangel closed 3 years ago

felangel commented 3 years ago

Status

READY

Breaking Changes

YES

Description

Before

FlowBuilder<Profile>(
  state: const Profile(),
  builder: (context, profile, controller) {
    return [
      ...
    ];
  },
);

After

FlowBuilder<Profile>(
  state: const Profile(),
  builder: (context, profile) {
    return [
      ...
    ];
  },
);

Justification

The controller can be accessed immediately in the builder via context.flow<T>().

Type of Change