Skip to content

๐Ÿš— Animated vehicle widgets for Flutter - ambulances, police cars, tractors, school buses and more with realistic effects. Good for traffic games and simulations.

License

Notifications You must be signed in to change notification settings

rudi-q/tuesdae_assets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš— Tuesdae Assets

Accessible animated vehicle widgets for Flutter

pub package License

Perfect for traffic games, simulations, and educational apps. Designed with accessibility in mind - providing clear visual feedback, predictable animations, and high contrast elements for better focus.

โœจ Features

  • 6 Vehicle Types: Cars, ambulances, police, tractors, school buses, and more
  • Realistic Animations: Flashing emergency lights, exhaust smoke, stop signs
  • Accessible Design: High contrast, clear visuals, predictable behaviors
  • Highly Customizable: Colors, sizes, directions, effects
  • Performance Optimized: Smooth 60fps animations
  • Zero Dependencies: Uses only Flutter's built-in capabilities

๐Ÿš‘ Vehicle Types

Vehicle Features Use Cases
Regular Car Standard passenger vehicle Traffic simulations, games
Ambulance Flashing red/blue lights, medical cross Emergency scenarios
Police Car Flashing lights, badge, "POLICE" text Law enforcement games
Tractor Treads, exhaust smoke, "SLOW" warning Agricultural/construction sims
School Bus Stop sign, safety lights, "SCHOOL BUS" text Education, safety apps
Impatient Car Same as regular but configurable attitude Traffic behavior modeling

๐ŸŽฎ Quick Start

flutter pub add tuesdae_assets

OR

Add to your pubspec.yaml:

dependencies:
  tuesdae_assets: ^1.0.1

Basic Usage

import 'package:tuesdae_assets/tuesdae_assets.dart';

// Simple ambulance
TuesdaeVehicle.ambulance()

// Custom police car
TuesdaeVehicle(
  type: VehicleType.police,
  config: VehicleConfig(
    primaryColor: Colors.blue,
    size: 30.0,
    direction: VehicleDirection.east,
    isFlashing: true,
  ),
)

// Using presets
TuesdaeVehicle.preset(
  type: VehicleType.tractor,
  config: VehiclePresets.farmTractor,
)

Interactive Example

TuesdaeVehicle.schoolBus(
  config: VehiclePresets.safetyBus.copyWith(
    isFlashing: true,
    direction: VehicleDirection.north,
  ),
  onTap: () => print('School bus tapped!'),
)

๐ŸŽจ Customization

Vehicle Configuration

VehicleConfig(
  primaryColor: Colors.red,        // Vehicle body color
  size: 25.0,                      // Base size (proportional scaling)
  direction: VehicleDirection.east, // Facing direction
  isFlashing: true,                // Emergency lights on/off
  isCrashed: false,                // Show crash effects
  showEffects: true,               // Enable special effects
  animationSpeed: 1.5,             // Speed multiplier for animations
)

Preset Configurations

// Ready-to-use presets for common scenarios
VehiclePresets.standardCar        // Blue car, normal size
VehiclePresets.emergencyAmbulance // White ambulance, flashing
VehiclePresets.activePolice       // Police car with lights
VehiclePresets.farmTractor        // Green tractor with smoke
VehiclePresets.safetyBus          // Yellow school bus
VehiclePresets.crashedCar         // Red car with crash effects

๐Ÿง  Accessible Design

This package was designed with accessibility and focus in mind:

  • Immediate Visual Feedback: Every interaction has instant visual response
  • High Contrast Elements: Important features stand out clearly
  • Predictable Animations: Consistent, non-distracting movement patterns
  • Clear Purpose: Each vehicle type has distinct, logical behaviors
  • Sensory Considerations: Calming colors, optional effects

๐Ÿ“ฑ Platform Support

  • โœ… Android
  • โœ… iOS
  • โœ… Web
  • โœ… Windows
  • โœ… macOS
  • โœ… Linux

๐Ÿ”ง Advanced Usage

Animation Control

class MyVehicleWidget extends StatefulWidget {
  @override
  _MyVehicleWidgetState createState() => _MyVehicleWidgetState();
}

class _MyVehicleWidgetState extends State<MyVehicleWidget> {
  bool _isEmergency = false;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        TuesdaeVehicle(
          type: VehicleType.ambulance,
          config: VehicleConfig(
            primaryColor: Colors.white,
            size: 30.0,
            isFlashing: _isEmergency,
            direction: VehicleDirection.north,
          ),
        ),
        ElevatedButton(
          onPressed: () => setState(() => _isEmergency = !_isEmergency),
          child: Text(_isEmergency ? 'Turn Off Siren' : 'Emergency Mode'),
        ),
      ],
    );
  }
}

Traffic Simulation

class TrafficIntersection extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        // North-bound traffic
        Positioned(
          top: 50,
          left: 200,
          child: TuesdaeVehicle.preset(
            type: VehicleType.regular,
            config: VehiclePresets.standardCar.copyWith(
              direction: VehicleDirection.south,
            ),
          ),
        ),
        
        // Emergency vehicle
        Positioned(
          top: 100,
          left: 150,
          child: TuesdaeVehicle.ambulance(
            config: VehiclePresets.emergencyAmbulance.copyWith(
              direction: VehicleDirection.east,
              isFlashing: true,
            ),
          ),
        ),
        
        // School zone
        Positioned(
          top: 200,
          left: 100,
          child: TuesdaeVehicle.schoolBus(),
        ),
      ],
    );
  }
}

๐ŸŽฏ Perfect For

  • Traffic Management Games (like Tuesdae Rush!)
  • Educational Apps (teaching traffic safety)
  • City Simulation Games
  • Emergency Response Training
  • Kids' Transportation Apps
  • Accessible Learning Tools

๐Ÿค Contributing

We love contributions! Please feel free to:

  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest new features
  • ๐Ÿš— Add new vehicle types
  • ๐Ÿ“š Improve documentation
  • ๐ŸŽจ Enhance animations

๐Ÿ“„ License

MIT License - feel free to use in your projects!

๐ŸŒŸ Related Projects

  • Tuesdae Rush - The original accessible traffic game
  • Built with โค๏ธ for everyone

Tuesdae Assets - Flutter vehicle widgets

About

๐Ÿš— Animated vehicle widgets for Flutter - ambulances, police cars, tractors, school buses and more with realistic effects. Good for traffic games and simulations.

Topics

Resources

License

Stars

Watchers

Forks