build method

Initialize an AsyncNotifier.

It is safe to use Ref.watch or Ref.listen inside this method.

If a dependency of this AsyncNotifier (when using Ref.watch) changes, then build will be re-executed. On the other hand, the AsyncNotifier will not be recreated. Its instance will be preserved between executions of build.

If this method throws or returns a future that fails, the error will be caught and an AsyncError will be emitted.

Implementation

@override
PaintPalette build() {
  return PaintPalette(
    strokeOptions: StrokeOptions(
      size: 16,
      thinning: 0.7,
      smoothing: 0.5,
      streamline: 0.5,
      start: StrokeEndOptions.start(
        taperEnabled: true,
        customTaper: 0,
        cap: true,
      ),
      end: StrokeEndOptions.end(
        taperEnabled: true,
        customTaper: 0,
        cap: true,
      ),
      simulatePressure: true,
      isComplete: false,
    ),
  );
}