afya_moja_core library
Classes
- AudioContent
- AudioPositionData
- CarouselSlider
- CheckBoxComponent
- CommunityListItem
- List items used within the coummunity page to show incoming messages.
- Contact
- Content
- ContentCategory
- ContentDetails
- ContentDetailWidget
- ContentItem
- ContentItem Displays the feed isNew renders the new tag
- ContentMetadata
- CreateNewPINWidget
-
CreateNewPINPage
has two CustomTextField to create new user PIN - CustomConfirmDialog
- CustomTextField
- A wrapper for TextFormField that contains options for a field label.
- DatePickerField
- EditInformationDropDown
- ExpandableQuestion
- ExpandableQuestion
- ExtraData
- FAQContent
- FAQsContentState
- FeaturedMedia
- FeedContent
- FeedItems
- GalleryImage
- GalleryImageWidget
- GenericErrorWidget
-
GenericErrorWidget is a generic used to purposefully communicate that
the value of the data received from the API was
null
or it missed key properties that are of a valid response. Because of it;s generic natures, this widget handles the following types of error defined under GenericNoDataTypes enum - GroupMember
- GroupMemberBadge
- GroupMemberItem
- HeroImage
- IconDetails
- InformationListCard
- LeadingGraphicWidget
- ListContentCategory
- LoginCounterWidget
- LoginErrorWidget
- ManagedClient
- ManagedClients
- ManagedClientsResponse
- Member
- MemberListActionsDialog
- MyAfyaHubCountryPicker
-
MyAfyaHubCountryPicker is used in
MyAfyaHubPhoneLoginPage
select Country Code - MyAfyaHubNoBorderButton
- MyAfyaHubPhoneInput
- MyAfyaHubPhoneInput is a shared widget to input user phone number and country code
- MyAfyaHubPrimaryButton
- Name
-
Name value object is a generic object that should be used to hold instances of
names
A use case would befirstName
, orlastName
oruserName
- NotificationActionInfo
- NotificationActions
- NotificationDetails
- NotificationFilter
- NotificationListItem
- NotificationListItem Displays the notifications with Icons and a short description
- OnboardingPathConfig
- OnboardingScaffold
- OnboardingScaffold a scaffold used during the onboarding process
- OnboardingScaffoldHeader
- OnboardingScaffoldHeader header on the onboarding scaffold
- PhoneNumber
- PINInputField
- PINInputField is a shared widget to input authentication PIN
- PINRequestScaffold
- PlatformLoader
- ProcessedResponse
- A blueprint for the data returned after processing a response from an unauthenticated endpoint
- ReactionItem
- RecordSecurityQuestionResponse
- RecordSecurityQuestionResponsesData
- RespondedSecurityQuestionsData
- ResponsiveWidget
- Refer to https://gitlab.slade360emr.com/optimalhealth/healthcloud/-/merge_requests/355/diffs if you want to introduce medium screen in future Widget that draws depending on screen size as specified by the breakpoints.
- Role
- SearchWidget
- SecurityQuestion
- SecurityQuestionResponse
- SecurityQuestionsData
- SelectOptionField
- SizeReportingWidget
- UserData
- UserProfileItem
- UserProfileItem Displays the user profile item with Icons and a title
- VerifyOTPInput
- VerifyOTPInput is a shared widget to input authentication PIN
- VerifySecurityQuestionData
- WorkStationDetails
Enums
- CaregiverType
- ContactType
- The type of contact being used
- ContentDisplayedType
- ContentType
- The type of content being served to the user
- Country
- DeviceScreensType
- EditInformationInputType
- FeaturedMediaType
- Flavour
- Flavour
- Gender
- GenericNoDataTypes
- NotificationType
- RoleValue
- SecurityQuestionResponseType
- Security Questions response type
- UserType
Extensions
- CaregiverTypeEx on CaregiverType
- FlavourEx on Flavour
- FlavourEx extends Flavour enum to get the values as strings
- GenderEx on Gender
- NotificationTypeEx on NotificationType
- RoleName on RoleValue
- SecurityQuestionResponseTypeEx on SecurityQuestionResponseType
- SecurityQuestionResponseTypeEx extends SecurityQuestionResponseType enum to get the values as strings
- UserTypeEx on UserType
Constants
- bannedColor → const Color
- blackColor → const Color
- darkGreyTextColor → const Color
- galleryColor → const Color
- greenColor → const Color
- greenHappyColor → const Color
- greyTextColor → const Color
- lightGrey → const Color
- lightGreyBackgroundColor → const Color
- lightRedColor → const Color
- malachiteColor → const Color
- myAfyaHubSecondaryColor → const Color
- readTimeBackgroundColor → const Color
- redColor → const Color
- subtitleGrey → const Color
- UNKNOWN → const String
- userDetailsCardBackgroundColor → const Color
- userInitialsColor → const Color
- warningColor → const Color
- whiteColor → const Color
Properties
- americanPhoneRegExp → RegExp
-
final
- current → DateTime
-
final
- currentDay → int
-
final
- currentMonth → int
-
final
- currentYear → int
-
final
- eligibleFutureYear → int
-
final
- eligibleYear → DateTime
-
final
- extremelyLargeVerticalSizedBox ↔ SizedBox
-
getter/setter pair
- extremelySmallVerticalSizedBox ↔ SizedBox
-
vertical sized boxes
getter/setter pair
- genericInternationalRegExp → RegExp
-
final
- kenyanPhoneRegExp → RegExp
-
final
- largeHorizontalSizedBox ↔ SizedBox
-
getter/setter pair
- largeVerticalSizedBox ↔ SizedBox
-
getter/setter pair
- mediumHorizontalSizedBox ↔ SizedBox
-
getter/setter pair
- mediumVerticalSizedBox ↔ SizedBox
-
getter/setter pair
- oldestYear → int
-
final
- size100VerticalSizedBox ↔ SizedBox
-
getter/setter pair
- size120VerticalSizedBox ↔ SizedBox
-
getter/setter pair
- size15HorizontalSizedBox ↔ SizedBox
-
getter/setter pair
- size15VerticalSizedBox ↔ SizedBox
-
getter/setter pair
- size40VerticalSizedBox ↔ SizedBox
-
getter/setter pair
- size70VerticalSizedBox ↔ SizedBox
-
getter/setter pair
- smallHorizontalSizedBox ↔ SizedBox
-
getter/setter pair
- smallVerticalSizedBox ↔ SizedBox
-
getter/setter pair
- unitedKingdomRegExp → RegExp
-
final
-
validPrefixes
→ List<
String> -
final
- veryLargeHorizontalSizedBox ↔ SizedBox
-
getter/setter pair
- veryLargeVerticalSizedBox ↔ SizedBox
-
getter/setter pair
- verySmallHorizontalSizedBox ↔ SizedBox
-
getter/setter pair
- verySmallVerticalSizedBox ↔ SizedBox
-
getter/setter pair
Functions
-
alignLabelWithHint(
int? maxLines) → bool -
audioTime(
int duration) → String -
boldSize12Text(
[Color? color]) → TextStyle -
boldSize13Text(
[Color? color]) → TextStyle -
boldSize14Text(
[Color? color]) → TextStyle -
boldSize15Text(
[Color? color]) → TextStyle -
boldSize16Text(
[Color? color]) → TextStyle -
boldSize18Text(
[Color? color]) → TextStyle -
boldSize20Text(
[Color? color]) → TextStyle -
boldSize22Text(
[Color? color]) → TextStyle -
boldSize24Text(
[Color? color]) → TextStyle -
boldSize26Title(
[Color? color]) → TextStyle -
boldSize30Text(
[Color? color]) → TextStyle -
boldSize45Text(
[Color? color]) → TextStyle -
cccNumberValidator(
dynamic val) → String? -
contentAudioVideoDuration(
int duration) → String -
contentReadDuration(
int duration) → String -
customRoundedPinBoxDecoration(
Color borderColor, Color pinBoxColor, {double borderWidth = 1.0, double? radius}) → BoxDecoration -
dismissSnackBar(
String text, Color color, BuildContext context) → SnackBarAction -
Dismiss snackbar
-
extractErrorCode(
Map< String, dynamic> ? body) → int -
extractNamesInitials(
{required String name}) → String - extractNamesInitials => Extracts name initials from a name
-
formatDate(
String date, {bool showTime = false}) → String -
formatPhoneNumber(
{required String countryCode, required String phoneNumber}) → String -
genderFromJson(
String? genderString) → Gender -
genderToJson(
Gender? gender) → String -
genericFetchFunction(
{required StreamController streamController, required BuildContext context, required String queryString, required Map< String, dynamic> variables, required String logTitle, String? logDescription}) → Future -
Generic Fetch Function
a generic fetch function for fetching all the problems, allergies medications, tests and diagnoses for the current patient in an episode -
getDeviceType(
BuildContext context) → DeviceScreensType - getDeviceType
-
getErrorMessage(
[String message = '']) → String -
getGreetingMessage(
String? firstName, {int? currentHour}) → String - getGreetingMessage gets the current time of day and determines which type of greetings to show to the user
-
getTokenExpiryTimestamp(
String? expiresIn) → DateTime - expiresIn is in seconds
-
getUserFriendlyMsg(
int code) → String -
handleNotification(
RemoteMessage message, StreamChatClient chatClient) → Future< void> -
hasTokenExpired(
DateTime expiresAt, DateTime now) → bool - Checks if token has expired based on expiry date returns true if token expires in 10 minutes or less otherwise returns false
-
headsUpNotification(
String? title, String? body) → OverlaySupportEntry -
heavySize10Text(
[Color? color]) → TextStyle -
heavySize11Text(
[Color? color]) → TextStyle -
heavySize12Text(
[Color? color]) → TextStyle -
heavySize14Text(
[Color? color]) → TextStyle -
heavySize16Text(
[Color? color]) → TextStyle -
heavySize18Text(
[Color? color]) → TextStyle -
heavySize20Text(
[Color? color]) → TextStyle -
heavySize24Text(
[Color? color]) → TextStyle -
heavySize26Text(
[Color? color]) → TextStyle -
heavySize28Text(
[Color? color]) → TextStyle -
heavySize50Text(
[Color? color]) → TextStyle -
humanizeDate(
{required TextStyle dateTextStyle, required String loadedDate, bool showTime = false, bool showYear = true}) → Widget -
isNumeric(
String? s) → bool -
isValidPhoneNumber(
String phone) → bool -
isValidPhoneNumber checks if a number is either a
Kenyan
,American
,UK
orBelgium
phone number -
lightSize16Text(
[Color? color]) → TextStyle -
mediumSize14Text(
[Color? color]) → TextStyle -
mediumSize20Text(
[Color? color]) → TextStyle -
mediumSize22Text(
[Color? color]) → TextStyle -
mediumSize24Text(
[Color? color]) → TextStyle -
newChatMessageTitle(
String? username, String? channelName) → String -
normalSize10Text(
[Color? color]) → TextStyle -
normalSize11Text(
[Color? color]) → TextStyle -
normalSize12Text(
[Color? color]) → TextStyle -
normalSize13Text(
[Color? color]) → TextStyle -
normalSize14Text(
[Color? color]) → TextStyle -
normalSize15Text(
[Color? color]) → TextStyle -
normalSize16Text(
[Color? color]) → TextStyle -
normalSize17Text(
[Color? color]) → TextStyle -
normalSize18Text(
[Color? color]) → TextStyle -
normalSize20Text(
[Color? color]) → TextStyle -
normalSize22Text(
[Color? color]) → TextStyle -
normalSize24Text(
[Color? color]) → TextStyle -
normalSize26Text(
[Color? color]) → TextStyle -
normalSize28Text(
[Color? color]) → TextStyle -
normalSize32Text(
[Color? color]) → TextStyle -
normalSize34Text(
[Color? color]) → TextStyle -
normalSize9Text(
[Color? color]) → TextStyle -
parseError(
Map< String, dynamic> ? body) → String? -
processHttpResponse(
Response response) → ProcessedResponse -
removeUnderscores(
String sentence) → String - removeUnderscores removes underscores from a sentence
-
roleValueFromJson(
String? roleString) → RoleValue -
setupLocalNotifications(
) → Future< FlutterLocalNotificationsPlugin> -
snackbar(
{required dynamic content, int durationSeconds = 10, String? label, Function? callback}) → SnackBar - snackbar
-
summarizeDate(
String loadedDate) → String -
titleCase(
String sentence) → String - titleCase returns a title cased sentence
-
userPinValidator(
dynamic val) → String? -
validateKenyanNumber(
String phone) → bool - validateKenyanNumber checks if a number is either has either prefix of '+254111', '+254110', '+254100', '+2540101', '+254102' or '+2547xx'
-
validatePhoneNumber(
String input) → Either< ValueObjectFailure< String> , String> -
veryBoldSize14Text(
[Color? color]) → TextStyle -
veryBoldSize15Text(
[Color? color]) → TextStyle -
veryBoldSize16Text(
[Color? color]) → TextStyle -
veryBoldSize17Text(
[Color? color]) → TextStyle -
veryBoldSize18Text(
[Color? color]) → TextStyle -
veryBoldSize20Text(
[Color? color]) → TextStyle -
veryBoldSize22Text(
[Color? color]) → TextStyle -
veryBoldSize28Text(
[Color? color]) → TextStyle -
veryBoldSize32Text(
[Color? color]) → TextStyle -
veryHeavySize12Text(
[Color? color]) → TextStyle -
veryHeavySize14Text(
[Color? color]) → TextStyle -
veryHeavySize20Text(
[Color? color]) → TextStyle