Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/flutter-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: 🐦 Setup Flutter
uses: subosito/[email protected]
Expand All @@ -84,13 +84,19 @@ jobs:
working-directory: example
run: flutter build apk --release

- name: 📤 Upload APK
uses: actions/upload-artifact@v6
with:
name: app-demo
path: example/build/app/outputs/flutter-apk/app-release.apk

build-ios:
runs-on: macos-latest
needs: test

steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: 🐦 Setup Flutter
uses: subosito/[email protected]
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ build/
example/pubspec.lock

# FVM Version Cache
.fvm/
.fvm/

# AI stuff
.gemini/
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [7.3.1] - 2025-10-20
- Android SDK version: 17.0.0
- iOS SDK version: 6.13.0

### Flutter

#### Changed
- Updated example application

## [7.3.0] - 2025-10-20
- Android SDK version: 17.0.0
- iOS SDK version: 6.13.0
Expand Down
6 changes: 5 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
include: package:very_good_analysis/analysis_options.yaml

linter:
rules:
public_member_api_docs: false

analyzer:
errors:
document_ignores: false
exclude:
- '**/*.g.dart'
- '**/*.g.dart'
44 changes: 35 additions & 9 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
# freerasp_example
# freeRASP Example App

Demonstrates how to use the freerasp plugin.
This example application demonstrates how to use the freeRASP plugin to protect your Flutter
application from various security threats.

## Getting Started

This project is a starting point for a Flutter application.
### Prerequisites

A few resources to get you started if this is your first Flutter project:
- Flutter SDK (>=3.0.0)
- Dart SDK (>=3.0.0)

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
### Setup

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
1. Clone the repository and navigate to the example directory:
```bash
cd example
```

2. Install dependencies:
```bash
flutter pub get
```

3. Run the app:
```bash
flutter run
```

## Architecture

The app uses:

- **freeRASP** for security monitoring
- **Riverpod** for state management
- **Material Design 3** with dynamic color theming

## Resources

- [freeRASP Documentation](https://github.com/talsec/freerasp)
- [Flutter Documentation](https://flutter.dev/docs)
- [Riverpod Documentation](https://riverpod.dev)
6 changes: 6 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
include: package:very_good_analysis/analysis_options.yaml

linter:
rules:
public_member_api_docs: false

analyzer:
exclude:
- '**/*.g.dart'
errors:
document_ignores: false
6 changes: 3 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (flutterVersionName == null) {
}

android {
namespace 'com.aheaditec.freerasp_example'
namespace 'app.talsec.demo.freerasp'
compileSdkVersion 35
ndkVersion = "27.1.12297006"

Expand All @@ -42,9 +42,9 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.aheaditec.freerasp_example"
applicationId "app.talsec.demo.freerasp"
// Talsec library needs higher version than default (16)
minSdkVersion 23
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.aheaditec.freerasp_example">
package="app.talsec.demo.freerasp">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.aheaditec.freerasp_example">
package="app.talsec.demo.freerasp">

<!-- These permissions are needed if want to detect screen capturing and recording. -->
<uses-permission android:name="android.permission.DETECT_SCREEN_CAPTURE" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.aheaditec.freerasp_example
package app.talsec.demo.freerasp

import io.flutter.embedding.android.FlutterActivity

Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.aheaditec.freerasp_example">
package="app.talsec.demo.freerasp">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
31 changes: 31 additions & 0 deletions example/lib/app/app.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// ignore_for_file: public_member_api_docs
import 'package:dynamic_color/dynamic_color.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:freerasp_example/screens/security_screen.dart';
import 'package:freerasp_example/theme/app_theme.dart';

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return ProviderScope(
child: DynamicColorBuilder(
builder: (lightDynamic, darkDynamic) {
final lightScheme =
AppTheme.getScheme(lightDynamic, Brightness.light);
final darkScheme = AppTheme.getScheme(darkDynamic, Brightness.dark);

return MaterialApp(
restorationScopeId: 'root',
title: 'My Secure App',
theme: AppTheme.create(lightScheme),
darkTheme: AppTheme.create(darkScheme),
home: const SecurityScreen(),
);
},
),
);
}
}
27 changes: 27 additions & 0 deletions example/lib/config/talsec_config.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import 'package:freerasp/freerasp.dart';

/// Creates and returns the Talsec configuration for the example app.
///
/// This configuration is used to initialize Talsec with Android and iOS
/// settings.
TalsecConfig createTalsecConfig() {
return TalsecConfig(
androidConfig: AndroidConfig(
packageName: 'app.talsec.freerasp.app',
signingCertHashes: ['AKoRuyLMM91E7lX/Zqp3u4jMmd0A7hH/Iqozu0TMVd0='],
supportedStores: ['com.sec.android.app.samsungapps'],
malwareConfig: MalwareConfig(
blacklistedPackageNames: ['com.google.android.youtube'],
suspiciousPermissions: [
['android.permission.CAMERA'],
['android.permission.READ_SMS', 'android.permission.READ_CONTACTS'],
],
),
),
iosConfig: IOSConfig(
bundleIds: ['com.aheaditec.freeraspExample'],
teamId: 'M8AK35...',
),
watcherMail: '[email protected]',
);
}
17 changes: 0 additions & 17 deletions example/lib/extensions.dart

This file was deleted.

Loading
Loading