iop/packages/flutter/iop_console/lib/src/iop_console_contract.dart

43 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import 'iop_console_shell.dart';
/// Configuration for the IOP Console, providing endpoints and auth references for Control Plane interaction.
class IopConsoleConfig {
final String controlPlaneHttpUrl;
final String controlPlaneWireUrl;
final String? authTokenReference; // auth/token reference
const IopConsoleConfig({
required this.controlPlaneHttpUrl,
required this.controlPlaneWireUrl,
this.authTokenReference,
});
}
/// Theme adapter to customize the appearance of embeddable IOP Console components.
class IopConsoleThemeAdapter {
final Color primaryColor;
final Color backgroundColor;
final Color railBackgroundColor;
final Color borderColor;
final Color textColor;
final Color textSecondaryColor;
const IopConsoleThemeAdapter({
this.primaryColor = const Color(0xFF10B981),
this.backgroundColor = const Color(0xFF0F172A),
this.railBackgroundColor = const Color(0xFF111827),
this.borderColor = const Color(0xFF263043),
this.textColor = Colors.white,
this.textSecondaryColor = Colors.white60,
});
}
/// Navigation contract allowing hosts to listen to section routing changes.
typedef IopConsoleNavigationCallback = void Function(IopConsoleSection section);
class IopConsoleNavigation {
final IopConsoleNavigationCallback? onNavigate;
const IopConsoleNavigation({this.onNavigate});
}