callvalidator 2.0.5 copy "callvalidator: ^2.0.5" to clipboard
callvalidator: ^2.0.5 copied to clipboard

CallValidator enhances Flutter code quality by validating function calls, ensuring parameter correctness and function existence. Integrate to minimize runtime errors and enhance app reliability.

callvalidator #

CallValidator is a Flutter Dart plugin designed to enhance code quality by validating function calls and returning a boolean value indicating their validity. With CallValidator, developers can easily check the correctness of function invocations within their Flutter applications. Whether it's ensuring the proper parameters are passed or verifying the function's existence, CallValidator offers a seamless solution for error prevention and code validation. By integrating CallValidator into your project, you can enhance your development workflow and minimize potential runtime errors, resulting in more robust and reliable Flutter applications.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Callvalidator Package #

The Callvalidator package provides a simple interface to check the platform version and determine if there is an active call on the device. This package is implemented using the Singleton pattern to ensure a single instance is used throughout the application.

Installation #

Add the following dependency to your pubspec.yaml file:

dependencies:
  callvalidator: ^1.0.0
import 'package:callvalidator/callvalidator.dart';
void main() async {
  // Access the singleton instance
  Callvalidator callValidator = Callvalidator.instance;

  // Get the platform version
  String? platformVersion = await callValidator.getPlatformVersion();
  print('Platform Version: $platformVersion');

  // Check for active call
  bool? isActiveCall = await callValidator.checkForActiveCall();
  print('Is there an active call? $isActiveCall');
}


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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Callvalidator Example'),
        ),
        body: Center(
          child: FutureBuilder(
            future: _checkForCall(),
            builder: (context, snapshot) {
              if (snapshot.connectionState == ConnectionState.waiting) {
                return CircularProgressIndicator();
              } else if (snapshot.hasError) {
                return Text('Error: ${snapshot.error}');
              } else {
                return Text('Is there an active call? ${snapshot.data}');
              }
            },
          ),
        ),
      ),
    );
  }

  Future<bool?> _checkForCall() async {
    Callvalidator callValidator = Callvalidator.instance;
    return await callValidator.checkForActiveCall();
  }
}
6
likes
140
points
64
downloads

Publisher

unverified uploader

Weekly Downloads

CallValidator enhances Flutter code quality by validating function calls, ensuring parameter correctness and function existence. Integrate to minimize runtime errors and enhance app reliability.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on callvalidator