get_help

Last updated:

0 purchases

get_help Image
get_help Images
Add to Cart

Description:

get help

GetHelp! #
GetHelp! is a set of helper widgets and classes which make using get and get_cli easier.
GetHelp! is also a great package for users of get which have experience using the stacked architecture but want something lighter. GetHelp!'s emphasis on the use of GetBuilderViews means that a stacked persons MVVM with update() functions will be satisfied.
If you are using vscode, I have also included a handy snippets file.
GetBuilderView #
GetBuilderView is a great way to create a view with GetBuilder for get's simple state management system.
class MyView extends GetBuilderView<MyController> {
const MyView({super.key});

@override
Widget builder(context, controller) {
return const Scaffold();
}
}
copied to clipboard
IMPORTANT:
This widget expects that you have already initialised your controller using a binding.
If you are not using bindings or you don't need global controller creation, add the init method to your [GetBuilderView].
You can also define the get builder to initialise local controllers by setting the [global] property to false, just the same as the [GetBuilder] widget.
class MyView extends GetBuilderView<MyController> {
const MyView({super.key});

/// Add the init method for initialising a Controller.
/// By default, init is set to null.
@override
MyController? get init => MyController();

/// Add the [global] method to turn off global controller creation.
/// [global] defaults to true
@override
bool get global => false;

@override
Widget builder(context, controller) {
return const Scaffold();
}
}
copied to clipboard
Basically, GetBuilderView acts as a shorthand for this:
class MyView extends StatelessWidget {
const MyView({super.key});

@override
Widget build(context) {
return GetBuilder<MyController>(
init: MyController(),
builder: (controller) {
return const Scaffold();
},
);
}
}
copied to clipboard
Instead of this nested code, all you need to write is this:
GetxFutureController #
GetxFutureController (named with the x to match GetxController) is a new controller type which adds a default implementation of awaiting futures based on stacked's FutureViewModel.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.