ironclad_ml 0.0.3
ironclad_ml: ^0.0.3 copied to clipboard
Advanced security and protection module for the Ironclad SDK.
example/lib/main.dart
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:ironclad_ml/ironclad_ml.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Ironclad ML Example')),
body: Center(
child: ElevatedButton(
onPressed: () async {
final decryptionKey = List<int>.generate(32, (i) => i);
try {
final interpreter = await IroncladML.loadSecureModel('assets/model.tflite.enc', decryptionKey);
print('Interpreter loaded: $interpreter');
} catch (e) {
print('Expected error without asset: $e');
}
},
child: const Text('Load Secure Model'),
),
),
),
);
}
}