reactter 0.0.1-dev.3 reactter: ^0.0.1-dev.3 copied to clipboard
Reactter is a package that uses GetX as base to implement reactive behavior using some names and functionality we are familiarized from React Js.
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'example_page.dart';
import 'package:reactter/reactter.dart';
Future<void> main() async {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
Get.put(RoutingController());
final _routingController = Get.find<RoutingController>();
return GetMaterialApp(
debugShowCheckedModeBanner: false,
smartManagement: SmartManagement.keepFactory,
supportedLocales: const [
Locale('es'),
Locale('en'),
],
routingCallback: _routingController.routingCallback,
initialRoute: '/example_page',
getPages: [
GetPage(
name: '/example_page',
page: () => const ExamplePage(),
transition: Transition.noTransition,
),
],
navigatorObservers: [_routingController],
);
}
}