1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- import 'package:fis_ui/define.dart';
- import 'package:flutter/widgets.dart';
- import 'package:get/get.dart';
- /// for temporary preview only!!!
- class QuickFWidget extends StatelessWidget implements FWidget {
- const QuickFWidget(this.child, {Key? key}) : super(key: key);
- final Widget child;
- @override
- Widget build(BuildContext context) => child;
- }
- typedef FWidgetCallback = FWidget Function();
- typedef AsyncVoidCallback = Future<void> Function();
- class FObx extends Obx implements FWidget {
- FObx(FWidgetCallback builder) : super(builder);
- }
- abstract class FisView<T> extends GetView<T> implements FWidget {
- const FisView({Key? key}) : super(key: key);
- @override
- FWidget build(BuildContext context);
- }
- class FisBuilder<T extends GetxController> extends GetBuilder<T>
- implements FWidget {
- const FisBuilder({
- Key? key,
- T? init,
- bool global = true,
- required GetControllerBuilder<T> builder,
- bool autoRemove = true,
- bool assignId = false,
- Object Function(T value)? filter,
- String? tag,
- void Function(GetBuilderState<T> state)? initState,
- dispose,
- didChangeDependencies,
- Object? id,
- void Function(GetBuilder oldWidget, GetBuilderState<T> state)?
- didUpdateWidget,
- }) : super(
- key: key,
- init: init,
- global: global,
- builder: builder,
- autoRemove: autoRemove,
- assignId: assignId,
- initState: initState,
- filter: filter,
- tag: tag,
- dispose: dispose,
- id: id,
- didChangeDependencies: didChangeDependencies,
- didUpdateWidget: didUpdateWidget,
- );
- }
|