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

A Flutter wrapper for the Combain Slam SDK.

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {
  String _lat = "...";
  late FlutterSlamSDK _flutterSlamSDKPlugin;

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


  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Lat is: $_lat\n'),
        ),
      ),
    );
  }

  void initPlatformState() {
    _flutterSlamSDKPlugin = FlutterSlamSDK("4c51791a0cdbd2dc91e1eb5d1371b183b7e95686ce0bc53f2d68c4d61f9d865b");
    _flutterSlamSDKPlugin.addLocationUpdateListener((location) {
      setState(() {
        _lat = location.latitude.toString();
      });
    });
    _flutterSlamSDKPlugin.start();
  }
}
1
likes
0
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter wrapper for the Combain Slam SDK.

Homepage

License

unknown (license)

Dependencies

flutter, flutter_plugin_android_lifecycle, pigeon, plugin_platform_interface

More

Packages that depend on flutter_slam_sdk

Packages that implement flutter_slam_sdk