flutter_ra_availability 1.0.1-arcore-client copy "flutter_ra_availability: ^1.0.1-arcore-client" to clipboard
flutter_ra_availability: ^1.0.1-arcore-client copied to clipboard

outdated

Plugin to check if AR is available on android and ios devices.

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_ra_availability/flutter_ra_availability.dart';

void main() {
  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  bool? _isSupported;

  Future<void> checkPlataformState() async {
    bool? isSupported = await RaAvailability.isSupported;

    setState(() {
      _isSupported = isSupported;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('RA Availability example'),
        ),
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text(
              'Click at the button bellow to check if device support AR.',
              textAlign: TextAlign.center,
              style: TextStyle(
                  fontSize: 16,
                  color: Colors.blue,
                  fontWeight: FontWeight.w800),
            ),
            ElevatedButton(
              onPressed: checkPlataformState,
              child: const Text("Check"),
            ),
            _isSupported != null
                ? Text(
                    _isSupported.toString(),
                    style: const TextStyle(
                      fontSize: 32,
                    ),
                  )
                : const SizedBox(),
          ],
        ),
      ),
    );
  }
}
3
likes
0
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

Plugin to check if AR is available on android and ios devices.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_ra_availability

Packages that implement flutter_ra_availability