algo360pfm 0.0.2 copy "algo360pfm: ^0.0.2" to clipboard
algo360pfm: ^0.0.2 copied to clipboard

outdated

Algo360 Flutter SDK, is used to extract transactional SMS packet from user’s device, process it and provide an expense tracking dashboard which will help you get an accurate picture of overall expense [...]

example/lib/main.dart

import 'dart:async';
import 'dart:developer';

import 'package:algo360pfm/algo360pfm.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

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

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

class _MyAppState extends State<MyApp> {
  final _algo360pfmPlugin = Algo360pfm();

  @override
  void initState() {
    super.initState();
    invokePermissionsScreen();
    setTheme();
  }

  Future<void> initPlatformState() async {
    String? platformVersion;

    try {
      _algo360pfmPlugin.invokePermissionsScreen("", "", "", "");
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }

    if (!mounted) return;
  }

  Future<void> startPFM() async {
    try {
      _algo360pfmPlugin.invokePFM("UAT");
    } on PlatformException {
      log("exception");
    }

    if (!mounted) return;
  }

  Future<void> invokeSDK() async {
    try {
      _algo360pfmPlugin.invokeSDK(0, '', "", "", "");
    } on PlatformException {
      log("exception");
    }

    if (!mounted) return;
  }

  Future<void> setTheme() async {
    try {
      _algo360pfmPlugin.setTheme("LIGHT");
    } on PlatformException {
      log("exception");
    }

    if (!mounted) return;
  }

  Future<void> invokePermissionsScreen() async {
    try {
      _algo360pfmPlugin.invokePermissionsScreen("", "", "", "");
    } on PlatformException {
      log("exception");
    }

    if (!mounted) return;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text("PFM"),
            MaterialButton(
              onPressed: () {
                startPFM();
              },
              color: Colors.blueAccent,
              child: const Text("Launch"),
            ),
            const Text("SDK"),
            MaterialButton(
              onPressed: () {
                invokeSDK();
              },
              color: Colors.blueAccent,
              child: const Text("Launch"),
            )
          ],
        ),
      )),
    );
  }
}
1
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

Algo360 Flutter SDK, is used to extract transactional SMS packet from user’s device, process it and provide an expense tracking dashboard which will help you get an accurate picture of overall expenses in one single view. No personal SMSs is accessed by the SDK.

Homepage

License

unknown (license)

Dependencies

flutter, permission_handler, plugin_platform_interface

More

Packages that depend on algo360pfm

Packages that implement algo360pfm