native_kit_android 0.1.1
native_kit_android: ^0.1.1 copied to clipboard
Android implementation of native_kit using Material 3, Jetpack, ML Kit and system intents via Pigeon.
native_kit_android example #
native_kit_android is the endorsed Android implementation of
native_kit. Apps never import it
directly — add native_kit and this package is included automatically:
dependencies:
native_kit: ^0.1.1
import 'package:native_kit/native_kit.dart';
// Presents a Material 3 BottomSheetDialog with list rows and a drag handle.
final String? choice = await NativeKit.showActionSheet(
context: buttonContext,
items: const [
NativeMenuItem(id: 'share', title: 'Share', androidIcon: 'ic_menu_share'),
NativeMenuItem(id: 'delete', title: 'Delete', style: NativeActionStyle.destructive),
],
);
// Launches the system Photo Picker through the headless result fragment —
// no permission, no MainActivity changes.
final List<PickedMedia> photos = await NativeKit.pickMedia(
type: NativeMediaType.images,
selectionLimit: 5,
);
Set minSdk = 26 in android/app/build.gradle(.kts); a plain
FlutterActivity works.
The full interactive showcase (all components, live theme switching and a UI
Automator end-to-end suite) lives in the
repository's example/ app.