fluent_sdk 0.2.2 fluent_sdk: ^0.2.2 copied to clipboard
Package that provide a way to modularize features through a service locator.
import 'package:fluent_sdk/fluent_sdk.dart';
import 'package:fluient_sdk_example/feature/home/home_api.dart';
import 'package:fluient_sdk_example/feature/home/home_module.dart';
import 'package:flutter/material.dart';
void main() async {
await Fluent.build([
HomeModule(),
]);
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
// Get home page from home module
final homePage = Fluent.get<HomeApi>().getHomePage();
return MaterialApp(
home: Scaffold(
body: homePage,
),
);
}
}