Order Confirmation

Loading preview

Starting the Flutter app

Animated checkmark, order number, delivery estimate

Get the source

Add it to your project

Copies the Dart source into your app, so you own it. Flutter SDK only, no extra packages.

First time? Run dart pub global activate fluttertemplates_dev, or read the CLI guide.

How it works

An AnimationController starts in initState, runs for 600ms and passes through Curves.elasticOut, so the ScaleTransition gives the check icon a springy entrance. SingleTickerProviderStateMixin supplies the vsync, and dispose releases the controller. _estimatedDelivery is five days after the screen opens, formatted by _formatDate. The order number is hardcoded, and Continue Shopping calls onContinueShopping, or shows a demo SnackBar without it.

Adapting it

  • Add constructor parameters to OrderConfirmation for the order id and delivery date, replacing the literal order number and _estimatedDelivery.
  • In onContinueShopping, pop back to your home route so the back button cannot return to checkout.
  • Shorten duration or swap the curve on _scaleAnim to tone the bounce down.