animated
发布时间:2026-09-16 | 浏览:2
A comprehensive, animated quiz widget package for Flutter with navigation, progress tracking, gradient backgrounds, and customizable styling.
Experience smooth animations, gradient backgrounds, auto-navigation, and completion feedback
Features showcased in the demo:
✨ Smooth slide and fade animations between questions
🎨 Beautiful gradient backgrounds with completion state changes
📊 Embedded progress tracking (2/5 format)
🚀 Auto-navigation after answer selection
↩️ Back button functionality
🎉 Green gradient completion feedback
🎯 Multiple Choice Questions - Support for dynamic question and answer lists
🧭 Smart Navigation - Navigate between questions with embedded controls
📊 Progress Tracking - Visual progress indicator showing current question (e.g., 2/10)
🚀 Auto-Navigation - Automatic progression after answer selection with customizable delay
🔒 Answer Validation - Require answers before allowing progression
↩️ Flexible Navigation - Always allow going back to edit previous answers
📐 Consistent Height - Maintains consistent widget height throughout the quiz
🎨 Gradient Backgrounds - Beautiful gradient backgrounds with completion state changes
🎉 Completion Feedback - Green gradient background when quiz is completed
✨ Smooth Animations - Elegant slide and fade animations with fixed container
🎯 Rounded Ripples - Properly clipped ripple effects for radio buttons
📱 Mobile Optimized - Responsive design with proper overflow handling
Add this to your package's pubspec.yaml file:
Custom Configuration with Gradients
Question Model Properties
Configuration Options
Navigation Behavior
Embedded Controls : Progress indicator and back button are embedded within the quiz widget
Auto-Navigation : Automatically moves to next question after answer selection (configurable delay)
Forward Navigation : Only allowed if current question is answered (when requireAnswerToProgress is true)
Backward Navigation : Always allowed via embedded back button (when allowBackwardNavigation is true)
Progress Indicator : Shows current position (e.g., "2/10") in the top-left corner
Quiz Completion : Background changes to green gradient and triggers onQuizCompleted callback
Visual Features
Gradient Backgrounds
Default State : Beautiful blue gradient background
Completion State : Automatically changes to green gradient when last question is answered
Customizable : Provide your own gradient colors via gradientColors property
Fixed Container : The outer container stays fixed while content animates
Smooth Transitions : Slide and fade animations between questions
Rounded Ripples : Properly clipped ripple effects on radio button interactions
Content Alignment : Left-aligned content for better readability
onAnswerChanged
Called whenever a user selects an answer:
onQuizCompleted
Called when the quiz is completed (last question answered):
Styling Examples
Dark Theme with Custom Gradient
Light Theme (Solid Color)
Widget Architecture
Check out the example/ directory for a complete working example that demonstrates:
Multiple question types
Custom styling and gradients
Answer handling and results display
Responsive design patterns
To run the example:
Flutter SDK: >=3.0.0
Dart SDK: ^3.4.0
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
If you like this package, please give it a ⭐ on GitHub and a 👍 on pub.dev !
For issues and feature requests, please use the GitHub issue tracker .
animated_quiz_widget package
animated_text_column
models/quiz_models
widgets/quiz_widget