Skip to content

Commit

Permalink
feat: update example app
Browse files Browse the repository at this point in the history
  • Loading branch information
yardexx committed Oct 18, 2024
1 parent 7fee0a9 commit ddb3496
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ Future<void> _initializeTalsec() async {
packageName: 'com.aheaditec.freeraspExample',
signingCertHashes: ['AKoRuyLMM91E7lX/Zqp3u4jMmd0A7hH/Iqozu0TMVd0='],
supportedStores: ['com.sec.android.app.samsungapps'],
blocklistedPackageNames: ['com.aheaditec.freeraspExample'],
malwareConfig: MalwareConfig(
blocklistedPackageNames: ['com.aheaditec.freeraspExample'],
blocklistedPermissions: [
['android.permission.CAMERA'],
['android.permission.READ_SMS', 'android.permission.READ_CONTACTS']
],
),
),
iosConfig: IOSConfig(
bundleIds: ['com.aheaditec.freeraspExample'],
Expand Down
9 changes: 8 additions & 1 deletion example/lib/widgets/malware_bottom_sheet.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:freerasp/freerasp.dart';

Expand Down Expand Up @@ -42,20 +44,25 @@ class MalwareBottomSheet extends StatelessWidget {
}
}

/// List tile widget that displays malware information
class MalwareListTile extends StatelessWidget {
/// Represents malware information in the example app
const MalwareListTile({
super.key,
required this.malware,
});

/// Malware information
final SuspiciousAppInfo malware;

@override
Widget build(BuildContext context) {
return ListTile(
title: Text(malware.packageInfo.packageName),
subtitle: Text('Reason: ${malware.reason}'),
leading: const Icon(Icons.warning, color: Colors.red),
leading: malware.packageInfo.appIcon == null
? const Icon(Icons.warning, color: Colors.red)
: Image.memory(base64.decode(malware.packageInfo.appIcon!)),
);
}
}

0 comments on commit ddb3496

Please sign in to comment.