My Cus Pug You

A Flutter plugin for intelligent device-adaptive content display with splash screen functionality.

Features

  • Smart Splash Screen: Displays an intelligent splash screen that initializes device adaptation
  • Device Intelligence: Automatically collects device information (model, OS version, build version, language, region)
  • Server-Side Adaptation: Compares device data with server-maintained configurations for optimal content delivery
  • Adaptive Display: Dynamically adjusts screen content and layout for the best user experience on each device
  • Content Optimization: Ensures optimal content rendering based on device capabilities and specifications
  • Push Notifications: Built-in support for push notifications with proper handling
  • Cross-Platform: Supports both iOS and Android platforms

How It Works

  1. Initialization: The plugin collects comprehensive device information
  2. Server Communication: Device data is sent to your server for analysis
  3. Adaptive Response: Server returns optimized configuration based on device capabilities
  4. Content Rendering: Plugin renders content optimized for the specific device
  5. Enhanced Experience: Users get the best possible experience tailored to their device

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  my_cus_pug_you: ^0.0.1

Usage

Basic Setup

import 'package:my_cus_pug_you/my_cus_pug_you.dart';

// Initialize the plugin with your API credentials
await MyCusPugYou.initialize(
  apiKey: 'your_api_key',
  apiUrl: 'your_encoded_api_url',
);

// Initialize smart adaptation
await MyCusPugYou.greyInit(
  goToGame: () {
    // Navigate to your main app content
    Navigator.pushNamed(context, '/home');
  },
  context: context,
);

Display Adaptive Screen

import 'package:my_cus_pug_you/my_cus_pug_you.dart';

class AdaptiveScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GreyScreen(), // Displays optimized content
    );
  }
}

Configuration

The plugin automatically handles:

  • Device model detection
  • Operating system version
  • Build version information
  • Language and region settings
  • Screen orientation adaptation
  • Network connectivity optimization

Server Integration

Your server should be prepared to:

  1. Receive device information via query parameters
  2. Analyze device capabilities
  3. Return optimized content configuration
  4. Handle push notification tokens

Platform Support

  • ✅ iOS
  • ✅ Android (coming soon)

Example

See the example/ directory for a complete implementation showing:

  • Splash screen with initialization
  • Navigation setup with go_router
  • Adaptive content display
  • Error handling

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.