sfa_flutter_plugins 0.0.1 copy "sfa_flutter_plugins: ^0.0.1" to clipboard
sfa_flutter_plugins: ^0.0.1 copied to clipboard

outdated

A new Flutter plugin.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:sfa_flutter_plugins/sfa_flutter_plugins.dart';

void main() => runApp(MyApp());

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: <Widget>[
            Container(
              padding: EdgeInsets.all(20),
              child: RaisedButton(
                onPressed: () async {
                  String platformVersion = await SfaFlutterPlugins.getImage(
                      SfaFlutterPlugins.CAMERA_REQUEST);
                  print(platformVersion);
                },
                child: Text(
                  'Camera',
                  style: TextStyle(
                    fontSize: 30,
                    color: Colors.purple,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),
            Container(
              padding: EdgeInsets.all(20),
              child: RaisedButton(
                onPressed: () async {
                  String platformVersion = await SfaFlutterPlugins.getImage(
                      SfaFlutterPlugins.SELECT_PICTURE);
                  print(platformVersion);
                },
                child: Text(
                  'Gallery',
                  style: TextStyle(
                    fontSize: 30,
                    color: Colors.purple,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),
            Container(
              padding: EdgeInsets.all(20),
              child: RaisedButton(
                onPressed: () async {
                  double platformVersion = await SfaFlutterPlugins.getDifferenceBetweenPoints(26.855786239809586,75.77136933803558,26.85570488039463,75.77222764492035);
                  print(platformVersion);
                },
                child: Text(
                  'Difference',
                  style: TextStyle(
                    fontSize: 30,
                    color: Colors.purple,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),
            Container(
              padding: EdgeInsets.all(20),
              child: RaisedButton(
                onPressed: () async {
                  await SfaFlutterPlugins.requestAllPermission();
                  print('done call');
                },
                child: Text(
                  'Request',
                  style: TextStyle(
                    fontSize: 30,
                    color: Colors.purple,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),
            Container(
              padding: EdgeInsets.all(20),
              child: RaisedButton(
                onPressed: () async {
                  await SfaFlutterPlugins.getCurrentLocation;
                  print('done call');
                },
                child: Text(
                  'Location',
                  style: TextStyle(
                    fontSize: 30,
                    color: Colors.purple,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),
            Container(
              padding: EdgeInsets.all(20),
              child: RaisedButton(
                onPressed: () async {
                  await SfaFlutterPlugins.downLoadPdf('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', 'Sfa', 'downloading', 'INVOICE');
                  print('done call');
                },
                child: Text(
                  'Download',
                  style: TextStyle(
                    fontSize: 30,
                    color: Colors.purple,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on sfa_flutter_plugins