limo_sdk_flutter 1.0.0 copy "limo_sdk_flutter: ^1.0.0" to clipboard
limo_sdk_flutter: ^1.0.0 copied to clipboard

PlatformAndroid

A Flutter plugin for LIMO SDK integration, providing native ad functionality.

LIMO SDK Flutter Plugin #

A Flutter plugin for integrating LIMO SDK's native ad functionality into your Flutter applications.

Features #

  • Native ad integration with LIMO SDK
  • Efficient ad view caching
  • Support for both image and video ads
  • Automatic ad loading and error handling
  • Visibility detection for better performance

Installation #

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

dependencies:
  limo_sdk_flutter:
    git:
      url: https://github.com/yourusername/limo_sdk_flutter.git
      ref: main

Usage #

  1. Initialize the SDK in your app:
import 'package:limo_sdk_flutter/limo_sdk_flutter.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  // Initialize the SDK with your app ID
  final initialized = await LimoSdkFlutter.initSDK('YOUR_APP_ID');
  if (!initialized) {
    print('Failed to initialize LIMO SDK');
    return;
  }
  
  runApp(MyApp());
}
  1. Use the NativeAdWidget in your app:
NativeAdWidget(
  width: MediaQuery.of(context).size.width,
  height: 280,
  adKey: 'unique_ad_key',
  adUnitId: 'YOUR_AD_UNIT_ID',
  onAdLoaded: () {
    print('Ad loaded successfully');
  },
  onAdError: (error) {
    print('Ad failed to load: $error');
  },
)

API Reference #

LimoSdkFlutter #

The main class for SDK initialization and configuration.

Methods

  • initSDK(String appId): Initialize the SDK with your app ID.
  • loadNativeAd({required String spaceId, required double width, required double height}): Load a native ad with specified parameters.

NativeAdWidget #

A widget that displays a native ad.

Properties

  • width (required): The width of the ad widget.
  • height (required): The height of the ad widget.
  • adKey (required): A unique key for this ad instance.
  • adUnitId (required): The ad unit ID for this ad.
  • onAdLoaded (optional): Callback when the ad is loaded successfully.
  • onAdError (optional): Callback when the ad fails to load.

Example #

See the example directory for a complete example of how to use this plugin.

Contributing #

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License #

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

0
likes
155
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for LIMO SDK integration, providing native ad functionality.

Homepage

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

cupertino_icons, flutter, visibility_detector

More

Packages that depend on limo_sdk_flutter

Packages that implement limo_sdk_flutter