darktooth 0.0.1 darktooth: ^0.0.1 copied to clipboard
A new flutter plugin project.
example/lib/main.dart
// Copyright 2018 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'permissions.dart';
import 'package:flutter/material.dart';
import 'package:darktooth/darktooth.dart';
void main() async {
runApp(MyApp());
await PermissionService().requestBluetoothPermission();
// await PermissionService().requestBatteryOptPermission();
await Darktooth.startBluetoothForegroundService;
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Welcome to Flutter',
home: Scaffold(
appBar: AppBar(
title: Text('Welcome to Flutter'),
),
body: Center(
child: Text('Hello World'),
),
),
);
}
}