kohler_providers library
A toolkit of shared providers and widgets for Kohler applications
This package contains shared widgets based on our high fidelity designs that provide consistency for Kohler applications.
This also contains an opinionated set of providers that automatically build Kohler-related such as the Clean Energy API classes and Kohler-specific authentication.
This package provides the following features:
- Environment variable support with versioning
- Providers for the Kohler Energy Management Web APIs
(using the
clean_energy_apipackage) - API / Network interceptor code that's specific to Kohler's backend
- Providers for OAuth related code (using the
flutter_oauthpackage) - Shared flutter widgets for common interaction patterns.
- Other shared code for routing, display range, etc.
Classes
- $NotificationActionsTable
- AcceptanceButtons
- Displays the "Accept" and "Decline" buttons seen in legal terms and conditions screens.
- ActionControllerDateTimePage
- Represents the page where an action is being run.
- ActionExercisePage
- Represents the page where an action is being run.
- ActionRemoteExerciseContent
- Remote exercise dialog content that performs an action and displays a loading animation while the action is being performed, and an error if the action completed to an error.
- ActionResetFaultsPage
- Represents the page where a reset fault action is being run
-
ActionStatusIndicator<
T> - Displays the status of an action, showing either a loading screen, or an error message if the action completed with an error. If the action completed successfully, the onSuccess callback will be called.
- AdaptiveRefreshIndicator
- Refresh indicator that adapts to match the current platform.
- AddressValidationDialog
- Dialog that lets the user pick a valid address from any input address data
- AlertCount
- Displays a count that typically represents a device's number of alerts.
- AllNullFakePathProviderPlatform
- AltAppBarTheme
- Applies an alternative app bar theme to descendant children.
- AnalyticsLogger
- Class that should log various types of events for analytics purposes.
- AnalyticsMapLayer
- Flutter map layer that displays nothing, but logs map events such as zooms, pans, and rotations as analytics events.
- AndroidAppNotification
- AnimatedDottedBorder
- Animated version of DottedBorder that smoothly animates the color and dashed pattern of the widget.
- AnimatedEntrance
- Creates an entrance animation when the widget first initializes.
- AnimatedEntranceConfig
- Configuration that can enable or disable the animation for any descendant AnimatedEntrance widgets.
- AnimatedIconTheme
- Animated version of IconTheme which automatically transitions the colors, etc, over a given duration whenever the given theme changes.
- AnimatedInk
- Animated version of Ink which automatically transitions the decorations, padding, width, and height over a given duration whenever the given values change.
- AnimatedVisibility
- Widget that implicitly animates the visibility of its child.
- AnimationToLayoutNotifier
- Helper widget that helps with Material Ink animations by dispatching a LayoutChangedNotification when the given animation notifies its listeners.
- ApiDeleteNotificationTokenUseCase
- Use case that updates the notification token of the user with the given email. If the email is non-null, it registers the token.
- ApiUpdateNotificationTokenUseCase
- Use case that updates the notification token of the user with the given email. If the email is non-null, it registers the token.
- AppAboutDialog
- About dialog that is specific to the dealer app
- AppBackIcon
- Displays a back icon that matches Kohler's high-fidelity designs.
- AppColors
- App-specific colors based on the color component within the Kohler Dealer Service app's high-fidelity designs
-
AppDropdownButtonFormField<
T> - Dropdown button form field that is modified to match the app's theme
- AppEventsAppBarBuilder
- Displays an app bar for the events page. The app bar includes search and date filters that let the user easily find or filter events.
- AppEventsPage
- Page that displays the event log for the device corresponding to the given device ID.
- AppEventsPageContents
- Displays the contents of the event log page
- AppListTile
- List tile that is modified to match the app's theme.
- AppListTileContainer
- List tile that is modified to match the app's theme.
- AppMaintenancePage
- AppMaintenancePageContents
- Contents of the maintenance tab containing the maintenance details section and list of maintenance notes.
- AppMessage
- A standardized app message based on high-fidelity designs
- Bottom navigation bar that displays and styles its navigation items to match the Kohler high-fidelity designs.
- Adds an AppNavigationBar on top of the given child.
- Displays an item within the AppNavigationBar.
- AppNotification
- Represents an app notification seen in the notifications page, as well as in a local notification about a device in the user's notification tray.
- AppNotificationAction
- Represents a notification action that the app can take when the user taps on a notification.
- AppNotificationPage
- Page that displays the user's list of notifications.
- AppNotificationPageContents
- Displays the contents of a notification page
- AppSwitch
- Switch that matches the app's theme
- AppTitle
- Displays title data in a layout that matches the high-fidelity designs for Kohler apps.
- AppUpdateWidget
-
AsyncValueBuilder<
T> - Widget that builds content based on an async value.
- AuthErrorScope
- Registers a callback that can handle authentication errors
- AuthHeaderInterceptor
- Request interceptor that adds authorization headers to requests.
- AuthIssueDialog
- Dialog that explains that an authentication issue occured.
-
AutocompleteOptions<
T extends Object> - Copy of the default Autocomplete options used in the Material library
- AutoDeviceHostBanner
- Displays a banner that indicates the device host of a generator. Unlike DeviceHostBanner, this widget automatically determines the device host based on the given device ID.
- AutoRefreshDatabase
- Widget that automatically refreshes the database when the app has been resumed after being paused.
- AutoRotatingIcon
- Icon that animates its child's rotation based on the given AutoRotatingPosition.
- BarcodeScanner
- Breadcrumb
- Single tappable item within the BreadcrumbTitle.
- BreadcrumbTitle
- Title that displays its children to match the "breadcrumb" design pattern.
- CircularAnimatedBuilder
- Widget that builds a circular animation based on the target property and provides the animated value to a builder.
- CircularAnimatedWidget
- An animated widget that helps create circular or rhythmic animations.
-
CircularAnimatedWidgetState<
T extends CircularAnimatedWidget> - State for a CircularAnimatedWidget that contains an animation property whose value circulates based on the target value of the corresponding widget.
- ConfirmResetFaultsPage
- Represents the page for displaying the safety agreement before a remote reset of a device's faults can be invoked.
- ConfirmResetFaultsPageContent
- ConfirmStartExercisePage
- Represents the page for confirming the start of an exercise with the given exercise mode.
- ConfirmStartRemoteExerciseContent
- Remote exercise dialog content that asks the user to confirm the start a one-off exercise.
- ConfirmStopExercisePage
- Represents the page for confirming the stop of a running exercise
- ConsoleAnalyticsLogger
- Analytics logger that uses Dart's print function to print events to the console.
- ControllerDateTimeAction
- Represents a resulting action that the user has chosen in the Controller Date Time dialog, which must then be performed.
- ControllerDateTimePage
- Represents a page within the Controller dialog
- ControllerScheduleAction
- Represents an action to set the Controller schedule to the given values.
- Countdown
- Widget that builds an animated timer or countdown based on the current date / time and the given other date / time.
- CountdownText
- Class that holds the countdown text to be used by a Countdown widget
- CurrentDateTimeUseCase
- Use case that returns a reference DateTime which can be used by the app for obtaining the current date & time.
- CustomColorSelectionHandle
- Text selection controls that uses the given handleColor as the color for handles when selecting text.
- CustomTabsOptions
- A comprehensive set of options for customizing the appearance and behavior of Custom Tabs when launching a URL.
- DateFormatLocalizeUseCase
- Localizes the date using DateFormat.format.
- DateLocalizeUseCase
- Use case for localizing a date time object, and returing the localized version of the date based on the given pattern.
- DealerOrg
- DecoratedScrollView
- Single child scroll view that adds decorations such as scrollbars and edge indicators on the edges that overflow.
- DeleteExercisePage
- Represents the page for confirming the deletion of a device's exercise schedule
- DeleteNotificationTokenUseCase
- Use case that should delete the current user's Firebase messaging device token with the backend.
- DeleteRemoteExerciseContent
- Remote exercise dialog content that displays confirmation on whether the user wants to delete any scheduled exercise.
- DeleteScheduleAction
- Represents an action to delete the exercise schedule
- DeveloperOptionsContents
- Contents of the developer options sheet, containing the various developer option toggles and actions.
- DeveloperOptionsPressDetector
- Widget that detects a long-press for a developer options and displays a developer options sheet.
- DeveloperOptionsSheet
- Sheet that displays developer options to control feature flags and test ongoing features.
- Device
- Represents a device within the fleet that is managed by the dealer.
- DeviceAddress
- Data class for an address for a device.
- DeviceHostBanner
- Displays a banner that indicates the device host of a generator.
- DialogOnAuthErrorScope
- Registers a callback that will inform the user of an authentication error if one occurs.
- DialogOnTokenErrorScope
- Registers a callback that will inform the user if there is an issue with obtaining a token due to their system's incorrect device clock.
- DialogTitle
- Displays a title appropriate for a dialog, with a CloseButton.
- DisplayRangeProvider
- Provides a DisplayRange to its child widget tree based on the screen size from the surrounding MediaQuery.
- DotBackground
- Draws a dotted background that emanates from the edge of the widget
- DoubleListTween
- Tween that can interpolate between two lists of doubles
- DurationAdapter
- Preference adapter that can read and write duration values.
- DurationPickerDialog
- Dialog that lets the user pick a Duration value.
-
EnumAdapter<
T extends Enum> - Preference adapter that can read and write enum values.
- ErrorForwardingAuthenticator
- Authenticator that forwards authenticate calls with 400 errors to registered handlers
- ErrorMessage
- Displays a standardized app error message, based on high-fidelity designs
- ErrorResetFaultsPage
- Represents the page where a reset fault completed with an error
- EventLog
- Represents a log of events and relevant data.
- ExerciseModeInfo
- Displays information about an exercise mode, if additional information for the mode should be presented to the user per feature requirements.
- FakeAnalyticsLogger
- Analytics logger that logs each event to the events list. Useful for determining whether events were triggered in tests.
- FakeCurrentDateTimeUseCase
-
Implementation of a current date time use case that returns dateTime, or
January 1, 2023 at 00:00:00.00 if
dateTimeisnull. This is useful for tests which need a fixed reference date time. Consider using NowCurrentDateTimeUseCase for a real implementation - FakeDeviceInfo
- Fake device info implementation with no values.
- FakeEvent
- Represents an instance of an event.
- FakeFlutterLocalNotificationsPlugin
- FakeLogScreenView
- Represents an instance of an Screen View.
- FakePathProviderPlatform
-
FakePreferenceNotifier<
T> - Fake implementation of preference notifier that does not persist state.
- An underlying platform interface for shared preferences that uses an in-memory database seeded with the given data. It also contains a log of all method calls made to the platform.
- FeedbackSubmissionWidget
- FirebaseAnalyticsLogger
- Analytics logger that uses Firebase Analytics to log events
- Bottom navigation bar that displays and styles its navigation items to match the Kohler high-fidelity designs.
- Adds an FlatAppNavigationBar on top of the given child.
- Displays an item within the FlatAppNavigationBar.
- FlatHeaderListTile
- List tile that serves as headers for the normal flat list tiles. Designed to match the latest Kohler design system
- FlatListTile
- Flat version of a list tile that is modified to match the app's theme.
- FlavorBanner
- Displays a Banner that shows the current app's build flavor.
- GeneratorAdditionButtons
- Standard buttons used within the Generator addition workflow.
- GeneratorDetails
- Represents specific details for a Kohler Generator device such as the RDC2.
- GeneratorTrendData
- Contains the actual historical trend data series / values for a particular generator parameter.
- GradientCard
- Card that has a pleasing gradient effect emanating from the upper-left corner of the card.
- IconIndicator
- Icon indicator used for displaying status information
-
IconMenuItem<
T> - Menu item that also displays an icon
- IconThemeDataTween
- An interpolation between two IconThemeDatas.
- IgnoreBaseline
- A widget that does not report a baseline nor the baseline of its children.
- InAppNotification
- InfoTag
- Displays the information tag seen on the device details status bar
- InitialNotificationSettingsUseCase
- IosAppNotification
- KohlerIcons
- KohlerImage
- Displays the Kohler logo with the correct aspect ratio.
- KohlerLogo
- Displays the Kohler logo with the correct aspect ratio.
- KohlerPageTransitionsTheme
- Transition theme for the dealer service app
- KohlerTheme
- Theme-related values for the Kohler brand.
- LatLongSheet
- Bottom sheet that displays latitude and longitude fields, as well as additional fields for address information.
- LegalScreenContents
- Displays the title and contents of a legal screen, as well as acceptance buttons to accept or deny the terms and conditions.
- LoadShed
- Represents the state of a Load Shed Kit peripheral attached to the device
- LoadShedIndicator
- LoadShedValue
- Represents the value of a load shed parameter. These values map to power loads connected to the generator, which can be shed.
- LogAnalyticsOnTap
- Wraps an otherwise non-interactive child with a tap handler that logs the tap as an analytics event.
- LogInOnAuthErrorScope
- Registers a callback that will ask the user to log-in again if an authentication error occured.
- LongPressDetector
- Widget that calls its onLongPress callback after it detects a long press spanning the given longPressDuration.
- MainControllerDateTimePage
- Represents the main page that first gets shown to the user when the Controller Date Time dialog opens
- MainExercisePage
- Represents the main page that first gets shown to the user when the remote exercise dialog opens
- MainRemoteExerciseContent
- Remote exercise dialog content for the main page
- MainResetFaultsPage
- Represents the main entry point page for resetting a fault
- MaintenanceDetails
- Maintenance detail data for a device.
- MaintenanceLogCard
- Card that displays a single maintenance log
- MaintenanceLogsEntry
- Text field entry that allows the user to create a new maintenance log note.
- MaintenanceNote
- MaintenanceScheduleInfo
- Displays maintenance details such as the time since the last maintenance and the scheduled time until the next maintenance is due.
- MapAddressPicker
- Page that allows the user to pick an arbitrary address using a map.
-
MapAutocompleteOptions<
T extends Object> - Autocomplete options that also displays a "Choose from map" option at the bottom of the list.
- MockFirebaseMessaging
- MockHttpClient
- A class which mocks HttpClient.
- MockHttpClientRequest
- A class which mocks HttpClientRequest.
- MockHttpClientResponse
- A class which mocks HttpClientResponse.
- MockHttpHeaders
- A class which mocks HttpHeaders.
- Holds state for a navigator container child.
- A container that animates between various children as the current key changes, with nested navigator-like animations.
- Represents a notification action that should cause the app to navigate to a specific device when tapped.
- Builds a stack of page-based navigators and displays the one associated with the given currentKey, in order to help fulfill the 'nested navigator with bottom nav bar' pattern.
- NoopDeleteNotificationTokenUseCase
- Delete notification token use case that does nothing when called.
- NoopInitialNotificationSettingsUseCase
- NoopUpdateNotificationTokenUseCase
- Update notification token use case that does nothing when called.
- NotificationAction
- NotificationActions
- Table that holds actions to be triggered when the user taps on an in-app or system notification.
- NotificationActionsCompanion
- NotificationDateTile
- Header tile that displays the grouped date of the notification
- NotificationMessageTile
- Tile that displays a notification within the notification page list
- NotificationProcessor
- Sets up, receives, and processes push notifications coming from Firebase cloud messaging.
- NotificationProcessorState
- NotificationsNotifier
- State notifier that manages the logged-in user's list of notifications
- NotifierWebView
- Webview that syncs its internal state with the given notifier.
- NowCurrentDateTimeUseCase
- Implementation of a current date time use case that always returns DateTime.now. This is useful as a real implementation in the app.
- NullableDurationAdapter
- Preference adapter that can read and write nullable duration values.
-
OutlinedButtonFormField<
T> - A FormField that contains an outlined input button that is themed to match other form inputs, based on high-fidelity designs
-
PagedDialog<
P> - Dialog that can have different pages, with differing titles and content between pages. The dialog will smoothly animate its contents as the pages change.
-
PagedDialogState<
P> - State of a paged dialog.
-
PagedNotifier<
T> - State notifier for managing a PagedValue.
-
PagedValue<
T> -
Represents a list of
Tvalues that are retrieved from some backend or other source in a paged format. - PendingExerciseNotifier
- Notifier that reflects any devices which have just been started, but whose status update to reflect a running exercise status is still pending.
- PendingExerciseSubscription
- Represents a subscription to the expected change in a device's status after an exercise is started.
- PeripheralNameChangeDialog
- Dialog that allows the user to customize Peripheral names for both Load Modules and PIM.
- PIM
- Represents the state of a Programmable Interface Module peripheral attached to the generator.
- PimValue
- Represents the value of a Programmable Interface Module parameter. These values map to outputs on an attached PIM peripheral.
-
PopupMenuGroup<
T> - Popup menu entry that can hold several other entries inside itself.
-
PreferenceNotifier<
T> - A state notifier whose state is backed by a shared preference.
- PrimaryContentTheme
- Applies a theme that makes all descendant children legible on top of the primary color.
- RemoteActionButtons
- Set of confirmation buttons typically displayed at the bottom of a remote exercise dialog page.
- RemoteExerciseAction
- Represents a resulting action that the user has chosen in the remote exercise dialog, which must then be performed.
- RemoteExercisePage
- Represents a page within the remote exercise dialog
- RenderIgnoreBaseline
- A render object that does not report a baseline nor the baseline of its children.
- ResetFaultsContentBuilder
- Uses the provided builder to display reset faults dialog content based on the current generator details and event log, but also displays useful loading and error messages if the data are not available.
- ResetFaultsPage
- Represents a page within the reset faults dialog
- ResetFaultsValidation
- Holds reset-faults related data, such as the various factors for whether a generator can have its faults reset.
-
ReversibleAnimation<
T> - Animation whose value is based on either the forward or reverse animatables based on the status of the parent animation.
- RunPeriodically
- Runs the given callback repeatedly after each given interval period.
- SafariViewControllerOptions
- The comprehensive set of options for launching SFSafariViewController by specifying a URL.
- SafetyAgreementStartExercisePage
- Represents the page for displaying the safety agreement before a remote start of an exercise can be run.
- SafetyAgreementStartRemoteExerciseContent
- Remote exercise dialog content that the safety agreement before a remote start of an exercise can be run.
- SaveButton
- Button designed for saving form changes.
- SavingInProgressControllerContent
- Remote Controller dialog content which displays confirmation that changes are still being saved but will take a few minutes to reflect in the app.
- SavingInProgressControllerPage
- Represents a page that confirms that changes are still being saved but will take a few minutes to reflect in the app.
- SavingInProgressExerciseContent
- Remote exercise dialog content which displays confirmation that changes are still being saved but will take a few minutes to reflect in the app.
- SavingInProgressExercisePage
- Represents a page that confirms that changes are still being saved but will take a few minutes to reflect in the app.
- ScheduleAction
- Represents an action to set the exercise schedule to the given values.
- ScheduleExercisePage
- Represents the schedule exercise page
- ScheduleFormState
- Represents the UI form state for the 'Schedule Exercise' page of the remote exercise dialog.
- ScheduleRemoteExerciseContent
- Remote exercise dialog content that displays various components related to scheduling an exercise.
- ServiceAgreementFormData
- Represents the data within a service agreement form
- Database which holds common data used in both Pro and homeowner apps.
-
Callers can lookup localized strings with an instance of SharedLocalizations
returned by
SharedLocalizations.of(context). - Implementation of preference notifier that uses the platform's shared preferences implementation to persist state.
- SizeAnimatedEntranceTransition
- Transition that starts with a size transition having nil opacity for the first fraction of the animation, then use the AnimatedEntrance animation for the remaining animation duration
- SliverActiveAlerts
- Displays the list of active alerts as a horizontally scrolling list.
- SliverMaintenanceLogs
- List of the dealer's maintenance logs for the current device.
- SliverSectionHeader
- Displays the section headers for each section of the page
- SliverTimeline
- Displays the list of timeline items as a straightforward animated list.
- SliverTimelineHeader
- Displays the timeline and active alerts headers within the event log page, based on high-fidelity designs
-
SpinButton<
T extends Comparable> - A widget that allows the user to increment and decrement a value
-
SpinButtonFormField<
T extends Comparable> - A FormField that contains a SpinButton.
- StartExerciseAction
- Represents an action to start a one-off remote exercise
- StartExercisePage
- Represents the page for starting an exercise
- StartRemoteExerciseContent
- Remote exercise dialog content that allows the user to start a one-off exercise.
-
StateNotifierBuilder<
T> - Rebuilds its child every time the given notifier emits a new state.
- StatusBarScrim
- Displays a status bar scrim on the top portion of the app
- StatusIndicator
- A status indicator that displays a label (usually text) with a colored circular indicator on the left-hand side.
- StatusIndicatorThemeData
- Theme properties for a status indicator
- StopExerciseAction
- Represents an action to stop a currently running exercise
- SuccessDeleteExercisePage
- Represents a page that confirms that the schedule exercise action was successful
- SuccessDeleteRemoteExerciseContent
- Remote exercise dialog content which displays confirmation that deleting the device's exercise schedule was successful
- SuccessMessage
- Displays a standardized app success message, based on high-fidelity designs
- SuccessResetFaultsPage
- Represents the page where a reset fault completed successfully
- SuccessScheduleExercisePage
- Represents a page that confirms that the schedule exercise action was successful
- SuccessScheduleRemoteExerciseContent
- Remote exercise dialog content which displays confirmation that updating the device's exercise schedule was successful
- SuccessStopExercisePage
- Represents a page that confirms that the stop exercise action was successful
- SuccessStopRemoteExerciseContent
- Remote exercise dialog content which displays confirmation that stopping the device's running exercise was successful
- SystemAppNotification
- TabBorder
- A tab-shaped border that is similar to a rounded rectangle but with the bottom corners rounded outwards so the shape appears merged with any bottom content.
- TestFirebaseMessagingPlatform
- TestHttpOverrides
- Test HttpOverrides that returns its own mock client when createHttpClient is called.
- TimelineItem
- Represents a discrete event within the event log timeline.
- TimelineItemTile
- Displays a timeline item, based on the latest high-fidelity designs.
- TokenTimeIssueDialog
- Dialog that explains that a token issue occurred due to incorrect date/time settings on the user's device.
- TrendApiArgs
- Arguments for the historical trends endpoint in the Energy Management V3 API
- TrendDataArgs
- UnfocusOnDrag
- Widget that removes focus on the currently focused widget (if any) when the user drags anywhere on the child
- UpdateNotificationTokenUseCase
- Use case that should update the current user's Firebase messaging device token with the backend.
- UtcDateFormatLocalizeUseCase
- Localizes the date using DateFormat.format, but converts the date to UTC first instead of using the current machine's timezone.
-
Value<
T> - Holds a value that is useful for copying. Consumers can call valueOr to get the internal value, or the original value if there is no internal value.
- WebViewAppBar
- App bar that displays web view information such as title and loading progress based on the given notifier.
- WebViewNotifier
- State notifier that controlls all state for a web view.
- WebViewNotifierHost
- Hosts a WebViewNotifier and synchonizes the state of the notifier with the surrounding theme and other relevant app state.
- WebViewPage
- Page displaying a webview, as well as additional chrome with information about the webview contents.
- WebViewState
-
WebViewStateProp<
T>
Enums
- AppNotificationType
- AuthIssueAction
- AutoRotatingPosition
- CellularDataStatus
- ConnectionType
- CoolingType
- DeviceHost
- The "device host" which the generator is connected to.
- DeviceStatus
- Represents the status of a device
- DisplayRange
- Represents a display screen size range that corresponds to certain common classes of devices, such as phones, tablets, and desktop screen sizes.
- EventsSection
- ExerciseFrequency
- ExerciseMode
- FuelType
- GeneratorTrend
- Represents a generator trend parameter.
- IconMenuStyle
- LoadShedStatus
- Status of a power load that can be shed
- PowerSource
- SafariViewControllerDismissButtonStyle
- Dismiss button style on the navigation bar of SFSafariViewController.
- ServiceAgreementStatus
- ServiceAgreementTerm
- Represents the potential terms of a service agreement
- SwitchState
- TimelineItemEvent
- TimelineItemType
- TrendTimeArg
- Argument representing the time span for a generator trends page
Extensions
- AnalyticsExtensions on BuildContext
- Utility methods for logging analytics events
-
AsyncValueExtensions
on AsyncValue<
T> -
AsyncValueNullExtensions
on AsyncValue<
T?> -
AsyncValueProviderExtensions
on ProviderBase<
AsyncValue< T> > - BrightnessExtensions on Brightness
- DeviceStatusExtensions on DeviceStatus
- Domain-related extension functions on DeviceStatus
- GeneratorDetailsExtensions on GeneratorDetails
- Domain-related extension functions on GeneratorDetails
- IconKeyExtensions on Icon
-
IterableCommonExtensions
on Iterable<
T> -
IterableJoinExtensions
on Iterable<
T> - LocalizationExtensions on BuildContext
-
ProviderRefExtensions
on Ref<
Object?> - RiverpodContextExtension on BuildContext
- Extensions on BuildContext that enable riverpod-related functionality
- TextKeyExtensions on Text
- ThemeContextExtensions on BuildContext
- WidgetRefExtensions on WidgetRef
- WidgetTesterExtensions on WidgetTester
Constants
- defaultNotificationSettings → const NotificationSettings
- errorBackoffSeconds → const int
- innerSpace → const double
- kAcceptanceButtonHeight → const double
- kAcceptanceButtonSpacing → const double
-
kAndroidChannels
→ const List<
AndroidNotificationChannel> - kApplicationDocumentsPath → const String
- kApplicationSupportPath → const String
- kConnectionChannel → const AndroidNotificationChannel
- kDefaultCenter → const LatLng
-
kDefaultExtraCustomTabs
→ const List<
String> - kDefaultIconIndicatorSize → const double
- kDefaultStatusIndicatorIconSize → const double
- kDevOptionsLongPressDuration → const Duration
- kDownloadsPath → const String
-
kEcoExerciseModels
→ const List<
String> - kExerciseDurationStep → const Duration
- kExternalCachePath → const String
- kExternalStoragePath → const String
- kExtraLargeEnterDuration → const Duration
- kExtraLargeExitDuration → const Duration
- kFallbackDuration → const Duration
-
Duration to fall back on if the current duration is
nulland the user has interacted with the duration stepper - kFleetMapMaxZoom → const double
- Maximum zoom supported by the fleet map
- kFleetMapMinZoom → const double
- Minimum zoom supported by the fleet map
- kFullRefreshDelay → const Duration
- Delay to wait before fully refreshing the generator's details.
- kGeneratorRunningChannel → const AndroidNotificationChannel
- kHepDeviceMessageType → const String
- kHepV2DeviceMessageType → const String
- kLargeEnterDuration → const Duration
- kLargeExitDuration → const Duration
- kLatLongSheetClosedHeight → const double
- kLibraryPath → const String
- kLongRunningChannel → const AndroidNotificationChannel
- kMaintenanceChannel → const AndroidNotificationChannel
- kMaxExerciseDuration → const Duration
- kMediumEnterDuration → const Duration
- kMediumExitDuration → const Duration
- kMinActionLoadingDuration → const Duration
- Minimum loading duration while performing an action
- kMinExerciseDuration → const Duration
- kMinGenAddButtonSize → const Size
- kModel10RESV_10RESVL → const String
- kModel12RESV_12RESVL → const String
- kModel130RCLGB → const String
- kModel14KW → const String
- kModel20KW → const String
- kModel24RCA → const String
- kModel24RCL → const String
- kModel24RCLA → const String
- kModel26RCA0 → const String
- kModel26RCAA → const String
- kModel30RCL → const String
- kModel30RCLA → const String
- kModel30RCLH → const String
- kModel36RCL → const String
- kModel38RCL → const String
- kModel38RCLA → const String
- kModel38RCLB → const String
- kModel38RCLC → const String
- kModel40RCL → const String
- kModel45RCLH → const String
- kModel48RCL → const String
- kModel48RCLA → const String
- kModel48RCLB → const String
- kModel48RCLC → const String
- kModel60RCL → const String
- kModel60RCLA → const String
- kModel60RCLB → const String
- kModel60RCLH → const String
- kModel6VSG_24V → const String
- kModel6VSG_36V → const String
- kModel6VSG_48V → const String
- kModel8RESV_8RESVL → const String
- kModelOther → const String
- kNoticeChannel → const AndroidNotificationChannel
- kOncueDeviceMessageType → const String
- kPagedNotifierInitialDelay → const Duration
- Small initial delay before a paged notifier begins updating its value for the first time.
- kPendingTimeout → const Duration
- Timeout while waiting for an exercise to be reflected in a device's status
- Shared environment file version
- kShutdownChannel → const AndroidNotificationChannel
- kSmallDuration → const Duration
- kTemporaryPath → const String
-
kVSGModels
→ const List<
String> - Variable speed generators
- kWarningChannel → const AndroidNotificationChannel
- outerHorizSpace → const double
- outerVertSpace → const double
Properties
-
addressSuggestionsFamily
→ FutureProviderFamily<
List< DeviceAddress> , String> -
Provides address suggestions for a given search term.
final
-
alertsApiFamily
→ FutureProviderFamily<
List< AlertDTO> , int> -
final
-
allNotificationsProvider
→ AutoDisposeProvider<
AsyncValue< List< >AppNotification> > -
Provides the list of all of the user's received app notifications
final
-
analyticsProvider
→ Provider<
AnalyticsLogger> -
Provides an analytics logger for logging events
final
-
appAuthProvider
→ Provider<
FlutterAppAuth> -
Provider for a FlutterAppAuth instance
final
-
appNameProvider
→ FutureProvider<
String> -
final
-
appUpdatePlanDealerApiFamily
→ AutoDisposeFutureProvider<
AppUpdatePlanDTO> -
final
-
appUpdatePlanHomeownerApiFamily
→ AutoDisposeFutureProvider<
AppUpdatePlanDTO> -
final
-
authClientProvider
→ FutureProvider<
AuthClient< OAuthToken> > -
Provider for an
AuthClient.final -
authHeaderInterceptorProvider
→ FutureProvider<
AuthHeaderInterceptor> -
Provider for a request interceptor that adds authentication-related headers
final
-
authManagerProvider
→ FutureProvider<
AuthManager< OAuthToken> > -
Provider for an
AuthManager.final -
authPersistenceProvider
→ FutureProvider<
AuthPersistence< OAuthToken> > -
Provider for an
AuthPersistence.final -
buildNumberProvider
→ FutureProvider<
String> -
final
-
cachedDeviceFamily
→ AutoDisposeProviderFamily<
AsyncValue< Device> , int> -
final
-
cachedDevicesProvider
→ AutoDisposeProvider<
AsyncValue< List< >Device> > -
Provides a cached list of devices
final
-
cleanEnergyRdc2ServiceProvider
→ FutureProvider<
CleanEnergyRdc2Api> -
Provider for
CleanEnergyRdc2Apifinal -
completeVersionProvider
→ FutureProvider<
String> -
Provides a complete version of the app build including version name,
build number, and flavor
final
-
connectionProvider
↔ Provider<
QueryExecutor> -
getter/setter pair
-
currentDateTimeProvider
→ Provider<
CurrentDateTimeUseCase> -
Provides a use case that returns a reference current DateTime which can
be used by the app wherever a current date time is needed.
final
-
currentUserProvider
→ StreamProvider<
AuthUser< OAuthToken> ?> -
Provides the current user.
final
- dateFilterKey → UniqueKey
-
final
-
dateLocalizeUseCaseProvider
→ Provider<
DateLocalizeUseCase> -
Provides a date localize use case. The default value localizes by using
DateFormat.format.
final
- decimalFormatter → TextInputFormatter
-
final
-
deleteExerciseScheduleProvider
→ Provider<
DeleteExerciseScheduleUseCase> -
Provides a use case for deleting a device's exercise schedule
final
-
deleteNotificationTokenUseCaseProvider
→ Provider<
DeleteNotificationTokenUseCase> -
Provides a use case for deleting the currently logged-in user's
notification token within the backend.
final
-
deviceDetailsApiFamily
→ FutureProviderFamily<
DeviceDetailsDTO, int> -
final
-
deviceIdProvider
→ FutureProvider<
String?> -
Provides a "device ID" which uniquely identifies the user's device
final
-
deviceInfoProvider
→ FutureProvider<
BaseDeviceInfo> -
Provides device information
final
-
enableDevOptionsGestureFlag
→ Provider<
bool> -
Provider for feature flag that enables the Developer options long-press
gesture on the Profile page.
final
-
enablePerformanceTracingOverrides
→ List<
Override> -
final
-
enablePerformanceTracingProvider
→ Provider<
bool> -
final
-
energyManagementApiProvider
→ FutureProvider<
EnergyManagementApi> -
Provider for
EnergyManagementApifinal -
energyManagementV3ApiProvider
→ FutureProvider<
EnergyManagementV3Api> -
Provider for
EnergyManagementV3Apifinal -
errorForwardingAuthenticatorProvider
→ Provider<
ErrorForwardingAuthenticator> -
Provider for an authenticator that forwards authenticate requests
to registered handlers
final
-
eventLogFamily
→ AutoDisposeProviderFamily<
AsyncValue< EventLog> , int> -
Provider family that returns an EventLog for the given device ID.
final
-
eventsApiFamily
→ FutureProviderFamily<
List< EventDTO> , int> -
final
-
filteredNotificationsByDateFamily
→ AutoDisposeProviderFamily<
AsyncValue< Map< , String>DateTime?, List< >AppNotification> > -
Provides a mapping of dates to filtered app notifications
final
-
filteredNotificationsFamily
→ AutoDisposeProviderFamily<
AsyncValue< List< , String>AppNotification> > -
Provides a list of the user's received app notifications, filtered to
only include notifications with contents that contain the provided text.
final
-
flavorProvider
→ FutureProvider<
String> -
Provides the build flavor of the app based on the environment variable file
final
-
fullRefreshCachedDevicesProvider
→ Provider<
RefreshCachedDevicesUseCase> -
Provides a use case for fully refreshing the user's device list
final
-
fullRefreshGeneratorDetailsProvider
→ Provider<
RefreshGeneratorDetailsUseCase> -
Provides a use case for fully refreshing the generator details
final
-
generatorDetailsFamily
→ AutoDisposeProviderFamily<
AsyncValue< GeneratorDetails> , int> -
Family that provides GeneratorDetails based on the given device ID.
final
-
generatorTrendsApiFamily
→ FutureProviderFamily<
List< TrendValueDTO> , TrendApiArgs> -
final
- httpOverrides ↔ TestHttpOverrides
-
getter/setter pair
-
initialNotificationSettingsUseCaseProvider
→ Provider<
InitialNotificationSettingsUseCase> -
final
-
isLoggedInProvider
→ Provider<
bool> -
Provider that returns whether there is a user currently logged in.
final
-
isPendingExerciseFamily
→ AutoDisposeProviderFamily<
bool, int> -
Provider that returns
trueif there is a pending exercise that is expected to be run for the device with the given ID.final -
loadMoreNotificationsProvider
→ Provider<
LoadMoreNotificationsUseCase> -
Provides a use case for loading more of the user's list of notifications.
final
-
localNotificationPluginProvider
→ FutureProvider<
FlutterLocalNotificationsPlugin> -
Provides the Flutter local notifications plugin for
displaying notifications
final
-
maintenanceDetailsFamily
→ AutoDisposeProviderFamily<
AsyncValue< MaintenanceDetails> , int> -
Provides the maintenance details for a given device id.
final
-
maintenanceNotesApiFamily
→ FutureProviderFamily<
List< MaintenanceNoteDTO> , int> -
final
-
notificationsApiNotifierProvider
→ AutoDisposeStateNotifierProvider<
NotificationsNotifier, PagedValue< NotificationDTO> > -
** Notification list providers **
Provides the notifications from the remote Energy Management backend
final
-
notificationsHasReachedEndProvider
→ AutoDisposeProvider<
bool> -
Provides whether the end of the notification list has been reached.
final
-
notificationTimestampUseCaseProvider
→ Provider<
NotificationTimestampUseCase> -
final
-
notificationTokenProvider
→ FutureProvider<
String?> -
** Update notification token providers **
Provides the FCM notification token associated with the device
final
-
packageInfoProvider
→ FutureProvider<
PackageInfo> -
Provides a package info class that contains information about the app
final
-
packageNameProvider
→ FutureProvider<
String> -
final
-
pendingExerciseModeFamily
→ AutoDisposeProviderFamily<
ExerciseMode?, int> -
Provider that returns the pending exercise mode for an exercise that
was started on the app with the given ID.
final
-
pendingExerciseNotifierProvider
→ StateNotifierProvider<
PendingExerciseNotifier, Map< int, PendingExerciseSubscription> > -
Provides a notifier that holds information on whether any device has a
pending exercise to be run.
final
-
periodicRefreshIntervalPrefProvider
→ StateNotifierProvider<
PreferenceNotifier< Duration> , Duration> -
Provider for the user's preference for the periodic refresh interval
final
-
periodicRefreshIntervalProvider
→ Provider<
Duration?> -
Provider for the periodic refresh interval
final
-
realAnalyticsOverrides
→ List<
Override> -
Overrides for the various analytics providers that instead provide useful
implementations for logging data which connect to a real analytics service.
final
-
realAppOverrides
→ List<
Override> -
Overrides for app-related providers that provide real implementations
of app-related classes.
final
-
realConnectionProvider
↔ Provider<
QueryExecutor> -
Provides a real connection that uses a shared SQL database
getter/setter pair
-
realDatabaseOverrides
→ List<
Override> -
Overrides for database providers that are more useful
for the real app. Should generally not be used within tests.
final
-
realDateTimeOverrides
→ List<
Override> -
Contains a list of overrides for localization-related providers.
final
-
realDeleteNotificationTokenUseCaseProvider
→ Provider<
DeleteNotificationTokenUseCase> -
Provides a use case for deleting the current user's notification token
with the backend using API calls.
final
-
realDeviceInfoOverrides
→ List<
Override> -
Real implementations of device info providers
final
-
realFlagOverrides
→ List<
Override> -
Contains a list of overrides for flag providers.
final
-
realNotificationOverrides
→ List<
Override> -
Overrides for notification providers that are more useful
for the real app. Should generally not be used within tests.
final
-
realUpdateNotificationTokenUseCaseProvider
→ Provider<
UpdateNotificationTokenUseCase> -
Provides a use case for updating the current user's notification token
with the backend using API calls.
final
-
refreshCachedDevicesProvider
→ Provider<
RefreshCachedDevicesUseCase> -
Provides a use case for refreshing the user's device list
final
-
refreshGeneratorDetailsProvider
→ Provider<
RefreshGeneratorDetailsUseCase> -
Provides a use case for refreshing the generator details
final
-
refreshNotificationsProvider
→ Provider<
RefreshNotificationsUseCase> -
Provides a use case for refreshing the user's list of notifications
final
-
registerNotificationTokenEnabledFlag
→ StateNotifierProvider<
PreferenceNotifier< bool> , bool> -
Provider for feature flag that enables the registration of
notification tokens
final
-
resetFaultsProvider
→ Provider<
ResetFaultsUseCase> -
Provides a use case for remotely resetting faults of a device
final
- rpmNumberFormat → NumberFormat
-
final
-
scheduleExerciseProvider
→ Provider<
ScheduleExerciseUseCase> -
Provides a use case for updating a device's exercise schedule
final
-
Provides a shared database.
getter/setter pair
-
final
-
showDebugOnRefreshFlag
→ StateNotifierProvider<
PreferenceNotifier< bool> , bool> -
Provider for whether to show debug messages during a periodic refresh.
final
-
showDeviceHostBannerFlag
→ StateNotifierProvider<
PreferenceNotifier< bool> , bool> -
Provider for whether to show a device host banner that indicates the
currently connected device host of a generator
final
-
startExerciseProvider
→ Provider<
StartExerciseUseCase> -
Provides a use case for starting a remote exercise
final
-
stopExerciseProvider
→ Provider<
StopExerciseUseCase> -
Provides a use case for stopping a remote exercise
final
-
testConnectionProvider
↔ Provider<
QueryExecutor> -
Provides a connection that uses an in-memory database
getter/setter pair
-
testDateLocalizeUseCaseProvider
→ Provider<
DateLocalizeUseCase> -
Provides a date localize use case that formats the dates in UTC time.
final
-
testNotificationTimestampUseCaseProvider
→ Provider<
NotificationTimestampUseCase> -
final
-
trendDataFamily
→ AutoDisposeProviderFamily<
AsyncValue< GeneratorTrendData> , TrendDataArgs> -
Family that provides trend data for a given set of trend data arguments
final
-
uninitializedEnvFamily
→ ProviderFamily<
DotEnv, String> -
Provides an unitialized DotEnv instance. Used by createEnvFamily for
creating the underlying DotEnv.
final
-
updateDeviceProvider
→ Provider<
UpdateDeviceUseCase> -
Provides a use case for updating a device's details
final
-
updateHomeownerConsentProvider
→ Provider<
UpdateHomeownerConsentUseCase> -
Provides a use case for updating homeowner consent of a device
final
-
updateNotificationTokenDebugStatusProvider
→ StateProvider<
String?> -
Provides a debug status message that explains the current status of
registering a notification token
final
-
updateNotificationTokenUseCaseProvider
→ Provider<
UpdateNotificationTokenUseCase> -
Provides a use case for updating the currently logged-in user's
notification token within the backend.
final
-
updatePeripheralNameProvider
→ Provider<
UpdatePeripheralNameUseCase> -
final
-
updateServiceAgreementProvider
→ Provider<
UpdateServiceAgreementUseCase> -
Provides a use case for updating a device's service agreement details
final
-
userAgentProvider
→ FutureProvider<
String> -
Provides a suitable user agent based on the package name and version
final
-
useRehlkoUrlFlag
→ StateNotifierProvider<
PreferenceNotifier< bool> , bool> -
Provider for adding url for rehlko or old url
final
-
versionProvider
→ FutureProvider<
String> -
final
Functions
-
addActionToDatabase(
SharedDatabase database, NotificationResponse response) → Future< void> - Saves a NotificationResponse to the local database
-
addFcmActionToDatabase(
SharedDatabase database, RemoteMessage message) → Future< void> - Saves the action from a Firebase Cloud Messaging message to the local database
-
alertDtoToTimelineItem(
AlertDTO alert) → TimelineItem -
allExerciseFrequencies(
GeneratorDetails? details) → List< ExerciseFrequency> - Returns the supported running exercise frequencies for the device represented by the given generator details.
-
allExerciseModes(
GeneratorDetails? details) → List< ExerciseMode> - Returns all exercise modes for the device represented by the given generator details.
-
appUpdateFunction(
{required BuildContext context, required String googlePlayId, required String appStoreId, required bool isHomeownerApp}) → void -
assertSuccessfulResponse(
Response response) → void -
Throws if the given
responseis not successful. -
connectionTypeToDto(
ConnectionType? connectionType) → ConnectionTypeDTO? -
contactEmail(
{required BuildContext context, required Uri emailUrl, required String subject, required String body}) → Future< void> -
Launch the user's email client with the given
emailUrlin thetofield. -
createEnvFamily(
{String filename = '.env', Map< String, int> requiredVersions = const {}}) → FutureProviderFamily<String, String> - Create a provider family that can return environment variable values
-
createLiveAuthManager(
{required String username, required String password}) → Future< AuthManager< OAuthToken> > -
Creates an
AuthManagerwith a current user based on a live Okta user created with createLiveUser. -
createLiveUser(
{required String username, required String password}) → Future< AuthUser< OAuthToken> > -
Signs in as a live Okta user with the given username and password, and
returns an
AuthUserwith the actual tokens from Okta. -
Creates a shared database, with dependencies obtained from the given
ref. -
currentSizedStackLayoutBuilder(
{Alignment alignment = Alignment.center, double? prevChildMinWidth, double? prevChildMaxWidth, double? prevChildMinHeight, double? prevChildMaxHeight = double.infinity, Clip clipBehavior = Clip.hardEdge}) → AnimatedSwitcherLayoutBuilder - Layout builder for AnimatedSwitcher based on a Stack, with arguments for customizing the layout.
-
dateFromEpochSeconds(
num? secondsSinceEpoch) → DateTime? - Returns the date time from the given number representing the seconds since epoch.
-
decodePathMap(
{required String path, required String template}) → Map< String, String> - Decode the path map values from the given path, based on the provided template.
-
decodePathWhen<
T> (String path, Map< String, MatchCallback< templateMap) → T?T> > -
Convenience function for decoding values from a given
paththat may match multiple possible templates. -
deleteExerciseScheduleApi(
{required BuildContext context, required int id}) → Future< void> - Delete the remote exercise schedule on the generator with the given id using the underlying backend API calls
-
deviceAddressToDto(
DeviceAddress address) → AddressDTO -
dtoCellularDataStatus(
CellularDataStatusDTO? cellularDataStatus) → CellularDataStatus? -
dtoConnectionType(
ConnectionTypeDTO? connectionType) → ConnectionType? -
dtoToAppNotification(
NotificationDTO notification) → AppNotification? -
dtoToCoolingType(
CoolingTypeDTO? coolingType) → CoolingType? -
dtoToDealerOrg(
DealerOrgDTO? dealerOrg) → DealerOrg? -
dtoToDevice(
DeviceDTO device) → Device -
dtoToDeviceAddress(
AddressDTO? address) → DeviceAddress -
dtoToDeviceStatus(
DeviceStatusDTO? status) → DeviceStatus? -
dtoToEventLog(
DateTime currentDateTime, DeviceDetailsDTO details, List< AlertDTO> alerts, List<EventDTO> events) → EventLog -
dtoToExerciseFrequency(
ExerciseFrequencyDTO? exerciseFrequency) → ExerciseFrequency? -
dtoToExerciseMode(
ExerciseModeDTO? exerciseMode) → ExerciseMode? -
dtoToFuelType(
FuelTypeDTO? fuelType) → FuelType? -
dtoToGeneratorDetails(
DeviceDetailsDTO deviceDetailsDTO) → GeneratorDetails -
dtoToLoadShed(
PeripheralDTO? peripheral) → LoadShed -
dtoToMaintenanceDetails(
DeviceDetailsDTO details, List< MaintenanceNoteDTO> ? notes) → MaintenanceDetails - Converts the list of parameters and maintenance notes from the backend into a MaintenanceDetails object that can be used by the frontend.
-
dtoToMaintenanceNote(
MaintenanceNoteDTO response) → MaintenanceNote -
dtoToPim(
PeripheralDTO? peripheral) → PIM -
dtoToPowerSource(
PowerSourceDTO? powerSource) → PowerSource -
dtoToResetFaultsValidation(
DeviceDetailsDTO details, List< TimelineItem> activeAlerts) → ResetFaultsValidation -
dtoToServiceAgreementTerm(
ServiceAgreementTermDTO? serviceAgreementTerm) → ServiceAgreementTerm? -
dtoToSwitchState(
SwitchStateDTO? switchState) → SwitchState? -
dtoToTrendData(
List< TrendValueDTO> response, GeneratorTrend trend) → GeneratorTrendData - Maps historical parameter values from the Clean energy API into Generator trend data that can be used by the generator trends page.
-
encodePath(
String template, {Map< String, String> ? pathMap, Map<String, String> ? params}) → String - Create a path string from the provided template, path mappings, and parameters.
-
encodeQueryParameters(
Map< String, String> params) → String? -
Based on documentation from the
url_launcherpackage -
eventDtoToTimelineItem(
EventDTO alert) → TimelineItem -
exerciseFrequencyToScheduleApi(
ExerciseFrequency? frequency) → ExerciseScheduleFrequencyDTO? -
Returns the
ExerciseScheduleFrequencyDTOfor the given exercise frequency. -
exerciseModeToScheduleApi(
ExerciseMode? mode) → ExerciseScheduleModeDTO? -
Returns the
ExerciseScheduleModeDTOfor the given exercise mode. -
exerciseModeToStartApi(
ExerciseMode? mode) → StartExerciseModeDTO? -
Returns the
ExerciseStartModeV2for the given exercise mode. -
fahrenheitToCelsius(
double fahrenheit) → double -
fallbackExerciseMode(
GeneratorDetails details) → ExerciseMode - Returns the fallback exercise mode for the device represented by the given generator details.
-
fcmToAppNotification(
RemoteMessage fcmMessage) → AppNotification? - Maps a firebase remote message to a AppNotification
-
filterTimeline(
List< TimelineItem> timeline, String? filterText, DateTimeRange? filterDateRange, List<AppEventFilterType> ? selectedFilters) → List<TimelineItem> - Returns the given list of timeline items, but filtered to only include the given filter text and date range.
-
foregroundColorFor(
Color background, {required BuildContext context}) → Color - Returns an appropriate foreground color for the given background color.
-
fullRefreshEventLog(
BuildContext context, int id) → Future< void> - Refresh the event log of the device with the given ID
-
fullRefreshGeneratorDetails(
BuildContext context, int deviceId, {required bool awaitDeviceListRefresh}) → Future< void> -
fullRefreshGeneratorDetailsApi(
BuildContext context, int id, {bool awaitDeviceListRefresh = false}) → Future< void> - Fully refresh the generator details of the device with the given id using the underlying backend API calls
-
getAndroidChannel(
AppNotificationType type) → AndroidNotificationChannel -
getDeviceId(
) → Future< String?> -
getParamText(
GetGeneratorDetailResponseModel response, int piid) → String? -
Returns the display value of the parameter matching the given
piidwithin the response's list of parameters. -
getParamValue(
GetGeneratorDetailResponseModel response, int piid) → double? -
Returns the numerical value of the parameter matching the given
piidwithin the response's list of parameters. -
getParamValueAsText(
GetGeneratorDetailResponseModel response, int piid) → String? -
Returns the raw value of the parameter matching the given
piidwithin the response's list of parameters, as a string. -
isDateInputKeyboardMissingSeparatorCharacters(
BuildContext context) → Future< bool> - Returns whether the date input keyboard is missing separator characters such as '/', which prevents the user from entering dates correctly.
-
isTokenTimeIssue(
Object error) → bool - Returns whether the given error object is a token error that occurred due to the user's incorrect device clock.
-
launchCustomTab(
String urlString, {required BuildContext context, Color? appBarColor, CustomTabsOptions? customTabsOption, SafariViewControllerOptions? safariVCOption}) → Future< void> - Open the given URL in a 'Custom Tab', which is a window provided by browser developers to display web pages in a view that looks integrated with the rest of the app.
-
loadMoreNotificationsApi(
BuildContext context) → Future< bool> - Load more of the currently logged-in user's notifications
-
localizeConnectionType(
BuildContext context, ConnectionType? connectionType) → String? -
localizeExerciseFrequency(
BuildContext context, ExerciseFrequency? frequency) → String - Localize the given exercise frequency into text that can be displayed to the user
-
localizeExerciseMode(
BuildContext context, ExerciseMode? mode) → String - Localize the given exercise mode into text that can be displayed to the user
-
localizeHz(
double? hz) → String? -
localizePercent(
double? percent, {int digits = 1}) → String? -
localizePsi(
double? psi) → String? -
localizeRevPerMin(
double? rpm) → String? -
localizeTempF(
double? fahrenheit) → String? -
localizeVolts(
double? volts) → String? -
localizeWatts(
double? watts) → String? -
mergeAsyncValues<
T, A, B> (AsyncValue< A> a, AsyncValue<B> b, MergeAsyncValueCallback<T, A, B> combine) → AsyncValue<T> - Merge two AsyncValues together, combining them into one value if both have data.
-
mergeAsyncValues3<
R, A, B, C> (AsyncValue< A> a, AsyncValue<B> b, AsyncValue<C> c, R callback(A, B, C)) → AsyncValue<R> -
Merges three async values into one async value using the provided
callbackfunction. -
mergeAsyncValues4<
R, A, B, C, D> (AsyncValue< A> a, AsyncValue<B> b, AsyncValue<C> c, AsyncValue<D> d, R callback(A, B, C, D)) → AsyncValue<R> -
Merges four async values into one async value using the provided
callbackfunction. -
mergeAsyncValues5<
R, A, B, C, D, E> (AsyncValue< A> a, AsyncValue<B> b, AsyncValue<C> c, AsyncValue<D> d, AsyncValue<E> e, R callback(A, B, C, D, E)) → AsyncValue<R> -
Merges five async values into one async value using the provided
callbackfunction. -
mergeAsyncValues6<
R, A, B, C, D, E, F> (AsyncValue< A> a, AsyncValue<B> b, AsyncValue<C> c, AsyncValue<D> d, AsyncValue<E> e, AsyncValue<F> f, R callback(A, B, C, D, E, F)) → AsyncValue<R> -
Merges six async values into one async value using the provided
callbackfunction. -
mergeAsyncValues7<
R, A, B, C, D, E, F, G> (AsyncValue< A> a, AsyncValue<B> b, AsyncValue<C> c, AsyncValue<D> d, AsyncValue<E> e, AsyncValue<F> f, AsyncValue<G> g, R callback(A, B, C, D, E, F, G)) → AsyncValue<R> -
Merges seven async values into one async value using the provided
callbackfunction. -
mergeAsyncValues8<
R, A, B, C, D, E, F, G, H> (AsyncValue< A> a, AsyncValue<B> b, AsyncValue<C> c, AsyncValue<D> d, AsyncValue<E> e, AsyncValue<F> f, AsyncValue<G> g, AsyncValue<H> h, R callback(A, B, C, D, E, F, G, H)) → AsyncValue<R> -
Merges eight async values into one async value using the provided
callbackfunction. -
mergeAsyncValues9<
R, A, B, C, D, E, F, G, H, I> (AsyncValue< A> a, AsyncValue<B> b, AsyncValue<C> c, AsyncValue<D> d, AsyncValue<E> e, AsyncValue<F> f, AsyncValue<G> g, AsyncValue<H> h, AsyncValue<I> i, R callback(A, B, C, D, E, F, G, H, I)) → AsyncValue<R> -
Merges nine async values into one async value using the provided
callbackfunction. -
normalizeDateFromController(
DateTime? date, DateTime? controllerTime, DateTime currentTime) → DateTime? -
Normalizes the given
datefrom the controller into the user's local time, based on the difference between thecontrollerTimeand thecurrentTime. -
normalizeSecondsFromController(
num? secondsSinceEpoch, DateTime? controllerTime, DateTime currentTime) → DateTime? - Returns a normalized date time from the controller based on the given number representing the seconds since epoch (from the controller POV).
-
notifyExercisePending(
BuildContext context, int id, ExerciseMode exerciseMode, {VoidCallback? onTimeout}) → void - Notify the pending exercise notifier of any incoming pending exercises.
-
openStoreUrl(
BuildContext context, String iOSUrlString, String androidUrlString) → Future< void> -
refreshEventLog(
BuildContext context, int id) → Future< void> - Refresh the event log of the device with the given ID
-
refreshGeneratorDetailsApi(
BuildContext context, int id, {bool awaitDeviceListRefresh = false}) → Future< void> - Refresh the generator details of the device with the given id using the underlying backend API calls
-
refreshMaintenanceDetails(
BuildContext context, int id) → Future< void> - Refresh the maintenance details of the device with the given id
-
refreshNotificationsApi(
BuildContext context) → Future< void> - Refresh the currently logged-in user's notifications
-
refreshTrendData(
BuildContext context, TrendDataArgs args) → Future< void> - Refresh the trend data for the device with the given id
-
resetFaultsApi(
{required BuildContext context, required int id}) → Future< void> - Reset (i.e. clear) the faults (i.e. shutdown alerts) on the generator with the given id, using the underlying backend API calls
-
responseToEnums(
Response response) → List< String> - Maps chopper responses from Web API enums to their corresponding values (if successful). Throws if the response is an error.
-
responseToNullableValue<
Value> (Response< Value> response) → Value - Maps chopper responses to their corresponding values (if successful). Throws if the response is an error.
-
responseToValue<
Value extends Object> (Response< Value?> response) → Value - Maps chopper responses to their corresponding values (if successful). Throws if the response is an error.
-
rotationTransitionBuilder(
{double enterStartTurns = -0.5, double exitEndTurns = 0.5, Alignment alignment = Alignment.center}) → AnimatedSwitcherTransitionBuilder - Builds a transition that adjusts the rotation and opacity of the child.
-
saveMaintenanceNote(
{required BuildContext context, required int deviceId, required String contents}) → Future< void> - Saves a maintenance note with the given contents under the given device.
-
scheduleExerciseApi(
{required BuildContext context, required int id, ExerciseFrequency? frequency, DateTime? nextStart, ExerciseMode? mode, Duration? duration}) → Future< void> - Update the schedule of future remote exercises on the generator with the given id using the underlying backend API calls
-
serviceAgreementTermToDTO(
ServiceAgreementTerm? term) → ServiceAgreementTermDTO? -
setUpFakePreferences(
Map< String, Object> data) → Future<FakeSharedPreferencesStore> - Resets all shared preference-related singletons and injects the given map of data as the initial stored data within shared preferences.
-
setUpFirebaseIntegrationTest(
{FirebaseMessagingPlatform? firebaseMessaging, FlutterLocalNotificationsPlatform? flutterLocalNotifications, FirebaseOptions? releaseOptions}) → void - Setup function which can be called inside an integration test group to setup all the requirements needed for an integration test to run an app with Firebase notifications.
-
setupFirebaseMessagingMocks(
) → MockFirebaseMessaging - Create and set-up firebase messaging mocks
-
setUpHttpOverrides(
) → void - Set up http-override specific fakes
-
setUpPlatformInterfaceMocks(
) → void - Sets up common platform interface mocks / fakes
-
showAddressValidationDialog(
{required BuildContext context, required String? inputAddress}) → Future< DeviceAddress?> - Show an AddressValidationDialog that will allow the user to pick a valid address, using the given input address to find relevant suggestions.
-
showAppAboutDialog(
BuildContext context, {Uri? appStoreUri, Uri? contactUrl, Uri? feedbackUrl}) → Future< void> - Displays an AppAboutDialog
-
showAppFeedbackAsNotSatisfiedDialog(
BuildContext context, {required bool isHomeOwner}) → Future< void> -
showAppFeedbackDialog(
BuildContext context, String iOSUrlString, String androidUrlString, {required bool isHomeOwner}) → Future< void> -
showAppFeedbackStarRatingDialog(
BuildContext context, String iOSUrlString, String androidUrlString, {required bool isHomeOwner}) → Future< void> -
showAppFeedbackSubmissionDialog(
{required BuildContext context, required bool isMoreThanThreeRates, required double selectedStartCount, required bool isHomeOwner}) → Future< void> -
showAppFeedbackSubmitedDialog(
BuildContext context) → Future< void> -
showAuthIssueDialog(
{required BuildContext context}) → Future< AuthIssueAction?> - Show an AuthIssueDialog.
-
showConnectionTypeInfoDialog(
BuildContext context, {Color? infoTileColor, String? popupStatusString, String? thisDataPlanPopUpString, required String bodyText}) → void -
showControllerDateTimeDialog(
{required BuildContext context, required int deviceId, required DateTime? initialDateTime}) → Future< void> - Shows a dialog that allows the user to set the date and time of a generator controller
-
showDeveloperOptions(
{required BuildContext context, required AsyncCallback? onResetDeveloperOptions, ChildrenConsumerBuilder? children}) → Future< void> - Show the developer options bottom sheet
-
showDurationPicker(
{required BuildContext context, required Duration initialDuration, Widget? title, Duration? minDuration, Duration? maxDuration}) → Future< Duration?> - Shows a duration picker dialog to let the user pick a Duration value.
-
showInAppNotification(
BuildContext context, InAppNotification notification) → void - Show an in-app notification as a banner on top of the screen
-
showMapAddressPicker(
{required BuildContext context, required LatLng? initialLocation}) → Future< DeviceAddress?> - Shows a new page that allows the user to pick an address using a map.
-
showPagedDialog<
T, P> ({Key? pagedDialogKey, required BuildContext context, required P initialPage, required ParentPageCallback< P> parentPageCallback, PageDismissibleCallback<P> ? isPageDismissible, required OptionalPageBuilder<P> titleBuilder, required PageBuilder<P> contentBuilder, bool barrierDismissible = true}) → Future<T?> - Show a PagedDialog which can display different titles and content corresponding to different dialog "pages".
-
showPeripheralNameChangeDialog(
{required BuildContext context, required int deviceId, required int definitionId, required String entry, required Widget title, required Iterable< String> existingNames}) → Future<void> - Show the peripheral name change dialog
-
showRemoteExerciseDialog(
{required BuildContext context, required int deviceId}) → Future< void> - Shows a dialog with various options for remotely starting an exercise as well as controlling the exercise schedule of a device.
-
showResetFaultsDialog(
{required BuildContext context, required int deviceId}) → Future< void> - Show the reset faults dialog, which will allow users to reset the shutdown faults of the device with the given ID.
-
showResetFaultsTimerMessageDialog(
BuildContext context) → Future< void> - Show a message that explains the reset fault timer which prevents users from resetting faults remotely right after a fault occurred.
-
showStopExerciseDialog(
{required BuildContext context, required int deviceId}) → Future< void> - Shows a dialog asking the user to confirm whether to stop a currently running exercise.
-
showSystemAppNotification(
ProviderContainer container, SystemAppNotification notification) → Future< void> - Show a system-level app notification in the user's system tray.
-
showTokenTimeIssueDialog(
{required BuildContext context, bool includeRetryAction = true}) → Future< TokenErrorAction?> - Show a TokenTimeIssueDialog, which explains that a token issue occurred due to the user's incorrect device clock.
-
showWebViewPage(
{required BuildContext context, required Uri initialUrl, WebViewActionsBuilder? actions}) → Future< void> - Show a page displaying a web view.
-
sizeScaleTransitionBuilder(
{Tween< Offset> ? sizeTween, Alignment sizeAlignment = Alignment.center, Alignment scaleAlignment = Alignment.center, Clip clipBehavior = Clip.hardEdge}) → AnimatedSwitcherTransitionBuilder - Builds a transition that adjusts the size, scale, and opacity of the child.
-
sizeTransitionBuilder(
{Tween< Offset> ? sizeTween, Alignment sizeAlignment = Alignment.center, Clip clipBehavior = Clip.hardEdge}) → AnimatedSwitcherTransitionBuilder - Builds a transition that adjusts the size and opacity of the child.
-
stackLayoutBuilder(
{Alignment alignment = Alignment.center, TextDirection? textDirection, StackFit fit = StackFit.loose, Clip clipBehavior = Clip.hardEdge}) → AnimatedSwitcherLayoutBuilder - Layout builder for AnimatedSwitcher based on a Stack, with arguments for customizing the layout.
-
startExerciseApi(
{required BuildContext context, required int id, ExerciseMode? mode}) → Future< void> - Start a remote exercise on the generator with the given id using the underlying backend API calls
-
stopExerciseApi(
{required BuildContext context, required int id}) → Future< void> - Stop a remote exercise on the generator with the given id using the underlying backend API calls
-
supportedExerciseModes(
GeneratorDetails details) → List< ExerciseMode> - Returns the supported running exercise modes for the device represented by the given generator details.
-
supportsEcoCycleMode(
String? modelNumber) → bool - Whether a generator with the given model number supports the ExerciseMode.ecoCycle exercise mode.
-
supportsMonthlyExerciseFrequency(
String? modelNumber) → bool - Whether a generator with the given model number supports the ExerciseFrequency.monthly frequency.
-
supportsUnloadedExerciseModes(
String? modelNumber) → bool - Whether a generator with the given model number supports the ExerciseMode.unloaded and ExerciseMode.unloadedFullSpeed exercise modes.
-
timeSpanToTimeSince(
TrendTimeArg timeSpan, DateTime currentTime) → DateTime? - Converts a time span argument and current time into a time since argument into an Energy management API time since parameter.
-
translateTransitionBuilder(
{double magnitude = 1.0, TextDirection? horizDirection, VerticalDirection? vertDirection = VerticalDirection.up}) → AnimatedSwitcherTransitionBuilder - Builds a transition that slides and fades in / out the child.
-
trendDataArgsToApiArgs(
TrendDataArgs args) → TrendApiArgs - Maps arguments for domain model trend data to its equivalent API arguments
-
trendToApiPathParam(
GeneratorTrend trend) → TrendPathParam - Maps a GeneratorTrend to a corresponding trend path param on the backend energy management API.
-
tryDecodePathMap(
{required String path, required String template}) → Map< String, String> ? -
Decode the path map values from the given path, based on the provided
template, but returns
nullif the path map values cannot be decoded. -
tryLocalizeDuration(
int? seconds) → String? - Parses the given int as a duration of seconds and returns a localized string representing the duration.
-
updateDeviceApi(
{required BuildContext context, required int deviceId, String? displayName, DeviceAddress? deviceAddress, ConnectionTypeDTO? connectionType}) → Future< void> - Update a device's details with the given display name and device address
-
updateHomeownerConsentApi(
{required BuildContext context, required int deviceId, required List< Point> ? signaturePoints, required bool sendHomeownerEmail, required String homeownerEmail}) → Future<void> - Update the homeowner consent details of a device
-
updatePeripheralNameApi(
{required BuildContext context, required int deviceId, required int definitionId, required String name}) → Future< void> -
updateServiceAgreementApi(
{required BuildContext context, required int deviceId, required ServiceAgreementFormData data}) → Future< void> - Update a device's service agreement details
Typedefs
- ActionCallback = void Function(AppNotificationAction action)
-
AnimatedEntranceTransitionBuilder
= Widget Function(Widget child, Animation<
double> animation, double distanceFactor) - AppBarWidgetBuilder = Widget Function(BuildContext context, PreferredSizeWidget appBar, Widget? child)
-
AsyncValueWidgetBuilder<
T> = Widget Function(BuildContext context, T data, Object? error, bool isLoading) -
AuthHeaderCallback
= Future<
MapEntry< Function()String, String> ?> -
ChildrenConsumerBuilder
= List<
Widget> Function(BuildContext context, WidgetRef ref) - CountdownTextBuilder = CountdownText Function(DateTime currentTime)
-
DeleteExerciseScheduleUseCase
= Future<
void> Function({required BuildContext context, required int id}) - Use case for deleting an exercise schedule on a device
- ErrorCallback = void Function(Object error, StackTrace stackTrace)
-
ErrorHandler
= FutureOr<
Request?> Function(Request request, Response response, [Request? originalRequest]) - GeneratorDetailsBuilder = Widget Function(BuildContext context, EventLog eventLog)
-
JsonToActionConverter
= AppNotificationAction? Function(Map<
String, dynamic> json) -
LabelWidgetCallback<
T extends Comparable> = Widget Function(T? value) -
LoadMoreNotificationsUseCase
= Future<
bool> Function(BuildContext context) - Use case for loading more of the logged-in user's notifications
- LocalizeNotificationType = String Function(BuildContext context, AppNotificationType notificationType)
- LocationCallback = void Function(LatLng latLong)
-
MapCallback<
T, R> = R Function(T value) -
MatchCallback<
T> = T Function(Map< String, String> pathMap, Map<String, String> params) -
MergeAsyncValueCallback<
T, A, B> = T Function(A a, B b) -
NestedDidRemovePageCallback<
T> = void Function(T key, Page< Object?> page) -
NestedTransitionBuilder
= Widget Function(BuildContext context, Animation<
double> primaryAnimation, Animation<double> secondaryAnimation, Widget child) - NotificationTimestampUseCase = DateTime? Function(AppNotification notification)
-
NullableValueWidgetBuilder<
T> = Widget? Function(BuildContext context, T value, Widget? child) -
OnActionCallback<
T> = Future< T> Function() - OnIconMenuTap = bool? Function()
-
OptionalPageBuilder<
P> = Widget? Function(BuildContext context, P page, PageChangeCallback< P> setPage) -
PageBuilder<
P> = Widget Function(BuildContext context, P page, PageChangeCallback< P> setPage) -
PageChangeCallback<
P> = void Function(P page) -
PageDismissibleCallback<
P> = bool Function(BuildContext context, P page) -
PageListBuilder
= List<
Page> Function(BuildContext context) -
ParentPageCallback<
P> = P? Function(P page) -
RefreshCachedDevicesUseCase
= Future<
void> Function(BuildContext context) - Use case for refreshing currently logged-in user's devices
-
RefreshGeneratorDetailsUseCase
= Future<
void> Function(BuildContext context, int deviceId, {bool awaitDeviceListRefresh}) - Use case for refreshing the generator details of a device
-
RefreshNotificationsUseCase
= Future<
void> Function(BuildContext context) - Use case for refreshing currently logged-in user's notifications
-
RemoteMessageHandler
= Future<
void> Function(RemoteMessage message) -
ResetFaultsUseCase
= Future<
void> Function({required BuildContext context, required int id}) - Use case for resetting faults (i.e. shutdown alerts)
-
RestorationScopeIdCallback<
T> = String? Function(T key) -
ScheduleExerciseUseCase
= Future<
void> Function({required BuildContext context, Duration? duration, ExerciseFrequency? frequency, required int id, ExerciseMode? mode, DateTime? nextStart}) - Use case for updating an exercise schedule on a device
- ScrollViewBuilder = Widget Function(BuildContext context, Widget refreshSliver)
-
SelectValue<
T> = Future< T> Function() -
SpinActionSelect<
T extends Comparable> = T Function() -
StartExerciseUseCase
= Future<
void> Function({required BuildContext context, required int id, ExerciseMode? mode}) - Use case for starting a remote exercise
-
StopExerciseUseCase
= Future<
void> Function({required BuildContext context, required int id}) - Use case for stopping a remote exercise
-
SubmitFeedbackSubmissionUseCase
= Future<
int?> Function(FeedbackSubmissionV3Body data) -
SuccessCallback<
T> = void Function(T value) -
UpdateDeviceUseCase
= Future<
void> Function({ConnectionTypeDTO? connectionType, required BuildContext context, DeviceAddress? deviceAddress, required int deviceId, String? displayName}) - Use case for updating a device with a new display name or address
-
UpdateHomeownerConsentUseCase
= Future<
void> Function({required BuildContext context, required int deviceId, required String homeownerEmail, required bool sendHomeownerEmail, required List<Point> ? signaturePoints}) - Use case for updating the homeowner consent of a device
-
UpdatePeripheralNameUseCase
= Future<
void> Function({required BuildContext context, required int definitionId, required int deviceId, required String name}) -
UpdateServiceAgreementUseCase
= Future<
void> Function({required BuildContext context, required ServiceAgreementFormData data, required int deviceId}) - Use case for updating the service agreement details of a device
-
WebViewActionsBuilder
= List<
Widget> Function(BuildContext context, WebViewNotifier notifier) - WebViewNotifierChildBuilder = Widget Function(BuildContext context, WebViewNotifier notifier, InAppWebViewSettings initialSettings)
Exceptions / Errors
- CombinedAsyncException
- Exception that consists of a combination of several other exceptions.
- EnvVersionError
- Exception that is thrown if the current user does not have access to a device with the given id.
- UnimplementedCachedDevicesError
- Exception that is thrown if cachedDevicesProvider or refreshCachedDevicesProvider has not been overriden.