CappManager class

CappManager is a class that represents the manager of the console application. The manager is a class that contains the main logic of the application.

Constructors

CappManager({required CappController main, required List<String> args, required List<CappController> controllers})
The constructor of the CappManager class. The main is the main controller of the application. The args is a list of arguments that passed to the application from the console. The controllers is a list of controllers that can be called from the console.

Properties

args List<String>
args is a list of arguments that passed to the application from the console.
getter/setter pair
controllers List<CappController>
controllers contin all contin all CappControllers that you can use in the app
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
main CappController
main is the main controller of the application. when the application starts the main controller will be called.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getHelp([List<CappController>? myControllers]) String
The getHelp method is used to get the help of the application. The myControllers is a list of controllers that you want to show in the help. If it is null it will show all controllers. you can call this method from the controller to get the help of the application.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process() Future<void>
The process method is used to process the arguments and call the controllers. Call this function to start the application.
processWhile({String promptLabel = 'App> ', List<String>? initArgs}) Future
toString() String
A string representation of this object.
inherited
writeHelpModern([List<CappController>? myControllers]) CappConsole
The writeHelpModern method is used to write the help of the application in a modern way. The myControllers is a list of controllers that you want to show in the help. If it is null it will show all controllers. you can call this method from the controller to write the help of the application in a modern way. This method uses ANSI escape codes to color the output and make it more readable.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

cprint(String text, [CappColors color = CappColors.none]) → void