gregertw /
actingweb_firstapp
Starter app for Flutter that includes many different production app features; some not typically included in demo apps.
Loading repository data…
aliakbark / repository
A demo app to try Server-Driven UI (SDUI) in Flutter using a clean, minimal project structure with Cubit and custom widget parsers.
A Flutter application demonstrating server-driven UI capabilities with clean architecture. This app showcases both traditional Flutter UI and dynamic SDUI workflows, allowing UI components to be configured and updated from server responses without app releases.
Ensure you have Flutter installed and configured:
# Ensure Flutter is on stable channel
flutter channel stable
flutter upgrade
# Verify Flutter version (>=3.35.0 required)
flutter --version
flutter doctor
Required versions:
# Clone the repository
git clone https://github.com/aliakbark/flutter_sdui_app.git
cd flutter_sdui_app
# Install dependencies
flutter pub get
# Generate code (for JSON serialization)
dart run build_runner build
# Run the app
flutter run
Interactive AI-powered documentation available at: https://deepwiki.com/aliakbark/flutter_sdui_app
DeepWiki is an AI-powered platform by Cognition that provides:
Perfect for anyone trying to understand or navigate this project - you can ask DeepWiki specific questions about the implementation, architecture decisions, or how different components work together.
This app follows Clean Architecture principles with feature-based organization:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Presentation │ │ Domain │ │ Data │
│ │ │ │ │ │
│ • Pages/Widgets │◄──►│ • Repositories │◄──►│ • Data Sources │
│ • BLoC/Cubit │ │ • Use Cases │ │ • Models │
│ • States │ │ • Entities │ │ • API Clients │
└─────────────────┘ └─────────────────┘ └─────────────────┘
Core Principles:
lib/
├── core/ # Shared core functionality
│ ├── constants/ # App constants and asset paths
│ ├── di/ # Dependency injection setup
│ ├── enums/ # Shared enumerations
│ ├── errors/ # Error handling and exceptions
│ ├── network/ # API client and endpoints
│ └── shared/ # Shared components
│ ├── data/ # Base repositories and data sources
│ ├── presentation/ # Shared widgets and pages
│ ├── services/ # Core services (language, network, etc.)
│ └── states/ # App-level state management
├── features/ # Feature modules
│ ├── auth/ # Authentication feature
│ │ ├── data/ # Auth data layer
│ │ ├── domain/ # Auth business logic
│ │ └── presentation/ # Auth UI components
│ ├── onboarding/ # Traditional onboarding flow
│ │ ├── data/ # Onboarding data layer
│ │ ├── domain/ # Onboarding business logic
│ │ └── presentation/ # Onboarding UI components
│ ├── home/ # Main app screen
│ └── sdui/ # SDUI-specific implementations
│ ├── core/ # SDUI workflow registry
│ ├── services/ # SDUI-related services
│ └── workflows/ # Specific workflow implementations
├── l10n/ # Internationalization files
└── packages/ # Local packages
└── sdui/ # SDUI core package
Current Demo Setup:
assets/json/dynamic_ui_config.jsonProduction Scenario:
// Fetch configuration from API
final response = await apiClient.get('/api/sdui/config');
final config = SduiConfig.fromJson(response.data);
await SduiService.initialize(config: config);
Flexible Initialization Options:
// From asset
await SduiService.initialize(assetPath: 'assets/config.json');
// From network
await SduiService.initialize(networkUrl: 'https://api.example.com/config');
// Direct config object
await SduiService.initialize(config: configObject);
1. Create Workflow Class
// lib/features/sdui/workflows/my_workflow/my_workflow.dart
class MyWorkflow {
static const String id = 'my_workflow';
static void registerCapabilities() {
SduiService.registerCapabilities([
MyCustomCapability(),
AnotherCapability(),
]);
}
}
2. Create Custom Capabilities
class MyCustomCapability extends SduiCapability {
@override
String get name => 'my_custom_action';
@override
Future<SduiCapabilityResult> execute(Map<String, dynamic> params) async {
try {
// Integrate with existing app services
final result = await sl<MyService>().performAction(params);
return SduiCapabilityResult.success('Action completed');
} catch (e) {
return SduiCapabilityResult.failure('Action failed: $e');
}
}
}
3. Register in Workflow Registry
// lib/features/sdui/core/sdui_workflow_registry.dart
static final Map<String, Function> _workflowCapabilities = {
OnboardingWorkflow.id: OnboardingWorkflow.registerCapabilities,
MyWorkflow.id: MyWorkflow.registerCapabilities, // Add this line
};
4. Add to JSON Configuration
{
"workflows": [
{
"id": "my_workflow",
"start_screen": "welcome_screen",
"screens": [
{
"id": "welcome_screen",
"widgets": [
{
"type": "button",
"action": {
"type": "capability.invoke",
"capability": "my_custom_action"
}
}
]
}
]
}
]
}
The SDUIWorkflowRegistry automatically:
core/di/injector.dartSduiCapabilityResult# Run all tests
flutter test
# Run tests with coverage
flutter test --coverage
# Run specific test file
flutter test test/features/auth/auth_test.dart
Test Structure:
We welcome contributions! Please follow these steps:
Click the "Fork" button on the GitHub repository page.
git checkout -b feature/my-awesome-feature
Branch Naming Conventions:
feat: - New featuresfix: - Bug fixesdocs: - Documentation updatesrefactor: - Code refactoringgit add .
git commit -m "feat: add awesome new feature"
Commit Message Format:
feat: - New featuresfix: - Bug fixesdocs: - Documentation changestest: - Adding testsrefactor: - Code refactoringgit push origin feature/my-awesome-feature
This project is licensed under the MIT License - see the LICENSE file for details.
Happy Coding! 🚀
For questions or support, please check the DeepWiki documentation or open an issue on GitHub.
Selected from shared topics, language and repository description—not editorial ratings.
gregertw /
Starter app for Flutter that includes many different production app features; some not typically included in demo apps.
enzoftware /
Explore a sleek Flutter demo for a hotel booking app 🏩 ❤️ Witness the synergy of code and care, delivering a polished user interface.
ibhavikmakwana /
No description provided.
xrigau /
Demo To-Do app showing how to implement Redux in a Flutter app
guyulmaz /
flutter demo application to connect IsoDep iso 14443-4 cards via platform specific android nfc code
UmairKhalid786 /
Flutter widget built for Android/Fire TV. Flutter don’t support android TV officially and there is no support for DPad controller. I developed a widget which support DPad and respond to all controller events. Using RawKeyboard widget. By using this you can convert your mobile app into TV and support all click and focus events. A TV app demo is also attached.