adb_kit 0.1.0
adb_kit: ^0.1.0 copied to clipboard
A typed Dart wrapper around the Android Debug Bridge (adb). Covers device management, app install, input injection, screencap/screenrecord, logcat streaming, files, intents, dumpsys and scripting.
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:media_kit/media_kit.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'state/providers.dart';
import 'ui/home_shell.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Initialize libmpv for the embedded mirror (used to play scrcpy's
// recorded stream of secondary/virtual displays).
MediaKit.ensureInitialized();
final prefs = await SharedPreferences.getInstance();
runApp(ProviderScope(
overrides: [
sharedPrefsProvider.overrideWithValue(prefs),
],
child: const AdbVisionApp(),
));
}
class AdbVisionApp extends StatelessWidget {
const AdbVisionApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'ADB Vision',
debugShowCheckedModeBanner: false,
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.indigo,
brightness: Brightness.light,
),
darkTheme: ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.indigo,
brightness: Brightness.dark,
),
themeMode: ThemeMode.system,
home: const HomeShell(),
);
}
}