appsonair_flutter_sdk 0.2.2 copy "appsonair_flutter_sdk: ^0.2.2" to clipboard
appsonair_flutter_sdk: ^0.2.2 copied to clipboard

AppsOnAir flutter sdk enables you to configure the version update of your app directly through AppsOnAir.

example/lib/example.dart

import 'package:appsonair_flutter_sdk/apps_on_air_service.dart';
import 'package:flutter/material.dart';

void main() async {
  AppsOnAir.setAppId('*********-e640-477c-aa48-***********',
      showNativeUI: true);
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: const DemoAppp(),
      ),
    );
  }
}

class DemoAppp extends StatefulWidget {
  const DemoAppp({super.key});

  @override
  State<DemoAppp> createState() => _DemoApppState();
}

class _DemoApppState extends State<DemoAppp> {
  @override
  void initState() {
    AppsOnAir.checkForAppUpdate(
      context,

      ///use customWidget only if you want to use Your custom ui,
      ///make sure to pass false in param [showNativeUI]
      customWidget: (response) {
        return Column(children: [
          Text("Application Name : ${response["appName"]}"),
          Text(
            "Application Version : ${response["updateData"]["androidBuildNumber"]}",
          ),
          MaterialButton(
            onPressed: () {},
          )
        ]);
      },
    );
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(),
    );
  }
}
7
likes
150
points
18
downloads

Publisher

verified publisherappsonair.com

Weekly Downloads

AppsOnAir flutter sdk enables you to configure the version update of your app directly through AppsOnAir.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on appsonair_flutter_sdk

Packages that implement appsonair_flutter_sdk