KareeInstanceProfile enum

KareeInstanceProfile enumeration used to set the profile of the application.

Application profile is used by Karee to know whether the application is running in dev mode or in prod.

Development Mode

When the dev mode is enabled, developers can get all errors thrown in the application, through a UI.

Production Mode

Otherwise, when prod mode is enable, that means the application is used by end users.

For this reason, all errors should not be seen by users. Karee offers to you the possibility

to override the error screen in production. Just add a new Screen in your application, and name

this one as follows:

  @Screen(KareeConstants.kareeErrorScreenName)
  class MyErrorScreenInProd extends StatelessScreen{

    Widget builder(BuildContext context){
      return Scaffold(
        appBar: AppBar(
          title: Text('Oups Something Went wrong')
        ),
        body: Center(
          child: BackButton()
        )
      );
    }
  }

In addition, you can set the contact address of your application and use it everywhere in your application through KareeMaterialApp.globalErrorContactAddress or get the current profile with KareeMaterialApp.globalProfile.

See KareeConstants

See KareeMaterialApp

Inheritance

Constructors

KareeInstanceProfile()
const

Values

development → const KareeInstanceProfile
production → const KareeInstanceProfile

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<KareeInstanceProfile>
A constant List of the values in this enum, in order of their declaration.