is_firebase_test_lab_activated 2.0.2 copy "is_firebase_test_lab_activated: ^2.0.2" to clipboard
is_firebase_test_lab_activated: ^2.0.2 copied to clipboard

A flutter plugin to know if Firebase Test Lab is activated

example/lib/main.dart

import 'dart:async';

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

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool _isFirebaseTestLabActivated = false;

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  Future<void> initPlatformState() async {
    final bool isFirebaseTestLabActivated =
        await IsFirebaseTestLabActivated.isFirebaseTestLabActivated;

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _isFirebaseTestLabActivated = isFirebaseTestLabActivated;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('IsFirebaseTestLabActivated Plugin'),
        ),
        body: Center(
          child: Text(
              'Is Firebase Test Lab Activated?: $_isFirebaseTestLabActivated\n'),
        ),
      ),
    );
  }
}
6
likes
150
points
225
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plugin to know if Firebase Test Lab is activated

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on is_firebase_test_lab_activated