Skip to content
pubscout

coast

2.0.2, released 5 years ago by spkersten.nl

PageView wrapper that supports Hero-like animations between pages

WASM-ready
$ flutter pub add coast
Source repository

What it does

Coast acts as a PageView wrapper enabling smooth, Hero-like animations between widgets across different pages (beaches). Using Crab widgets with shared tags, items can morph and transition positions dynamically as users swipe through the view.

AI-written summary of version 2.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a PageView where elements animate smoothly between pages
  • You want Hero-like transition effects without using standard Navigator routes

Skip it when

  • You just need a standard un-animated PageView
  • You need complex navigation routing rather than page-based layouts

Strengths

  • Provides unique Hero-like animations inside a PageView structure
  • Simple API utilizing Coast, Beach, and Crab widgets

Weaknesses

  • Niche functionality limited to page-based transitions
  • Not documented for extensive edge cases beyond basic examples

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
class CoastExampleApp extends StatelessWidget {
  final _beaches = [
    Beach(builder: (context) => Cadzand()),
    Beach(builder: (context) => Westkapelle()),
  ];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Coast(
        beaches: _beaches,
        controller: CoastController(),
        observers: [
          CrabController(),
        ],
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace coast.

  • heroine

    Spring-based physics hero transitions and gesture-driven animations in Flutter.

  • hero_here

    Hero animations on the same page without a Navigator or routes.

  • hue_rotation

    Applies a hue rotation filter to any widget subtree.

  • like_button

    Flutter widget providing Twitter-like heart animation effects for liking and like counts.