A powerful SDK that enables seamless communication between your web application and Flutter native apps. Access native features like push notifications, secure storage, and device capabilities from JavaScript.
npm install @aisahub/app-builder-sdkimport AppBridge from '@aisahub/app-builder-sdk';
if (AppBridge.isInApp()) {
console.log('Running in app environment');
// Use native features
} else {
console.log('Running in browser');
// Use web alternatives
}All SDK methods return a Promise with a standardized Result<T> structure:
interface Result<T> {
success: boolean; // Operation status
error?: string; // Error message if failed
data?: T; // Response data if successful
}// All methods return Promises with Result structure
async function setupNotifications() {
try {
const result = await AppBridge.generateFcmToken();
if (result.success && result.data) {
console.log('FCM Token:', result.data.token);
// Send to your backend
await saveToBackend(result.data.token);
}
} catch (error) {
console.error('Error:', error.error);
}
}Generate FCM tokens and manage push notification subscriptions seamlessly.
Store sensitive data with encrypted native storage on the device.
Access device model, OS version, and platform information.
Open native share dialogs to share content across apps.
Request permissions and get current location coordinates.
Full TypeScript definitions for better development experience.
const result = await AppBridge.method();Modern async/await syntax with standardized Result structure
Result<T> with full type safetyComplete TypeScript definitions for better DX
useAppBridge(), useSecureStorage()Pre-built hooks for seamless React integration