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

Android ForegroundService for Flutter

example/lib/main.dart

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

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

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        ),
        body: new Center(
          child: new Column(
            children: <Widget>[
              new SizedBox(
                height: 24.0,
              ),
              new RaisedButton(
                onPressed: () => ForegroundService.start(
                      title: 'Valerain',
                      text: 'Background Ground Processing',
                      subText: 'Do not close',
                      ticker: 'Ticker',
                    ),
                child: const Text('Start'),
              ),
              new SizedBox(
                height: 24.0,
              ),
              new RaisedButton(
                color: Colors.orange.shade500,
                onPressed: () => ForegroundService.enableTfLite(),
                child: const Text('Enable Tensorflow'),
              ),
              new SizedBox(
                height: 24.0,
              ),
              new RaisedButton(
                onPressed: () => ForegroundService.stop(),
                child: const Text('Stop'),
              )
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
15
pub points
0%
popularity

Publisher

unverified uploader

Android ForegroundService for Flutter

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, platform

More

Packages that depend on foreground_service_tensorflow_bluetooth