blemulator 1.0.0-dev.6 copy "blemulator: ^1.0.0-dev.6" to clipboard
blemulator: ^1.0.0-dev.6 copied to clipboard

outdated

Flutter plugin for simulating BLE peripherals on FlutterBleLib

example/lib/main.dart

import 'package:blemulator_example/navigation/bloc.dart';
import 'package:blemulator_example/navigation/route_name.dart';
import 'package:blemulator_example/navigation/router.dart';
import 'package:blemulator_example/styles/custom_colors.dart';
import 'package:fimber/fimber.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

void main() {
  Fimber.plantTree(DebugTree());
  runApp(MyApp());
}

final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();

class MyApp extends StatelessWidget {
  final GlobalKey<NavigatorState> _navigatorKey = GlobalKey();

  @override
  Widget build(BuildContext context) {
    return BlocProvider<NavigationBloc>(
      builder: (context) => NavigationBloc(navigatorKey: _navigatorKey),
      child: MaterialApp(
        navigatorKey: _navigatorKey,
        title: 'FlutterBleLib example',
        theme: ThemeData(
          primaryColor: CustomColors.primary,
          accentColor: CustomColors.accent,
          scaffoldBackgroundColor: CustomColors.scaffoldBackground,
        ),
        initialRoute: RouteName.home,
        onGenerateRoute: (settings) => Router.generateRoute(settings),
      ),
    );
  }
}
16
likes
0
pub points
7%
popularity

Publisher

verified publisherpolidea.com

Flutter plugin for simulating BLE peripherals on FlutterBleLib

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_ble_lib

More

Packages that depend on blemulator