zeba_academy_success_state 0.0.1 copy "zeba_academy_success_state: ^0.0.1" to clipboard
zeba_academy_success_state: ^0.0.1 copied to clipboard

A beautiful and customizable success state widget for Flutter with an animated checkmark.

zeba_academy_success_state #

pub package License: GPL v3 Flutter Dart

A lightweight, customizable, and reusable success state widget for Flutter with a beautifully animated checkmark.

Build polished success screens for payments, registrations, orders, account creation, form submissions, onboarding flows, and more.


โœจ Features #

  • โœ… Animated success checkmark
  • ๐ŸŽจ Customizable checkmark and background colors
  • ๐Ÿ“ Configurable icon size
  • ๐ŸŽฌ Custom animation duration
  • ๐ŸŒ€ Custom animation curves
  • ๐Ÿ“ Customizable title and message
  • ๐Ÿ”˜ Optional action button
  • ๐Ÿงฉ Support for fully custom buttons
  • ๐Ÿ“ฆ Zero external dependencies
  • ๐ŸŒ— Works with light and dark themes
  • โ™ฟ Uses standard Flutter widgets for accessibility
  • ๐Ÿš€ Lightweight and easy to integrate
  • ๐Ÿงช Tested with Flutter widget tests

๐Ÿ“ฆ Installation #

Add zeba_academy_success_state to your pubspec.yaml:

dependencies:
  zeba_academy_success_state: ^0.0.1

Then run:

flutter pub get

๐Ÿš€ Quick Start #

Import the package:

import 'package:zeba_academy_success_state/zeba_academy_success_state.dart';

Use the success state widget:

import 'package:flutter/material.dart';
import 'package:zeba_academy_success_state/zeba_academy_success_state.dart';

class SuccessPage extends StatelessWidget {
  const SuccessPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ZebaSuccessState(
        title: 'Payment Successful!',
        message: 'Your payment has been processed successfully.',
        buttonText: 'Continue',
        onButtonPressed: () {
          Navigator.of(context).pop();
        },
      ),
    );
  }
}

๐ŸŽฏ Basic Usage #

ZebaSuccessState(
  title: 'Success!',
  message: 'Your operation was completed successfully.',
)

The widget automatically provides:

  • Animated checkmark
  • Success title
  • Optional message
  • Theme-aware styling

๐Ÿ”˜ Success State with Action Button #

ZebaSuccessState(
  title: 'Account Created',
  message: 'Your account is ready to use.',
  buttonText: 'Get Started',
  onButtonPressed: () {
    debugPrint('Get Started pressed');
  },
)

๐ŸŽจ Custom Styling #

Customize the success animation and layout:

ZebaSuccessState(
  title: 'Payment Complete',
  message: 'Your transaction was completed successfully.',
  config: const SuccessStateConfig(
    iconSize: 150,
    iconColor: Colors.white,
    backgroundColor: Colors.green,
    animationDuration: Duration(milliseconds: 1200),
    animationCurve: Curves.easeOutBack,
    titleSpacing: 32,
    messageSpacing: 16,
    buttonSpacing: 36,
  ),
)

๐Ÿงฉ Custom Button #

Use any Flutter widget as your action button:

ZebaSuccessState(
  title: 'Changes Saved',
  message: 'Your settings have been updated successfully.',
  button: FilledButton.icon(
    onPressed: () {
      debugPrint('Continue pressed');
    },
    icon: const Icon(Icons.arrow_forward),
    label: const Text('Continue'),
  ),
)

When button is provided, it takes precedence over buttonText.


โœจ Animated Checkmark Only #

If you only need the animated checkmark, use AnimatedCheckmark directly:

AnimatedCheckmark(
  size: 140,
  color: Colors.white,
  backgroundColor: Colors.green,
  duration: const Duration(milliseconds: 1000),
  onComplete: () {
    debugPrint('Animation completed');
  },
)

๐ŸŽฌ Animation Customization #

AnimatedCheckmark(
  size: 120,
  duration: const Duration(milliseconds: 1500),
  curve: Curves.elasticOut,
)

Available Flutter curves include:

Curves.easeIn
Curves.easeOut
Curves.easeInOut
Curves.easeOutBack
Curves.elasticOut
Curves.bounceOut
Curves.fastOutSlowIn

๐ŸŽจ Theme Integration #

The package automatically uses the current Flutter theme when colors are not explicitly provided.

MaterialApp(
  theme: ThemeData(
    colorScheme: ColorScheme.fromSeed(
      seedColor: Colors.green,
    ),
  ),
  home: const SuccessPage(),
)

The checkmark automatically uses:

Theme.of(context).colorScheme.primary

as the background color and:

Theme.of(context).colorScheme.onPrimary

as the checkmark color.


๐Ÿ“‹ API Reference #

ZebaSuccessState #

The main success state widget.

Property Type Default Description
title String Required Main success title
message String? null Optional description
buttonText String? null Optional button label
onButtonPressed VoidCallback? null Button callback
button Widget? null Custom action widget
config SuccessStateConfig Default config Appearance configuration
padding EdgeInsetsGeometry EdgeInsets.all(24) Widget padding
mainAxisAlignment MainAxisAlignment center Vertical alignment
crossAxisAlignment CrossAxisAlignment center Horizontal alignment

AnimatedCheckmark #

A standalone animated success checkmark.

Property Type Default Description
size double 120 Checkmark size
color Color? Theme color Checkmark color
backgroundColor Color? Theme color Circle background
duration Duration 800ms Animation duration
curve Curve Curves.easeOutBack Animation curve
strokeWidth double 6 Checkmark stroke width
onComplete VoidCallback? null Completion callback

SuccessStateConfig #

Configuration for ZebaSuccessState.

Property Type Default
iconSize double 120
iconColor Color? Theme color
backgroundColor Color? Theme color
titleStyle TextStyle? Theme style
messageStyle TextStyle? Theme style
animationDuration Duration 800ms
animationCurve Curve Curves.easeOutBack
titleSpacing double 24
messageSpacing double 12
buttonSpacing double 28

๐Ÿ› ๏ธ Example Use Cases #

This package is useful for:

  • ๐Ÿ’ณ Payment success screens
  • ๐Ÿ›’ Order completion screens
  • ๐Ÿ‘ค Account registration
  • ๐Ÿ“ง Email verification
  • ๐Ÿ” Password reset
  • ๐Ÿ“ Form submission
  • ๐ŸŽ“ Course completion
  • ๐Ÿ“ฆ Delivery confirmation
  • ๐ŸŽ‰ Onboarding completion
  • โš™๏ธ Settings updates
  • ๐Ÿ† Achievement screens

๐Ÿงช Testing #

Run static analysis:

flutter analyze

Run tests:

flutter test

Validate the package before publishing:

flutter pub publish --dry-run

๐Ÿ“ Project Structure #

lib/
โ”œโ”€โ”€ zeba_academy_success_state.dart
โ””โ”€โ”€ src/
    โ”œโ”€โ”€ models/
    โ”‚   โ””โ”€โ”€ success_state_config.dart
    โ”œโ”€โ”€ painters/
    โ”‚   โ””โ”€โ”€ checkmark_painter.dart
    โ””โ”€โ”€ widgets/
        โ”œโ”€โ”€ animated_checkmark.dart
        โ””โ”€โ”€ success_state.dart

๐Ÿ“„ License #

Copyright ยฉ 2026 Sufyan bin Uzayr.

This project is licensed under the GNU General Public License v3.0.

You may use, modify, and distribute this software under the terms of the GPL-3.0 license.

See the LICENSE file for the complete license text.


๐Ÿ‘จโ€๐Ÿ’ป About Me #

โœจ Iโ€™m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

You can learn more about me and my work at:

๐Ÿ‘‰ sufyanism.com

Or connect with me on LinkedIn:

๐Ÿ‘‰ LinkedIn


๐Ÿš€ Your All-in-One Learning Hub #

๐Ÿš€ Explore courses and resources in coding, technology, and development at Zeba Academy.

Empower yourself with practical skills through curated tutorials, real-world projects, and hands-on experience.

๐ŸŒ Explore Zeba Academy #

โžก Main website: zeba.academy

โžก Hands-on courses and resources: code.zeba.academy

โžก YouTube tutorials: zeba.academy

โžก Instagram: zeba.academy


โญ Support the Project #

If you find this package useful:

  • โญ Star the repository
  • ๐Ÿ“ฆ Use it in your Flutter projects
  • ๐Ÿ› Report issues
  • ๐Ÿ’ก Suggest improvements
  • ๐Ÿค Contribute to the project

Every contribution helps improve the Flutter ecosystem.


๐Ÿ™ Thank You #

Thank you for visiting and using zeba_academy_success_state.

Built with โค๏ธ for the Flutter community by Zeba Academy.

0
likes
150
points
0
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A beautiful and customizable success state widget for Flutter with an animated checkmark.

Homepage

Topics

#flutter #success #animation #widget #ui

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on zeba_academy_success_state