ap_common library

Classes

AboutUsPage
AboutUsPageState
ActiveNotification
Details of an active notification.
Add2Calendar
AnalyticsConstants
AnalyticsUtil
AndroidBitmap<T>
Represents a bitmap on Android.
AndroidFlutterLocalNotificationsPlugin
Android implementation of the local notifications plugin.
AndroidInitializationSettings
Plugin initialization settings for Android.
AndroidNotificationAction
Mirrors the Action class in AndroidX.
AndroidNotificationActionInput
Mirrors the RemoteInput functionality available in NotificationCompat.
AndroidNotificationChannel
Settings for Android notification channels.
AndroidNotificationChannelGroup
A group of related Android notification channels.
AndroidNotificationDetails
Contains notification details specific to Android.
AndroidNotificationSound
Represents an Android notification sound.
AndroidParams
Announcement
AnnouncementContentPage
AnnouncementContentPageState
AnnouncementData
AnnouncementEditPage
AnnouncementHelper
AnnouncementHomePage
AnnouncementLoginData
ApAppStoreUtil
ApButton
ApColors
ApConstants
ApDrawer
ApDrawerState
ApFlatButton
ApIcon
ApImageAssets
ApImageIcons
ApLocalizations
ApMediaUtil
ApNetworkImage
ApNotificationUtil
ApPlatformCalendarUtil
ApPlatformUtil
AppLocalizationDelegate
ApPreferenceUtil
AppStoreUtil
AppTrackingUtils
ApSupportLanguageConstants
ApTextField
ApTheme
ApUiUtil
ApUtils
AssetsLinuxIcon
Represents an icon from the Flutter Assets directory. Currently the assets directory is data/flutter_assets which is located on the path relative to the executable file.
AssetsLinuxSound
Represents a sound from the Flutter Assets directory.
BackGestureWidth
BackGestureWidthGetter builders
BackGestureWidthTheme
Applies a backGestureWidth to descendant widgets.
BackgroundTransformer
The default Transformer for Dio.
BaseOptions
A set of base settings for each Dio(). BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
Bidi
This provides utility methods for working with bidirectional text. All of the methods are static, and are organized into a class primarily to group them together for documentation and discoverability.
BidiFormatter
Bidi stands for Bi-directional text. According to Wikipedia: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.
BigPictureStyleInformation
Used to pass the content for an Android notification displayed using the big picture style.
BigTextStyleInformation
Used to pass the content for an Android notification displayed using the big text style.
BitmapFilePathAndroidIcon
Represents a file path to a bitmap that should be used for as an icon on Android.
BlackListPage
ByteArrayAndroidBitmap
Represents a base64 encoded AndroidBitmap.
ByteArrayAndroidIcon
Represents a bitmap asset belonging to the Flutter application that should be used for as an icon on Android.
ByteDataLinuxIcon
Represents an icon from a raw image data bytes, see LinuxRawIconData.
CancelToken
Controls cancellation of Dio's requests.
ChangeIconStyleItem
ChangeLanguageItem
ChangeThemeModeItem
CheckCourseNotifyItem
ClearAllNotifyItem
ContentUriAndroidIcon
Represents a content URI that should be used for as an icon on Android.
Course
CourseBorder
CourseConfig
CourseContent
CourseData
CourseList
CourseNotify
CourseNotifyData
CourseScaffold
CourseScaffoldSettingDialog
CourseScaffoldState
CrashlyticsUtil
CrossFileTestOverrides
Overrides some functions of CrossFile for testing purposes
CupertinoPageTransitionsBuilderCustomBackGestureWidth
This is a copy of Flutter's material CupertinoPageTransitionsBuilder with modified version of CupertinoPageRoute
DarwinInitializationSettings
Plugin initialization settings for Darwin-based operating systems such as iOS and macOS
DarwinNotificationAction
Describes the notification action itself.
DarwinNotificationAttachment
Represents an attachment for a notification on Darwin-based operation systems such as iOS and macOS
DarwinNotificationAttachmentThumbnailClippingRect
Represents the clipping rectangle used for the thumbnail image.
DarwinNotificationCategory
Corresponds to the UNNotificationCategory type which is used to configure notification categories and accompanying options.
DarwinNotificationDetails
Configures notification details specific to Darwin-based operation systems such as iOS and macOS
Data
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
DefaultDialog
DefaultStyleInformation
The default Android notification style.
Detail
DialogOption
DialogUtils
Dio
Dio enables you to make HTTP requests easily.
DioMixin
DrawableResourceAndroidBitmap
Represents a drawable resource belonging to the Android application that should be used as a bitmap on Android.
DrawableResourceAndroidIcon
Represents a drawable resource belonging to the Android application that should be used as an icon on Android.
DrawerItem
DrawerSubItem
ErrorInterceptorHandler
The handler for interceptors to handle error occurred during the request.
Event
Class that holds each event's info.
FilePathAndroidBitmap
Represents a file path that should be used for a bitmap on Android.
FilePathLinuxIcon
Represents an icon located at the path in the file system. It сan be either an absolute UNIX path or a file:// URI scheme, for example:
FlutterBitmapAssetAndroidIcon
Represents a bitmap asset belonging to the Flutter application that should be used for as an icon on Android.
FlutterLocalNotificationsPlugin
Provides cross-platform functionality for displaying local notifications.
FormData
A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
FusedTransformer
A Transformer that has a fast path for decoding UTF8-encoded JSON. If the response is utf8-encoded JSON and no custom decoder is specified in the RequestOptions, this transformer is significantly faster than the default SyncTransformer and the BackgroundTransformer. This improvement is achieved by using a fused Utf8Decoder and JsonDecoder to decode the response, which is faster than decoding the utf8-encoded JSON in two separate steps, since Dart uses a special fast decoder for this case. See https://github.com/dart-lang/sdk/blob/5b2ea0c7a227d91c691d2ff8cbbeb5f7f86afdb9/sdk/lib/_internal/vm/lib/convert_patch.dart#L40
GeneralCallback<T>
TODO: 放此原因是配合 i18n 相關需要,並且此 API 未來會移除,故不放在 ap_common_core
GeneralResponse
HeaderDelegate
Headers
The headers class for requests and responses.
HintContent
HomePageScaffold
HomePageScaffoldState
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient.
IgnoreKeyboardDismiss
Used to ignore keyboard dismiss requests for a specific Widget or Widget tree.
ImageViewer
ImageViewerScaffold
ImgurUploadData
ImgurUploadResponse
InboxStyleInformation
Used to pass the content for an Android notification displayed using the inbox style.
Info
InitializationSettings
Settings for initializing the plugin for each platform.
Interceptor
Interceptor helps to deal with RequestOptions, Response, and DioException during the lifecycle of a request before it reaches users.
Interceptors
A Queue-Model list for Interceptors.
InterceptorsWrapper
A helper class to create interceptors in ease.
Intl
The Intl class provides a common entry point for internationalization related tasks. An Intl instance can be created for a particular locale and used to create a date format via anIntl.date(). Static methods on this class are also used in message formatting.
IOSFlutterLocalNotificationsPlugin
iOS implementation of the local notifications plugin.
IOSParams
ItemPicker
KeyboardDismissOnTap
Removes the current focus and hides the keyboard when the user taps on this widget.
KeyboardVisibilityBuilder
A convenience builder that exposes if the native keyboard is visible.
KeyboardVisibilityController
Provides direct information about keyboard visibility and allows you to subscribe to changes.
KeyboardVisibilityProvider
Widget that reports to its descendants whether or not the keyboard is currently visible.
KeyboardVisibilityTesting
LinuxFlutterLocalNotificationsPlugin
A stub implementation to satisfy compilation of multi-platform packages that depend on flutter_local_notifications_linux. This should never actually be created.
LinuxInitializationSettings
Plugin initialization settings for Linux.
LinuxNotificationAction
Represents an action, that send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it's available using LinuxServerCapabilities. For more information, please see Desktop Notifications Specification https://specifications.freedesktop.org/notification-spec/latest/ar01s02.html
LinuxNotificationDetails
Configures notification details specific to Linux. The system may not support all features.
LinuxNotificationIcon
Represents Linux notification icon.
LinuxNotificationLocation
Represents the location on the screen that the notification should point to.
LinuxNotificationSound
Represents Linux notification sound.
LinuxNotificationTimeout
The timeout of the Linux notification.
LinuxRawIconData
Represents an icon in the raw image data.
LinuxServerCapabilities
Represents capabilities, implemented by the Linux notification server.
ListParam<T>
Indicates a param being used as queries or form data, and how does it gets formatted.
Location
LoginScaffold
LoginScaffoldState
LogInterceptor
LogInterceptor is used to print logs during network requests. It should be the last interceptor added, otherwise modifications by following interceptors will not be logged. This is because the execution of interceptors is in the order of addition.
MacOSFlutterLocalNotificationsPlugin
macOS implementation of the local notifications plugin.
MediaStyleInformation
Used to pass the content for an Android notification displayed using the media style.
MediaUtil
Message
Represents a message used in Android messaging style notifications.
MessagingStyleInformation
Used to pass the content for an Android notification displayed using the messaging style.
MicroMoney
Used primarily for currency formatting, this number-like class stores millionths of a currency unit, typically as an Int64.
MultipartFile
An upload content that is a part of MultipartRequest. This doesn't need to correspond to a physical file.
NotificationAppLaunchDetails
Contains details on the notification that launched the application.
NotificationDetails
Contains notification details specific to each platform.
NotificationListView
NotificationListViewState
NotificationResponse
Details of a Notification Action that was triggered.
Notifications
NotificationsData
NotificationsEnabledOptions
Data class that represent current state of notification options.
NotificationUtil
NumberFormat
Provides the ability to format a number in a locale-specific way.
NumberParserBase<R>
Options
The configuration for a single request. BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
PdfView
PendingNotificationRequest
Details of a pending notification that has not been delivered.
Person
Details of a person e.g. someone who sent a message.
PhoneListView
PhoneListViewState
PhoneModel
PlatformCalendarUtil
PlatformUtil
PreferenceUtil
PrivateCookieManager
Don't use this class in Browser environment
ProgressDialog
QueuedInterceptor
Interceptor in queue.
QueuedInterceptorsWrapper
A helper class to create QueuedInterceptor in ease.
RawResourceAndroidNotificationSound
Represents a raw resource belonging to the Android application that should be used for the notification sound.
Recurrence
RedirectRecord
A record that records the redirection happens during requests, including status code, request method, and the location.
RequestInterceptorHandler
The handler for interceptors to handle before the request has been sent.
RequestOptions
The internal request option class that is the eventual result after BaseOptions and Options are composed.
Response<T>
The Response class contains the payload (could be transformed) that respond from the request, and other information of the response.
ResponseBody
The response wrapper class for adapters.
ResponseInterceptorHandler
The handler for interceptors to handle after respond.
Score
ScoreContent
ScoreData
ScoreScaffold
ScoreScaffoldState
ScoreTextBorder
SectionTime
Semester
SemesterData
SettingItem
SettingSwitch
SettingTitle
SimpleOptionDialog
StyleInformation
Abstract class for defining an Android notification style
SyncTransformer
If you want to custom the transformation of request/response data, you can provide a Transformer by your self, and replace the transformer by setting the Dio.transformer.
TextCheckBox
TextDirection
Represents directionality of text.
ThemeLinuxIcon
Represents a system theme icon. See https://www.freedesktop.org/wiki/Specifications/icon-naming-spec/ for more help.
ThemeLinuxSound
Represents a system theme sound. See https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/ for more help.
TimeCode
TimeCodeBorder
TimeCodeConfig
Toast
Copy from https://github.com/appdev/FlutterToast Source Code https://github.com/appdev/FlutterToast/blob/4d446c80a1807094a3e10c8293e4b7f3c6429f9d/lib/toast.dart
ToastView
ToastWidget
Transformer
Transformer allows changes to the request/response data before it is sent/received to/from the server.
UiUtil
UriAndroidNotificationSound
Represents a URI on the Android device that should be used for the notification sound.
UserInfo
UserInfoCard
UserInfoScaffold
UserInfoScaffoldState
VersionInfo
XFile
A CrossFile is a cross-platform, simplified File abstraction.
YesNoDialog

Enums

AndroidNotificationCategory
The available categories for Android notifications.
AndroidNotificationChannelAction
The available actions for managing notification channels.
AndroidNotificationStyle
The available notification styles on Android.
AndroidScheduleMode
Used to specify how notifications should be scheduled on Android.
AndroidServiceForegroundType
The available foreground types for an Android service.
AndroidServiceStartType
The available start types for an Android service.
AnnouncementLoginType
ApSupportLanguage
AudioAttributesUsage
The available audio attributes usages for an Android service.
BarCodeMode
CourseNotifyState
CourseState
DarwinNotificationActionOption
Describes when & how the notification action is displayed.
DarwinNotificationCategoryOption
Desribes the options of each notification category.
DateTimeComponents
The components of a date and time representations.
Day
The days of the week.
DioExceptionType
The exception enumeration indicates what type of exception has happened during requests.
FileAccessMode
The file access mode when downloading a file, corresponds to a subset of dart:io::FileMode.
Frequency
GeneralPermissionStatus
GroupAlertBehavior
The available alert behaviours for grouped notifications.
HomeState
Importance
The available importance levels for Android notifications.
InterruptionLevel
Type used to indicate the importance and delivery timing of a notification.
LinuxHintValueType
Represents the notification hint value type.
LinuxIconType
Specifies the Linux notification icon type.
LinuxNotificationCategory
Categories of notifications.
LinuxNotificationUrgency
The urgency level of the Linux notification.
LinuxSoundType
Specifies the Linux notification sound type.
ListFormat
Specifies the array format (a single parameter with multiple parameter or multiple parameters with the same name). and the separator for array items.
LogoMode
Mode
NotificationResponseType
The possible notification response types
NotificationState
NotificationVisibility
Defines the notification visibility on the lockscreen.
PdfState
PermissionLevel
PhoneState
Priority
Priority for notifications on Android 7.1 and lower.
RepeatInterval
The available intervals for periodically showing notifications.
ResponseType
Indicates which transformation should be applied to the response data.
ScoreState
UILocalNotificationDateInterpretation
Describes how the fire date (date used to schedule a notification) of the UILocalNotification on iOS is interpreted.

Mixins

OptionsMixin
The mixin class for options that provides common attributes.

Constants

apLocalizationsDelegate → const _ApLocalizationsDelegate

Properties

random Random
final

Functions

defaultDioExceptionReadableStringBuilder(DioException e) String
The default implementation of building a readable string of DioException.
registerApCommonCore({required PreferenceUtil preference}) → void
registerApCommonFlutter({required UiUtil ui, required PlatformUtil platform, required MediaUtil media, required PlatformCalendarUtil platformCalendar, required NotificationUtil notification, required AppStoreUtil appStore}) → void
registerApCommonService({AnalyticsUtil analytics = const MockAnalyticsUtil(), CrashlyticsUtil crashlytics = const MockCrashlyticsUtil()}) → void
registerOneForAll() → void
toBeginningOfSentenceCase<T extends String?>(T input, [String? locale]) → T
Convert a string to beginning of sentence case, in a way appropriate to the locale.

Typedefs

BackGestureWidthGetter = double Function(ValueGetter<Size> )
Calculates width of area where back swipe gesture is accepted in logical pixels (optionally) based on the screen size
CourseNotifyCallback = dynamic Function(CourseNotify? courseNotify, CourseNotifyState state)
DefaultTransformer = SyncTransformer
DidReceiveBackgroundNotificationResponseCallback = void Function(NotificationResponse details)
Signature of callback triggered on background isolate when a user taps on a notification or a notification action.
DidReceiveLocalNotificationCallback = void Function(int id, String? title, String? body, String? payload)
Signature of the callback that is triggered when a notification is shown whilst the app is in the foreground.
DidReceiveNotificationResponseCallback = void Function(NotificationResponse details)
Signature of callback triggered on main isolate when a user taps on a notification or a notification action.
DioError = DioException
DioError describes the exception info when a request failed.
DioErrorType = DioExceptionType
Deprecated in favor of DioExceptionType and will be removed in future major versions.
DioExceptionCallback = dynamic Function(DioException)
DioExceptionReadableStringBuilder = String Function(DioException e)
The readable string builder's signature of DioException.readableStringBuilder.
DioMediaType = MediaType
The type (alias) for specifying the content-type of the MultipartFile.
GeneralResponseCallback = dynamic Function(GeneralResponse)
HeaderForEachCallback = void Function(String name, List<String> values)
The signature that iterates header fields.
InterceptorErrorCallback = void Function(DioException error, ErrorInterceptorHandler handler)
The signature of Interceptor.onError.
InterceptorSendCallback = void Function(RequestOptions options, RequestInterceptorHandler handler)
The signature of Interceptor.onRequest.
InterceptorSuccessCallback = void Function(Response response, ResponseInterceptorHandler handler)
The signature of Interceptor.onResponse.
JsonDecodeCallback = FutureOr Function(String)
The callback definition for decoding a JSON string.
JsonEncodeCallback = FutureOr<String> Function(Object)
The callback definition for encoding a JSON object.
ProgressCallback = void Function(int count, int total)
The type of a progress listening callback when sending or receiving data.
RequestEncoder = FutureOr<List<int>> Function(String request, RequestOptions options)
The type of a request encoding callback.
ResponseDecoder = FutureOr<String?> Function(List<int> responseBytes, RequestOptions options, ResponseBody responseBody)
The type of a response decoding callback.
ValidateStatus = bool Function(int? status)
The type of a response status code validate callback.

Exceptions / Errors

DioException
DioException describes the exception info when a request failed.
NotNullableError<T>
A TypeError thrown by _checkNotNullable.