social_foundation library

Classes

BezierCircleHeader
bezier + circle indicator,you can use this directly [...]
BezierHeader
bezier container,if you need to implements indicator with bezier ,you can use consider about use this this will add the bezier container effect [...]
BotToast
ToastBuilder方法生成widget时,请确保生成的Widget背景不会吸收点击事件 例如Scaffold,Material都会默认占满整个父空间, 并且会吸收事件(就算透明也是这种情况),具体例子可看material.dart->_RenderInkFeatures class->hitTestSelf method 如果真的要生成,可以考虑使用IgnorePointer. 如果没有遵守规则,将会时某些功能失效例如allowClick功能就会失效
BotToastInit
BotToastNavigatorObserver
如果你项目有多个Navigator,请将该BotToastNavigatorObserver添加到Navigator.observers
BotToastNavigatorObserverProxy
ChangeNotifierProvider<T extends ChangeNotifier>
Listens to a ChangeNotifier, expose it to its descendants and rebuilds dependents whenever ChangeNotifier.notifyListeners is called. [...]
ChangeNotifierProxyProvider<T, R extends ChangeNotifier>
{@template provider.changenotifierproxyprovider} A ChangeNotifierProvider that builds and synchronizes a ChangeNotifier with external values. [...]
ChangeNotifierProxyProvider0<R extends ChangeNotifier>
A ChangeNotifierProvider that builds and synchronizes a ChangeNotifier with external values. [...]
ChangeNotifierProxyProvider2<T, T2, R extends ChangeNotifier>
A ChangeNotifierProvider that builds and synchronizes a ChangeNotifier with external values. [...]
ChangeNotifierProxyProvider3<T, T2, T3, R extends ChangeNotifier>
A ChangeNotifierProvider that builds and synchronizes a ChangeNotifier with external values. [...]
ChangeNotifierProxyProvider4<T, T2, T3, T4, R extends ChangeNotifier>
A ChangeNotifierProvider that builds and synchronizes a ChangeNotifier with external values. [...]
ChangeNotifierProxyProvider5<T, T2, T3, T4, T5, R extends ChangeNotifier>
A ChangeNotifierProvider that builds and synchronizes a ChangeNotifier with external values. [...]
ChangeNotifierProxyProvider6<T, T2, T3, T4, T5, T6, R extends ChangeNotifier>
A ChangeNotifierProvider that builds and synchronizes a ChangeNotifier with external values. [...]
ChRefreshString
Chinese
ClassicFooter
the most common indicator,combine with a text and a icon
ClassicHeader
the most common indicator,combine with a text and a icon [...]
Consumer<T>
{@template provider.consumer} Obtains Provider<T> from its ancestors and passes its value to builder. [...]
Consumer2<A, B>
Obtains Provider<T> from its ancestors and passes its value to builder. [...]
Consumer3<A, B, C>
Obtains Provider<T> from its ancestors and passes its value to builder. [...]
Consumer4<A, B, C, D>
Obtains Provider<T> from its ancestors and passes its value to builder. [...]
Consumer5<A, B, C, D, E>
Obtains Provider<T> from its ancestors and passes its value to builder. [...]
Consumer6<A, B, C, D, E, F>
Obtains Provider<T> from its ancestors and passes its value to builder. [...]
CustomFooter
a custom Indicator for footer,the usage I have put in CustomHeader,same with that See also [...]
CustomHeader
a custom Indicator for header [...]
DeferredInheritedProvider<T, R>
An InheritedProvider where the object listened is not the object emitted. [...]
EnRefreshString
English
FrRefreshString
French
FutureProvider<T>
Listens to a Future and exposes its result to child and its descendants. [...]
GetIt
Very simple and easy to use service locator You register your object creation or an instance of an object with registerFactory, registerSingleton or registerLazySingleton And retrieve the desired object using get or call your locator das as function as its a callable class
ImagePicker
Provides an easy way to pick an image/video from the image library, or to take a picture/video with the camera.
InheritedContext<T>
A BuildContext associated to an InheritedProvider. [...]
InheritedProvider<T>
A generic implementation of an InheritedWidget. [...]
ItRefreshString
Italian
JpRefreshString
Japanese
LinkFooter
enable footer link other footer place outside the viewport
LinkHeader
enable header link other header place outside the viewport
ListenableProvider<T extends Listenable>
Listens to a Listenable, expose it to its descendants and rebuilds dependents whenever the listener emits an event. [...]
ListenableProxyProvider<T, R extends Listenable>
{@template provider.listenableproxyprovider} A variation of ListenableProvider that builds its value from values obtained from other providers. [...]
ListenableProxyProvider0<R extends Listenable>
A variation of ListenableProvider that builds its value from values obtained from other providers. [...]
ListenableProxyProvider2<T, T2, R extends Listenable>
A variation of ListenableProvider that builds its value from values obtained from other providers. [...]
ListenableProxyProvider3<T, T2, T3, R extends Listenable>
A variation of ListenableProvider that builds its value from values obtained from other providers. [...]
ListenableProxyProvider4<T, T2, T3, T4, R extends Listenable>
A variation of ListenableProvider that builds its value from values obtained from other providers. [...]
ListenableProxyProvider5<T, T2, T3, T4, T5, R extends Listenable>
A variation of ListenableProvider that builds its value from values obtained from other providers. [...]
ListenableProxyProvider6<T, T2, T3, T4, T5, T6, R extends Listenable>
A variation of ListenableProvider that builds its value from values obtained from other providers. [...]
LoadIndicator
a widget implements pull up load
LoadIndicatorState<T extends LoadIndicator>
LoadingProcessor
footer Indicator exposure interface
LostDataResponse
The response object of ImagePicker.retrieveLostData. [...]
MaterialClassicHeader
mostly use flutter inner's RefreshIndicator
MultiProvider
A provider that merges multiple providers into a single linear widget tree. It is used to improve readability and reduce boilerplate code of having to nest multiple layers of providers. [...]
Provider<T>
A Provider that manages the lifecycle of the value it provides by delegating to a pair of Create and Dispose. [...]
ProxyProvider<T, R>
{@template provider.proxyprovider} A provider that builds a value based on other providers. [...]
ProxyProvider0<R>
A provider that builds a value based on other providers. [...]
ProxyProvider2<T, T2, R>
A provider that builds a value based on other providers. [...]
ProxyProvider3<T, T2, T3, R>
A provider that builds a value based on other providers. [...]
ProxyProvider4<T, T2, T3, T4, R>
A provider that builds a value based on other providers. [...]
ProxyProvider5<T, T2, T3, T4, T5, R>
A provider that builds a value based on other providers. [...]
ProxyProvider6<T, T2, T3, T4, T5, T6, R>
A provider that builds a value based on other providers. [...]
RefreshConfiguration
Controls how SmartRefresher widgets behave in a subtree.the usage just like ScrollConfiguration [...]
RefreshController
A controller controll header and footer state, it can trigger driving request Refresh ,set the initalRefresh,status if needed [...]
RefreshIndicator
a widget implements ios pull down refresh effect and Android material RefreshIndicator overScroll effect
RefreshIndicatorState<T extends RefreshIndicator>
Internal Implementation of Head Indicator [...]
RefreshLocalizations
Implementation of localized strings for the ClassicHeader,ClassicFooter,TwoLevelHeader [...]
RefreshLocalizationsDelegate
RefreshPhysics
a scrollPhysics for config refresh scroll effect,enable viewport out of edge whatever physics it is in ClampingScrollPhysics, it doesn't allow to flip out of edge,but in RefreshPhysics,it will allow to do that, by parent physics passing,it also can attach the different of iOS and Android different scroll effect it also handles interception scrolling when refreshed, or when the second floor is open and closed. with SpringDescription passing,you can custom spring back animate,the more paramter can be setting in RefreshConfiguration [...]
RefreshProcessor
head Indicator exposure interface
RefreshString
interface implements different language
RuRefreshString
Russian
ScreenUtil
Selector<A, S>
{@template provider.selector} An equivalent to Consumer that can filter updates by selecting a limited amount of values and prevent rebuild if they don't change. [...]
Selector0<T>
A base class for custom Selector. [...]
Selector2<A, B, S>
An equivalent to Consumer that can filter updates by selecting a limited amount of values and prevent rebuild if they don't change. [...]
Selector3<A, B, C, S>
An equivalent to Consumer that can filter updates by selecting a limited amount of values and prevent rebuild if they don't change. [...]
Selector4<A, B, C, D, S>
An equivalent to Consumer that can filter updates by selecting a limited amount of values and prevent rebuild if they don't change. [...]
Selector5<A, B, C, D, E, S>
An equivalent to Consumer that can filter updates by selecting a limited amount of values and prevent rebuild if they don't change. [...]
Selector6<A, B, C, D, E, F, S>
An equivalent to Consumer that can filter updates by selecting a limited amount of values and prevent rebuild if they don't change. [...]
SfAlertDialog
SfAliyunOss
SfAliyunOssResizeMode
SfAppState
SfAudioPlayerModel
SfAudioPlayerWidget
SfAudioRecorderConsumer
SfAvatar
SfBadge
SfCachedImageProvider
SfCacheManager
SfChatManager<TConversation extends SfConversation<SfMessage>, TMessage extends SfMessage>
SfChatModel<TConversation extends SfConversation<SfMessage>, TMessage extends SfMessage>
SfChatState<TConversation extends SfConversation<SfMessage>>
SfConversation<TMessage extends SfMessage>
SfDateHelper
SfDialog
SfFadeRoute
SfFileHelper
SfImagePicker
SfKeepAlive
SfKeepAliveState
SfListViewState<T>
SfMessage
SfMessageEvent<TMessage>
SfMessageStatus
SfMessageType
SfPhotoGalleryViewer
SfProviderWidget<T extends ChangeNotifier>
SfProviderWidget2<A extends ChangeNotifier, B extends ChangeNotifier>
SfRefreshListViewState<T>
SfRequestManager
SfRollingNumber
SfRollingNumberState
SfRouteName
SfRouterManager
SfSimpleAlert
SfStorageManager
SfStorageManagerKey
SfUser
SfUserConsumer<TUser extends SfUser>
SfUserState<TUser extends SfUser>
SfUtils
SfViewState
SmartRefresher
This is the most important component that provides drop-down refresh and up loading. RefreshController must not be null,Only one controller to one SmartRefresher [...]
SmartRefresherState
SocialFoundation
StreamProvider<T>
Listens to a Stream and exposes its content to child and descendants. [...]
TickerProviderImpl
TwoLevelHeader
this header help you implements twoLevel function easyily, the behaviour just like TaoBao,XieCheng(携程) App TwoLevel [...]
UkRefreshString
ValueListenableProvider<T>
Listens to a ValueListenable and expose its current value.
WaterDropHeader
QQ ios refresh header effect
WaterDropMaterialHeader
attach the waterdrop effect to MaterialClassicHeader

Mixins

IndicatorStateMixin<T extends StatefulWidget, V>
mixin in IndicatorState,it will get position and remove when dispose,init mode state [...]

Extensions

ReadContext
Exposes the read method.
SelectContext
Adds a select method on BuildContext.
SizeExtension
WatchContext
Exposes the watch method.

Constants

kTypeImage → const String
Denotes that an image is being picked.
'image'
kTypeVideo → const String
Denotes that a video is being picked.
'video'

Functions

throwIf(bool condition, Object error) → void
throwIfNot(bool condition, Object error) → void

Enums

BackButtonBehavior
此枚举会决定Toast对于物理返回键的处理方式
BezierCircleType
BezierDismissType
CameraDevice
Which camera to use when picking images/videos while source is ImageSource.camera. [...]
IconPosition
direction that icon should place to the text
ImageSource
Specifies the source where the picked image should come from.
LoadStatus
footer state
LoadStyle
footer indicator display style
PreferDirection
RefreshStatus
header state
RefreshStyle
header indicator display style
RetrieveType
The type of the retrieved data in a LostDataResponse.
SfViewStatus
TwoLevelDisplayAlignment

Typedefs

CancelFunc() → void
Toast的关闭函数,调用将会提前关闭对应的Toast
Create<T>(BuildContext context) → T
A function that creates an object of type T. [...]
DeferredStartListening<T, R>(InheritedContext<R> context, void setState(R value), T controller, R value) VoidCallback
A callback used to handle the subscription of controller. [...]
Dispose<T>(BuildContext context, T value) → void
A function that disposes an object of type T. [...]
ErrorBuilder<T>(BuildContext context, Object error) → T
A callback used to build a valid value from an error. [...]
FactoryFunc<T>() → T
FooterBuilder(BuildContext context, LoadStatus mode) Widget
custom footer builder,you can use second paramter to know what footerr state is
FutureFunc() Future<void>
HeaderBuilder(BuildContext context, RefreshStatus mode) Widget
custom header builder,you can use second paramter to know what header state is
IndicatorBuilder() Widget
global default indicator builder
Locator() → T
A generic function that can be called to read providers, without having a reference on BuildContext. [...]
ModeChangeCallBack<T>(T mode) → void
OffsetCallBack(double offset) → void
OnOffsetChange(bool up, double offset) → void
callback when the indicator scroll out of edge up: indicate header or footer callback offset: the distance of indicator out of edge
OuterBuilder(Widget child) Widget
wrap child in outside,mostly use in add background color and padding
PopTestFunc() bool
ProviderBuilder<R>(BuildContext context, R value, Widget child) Widget
ProxyProviderBuilder<T, R>(BuildContext context, T value, R previous) → R
ProxyProviderBuilder2<T, T2, R>(BuildContext context, T value, T2 value2, R previous) → R
ProxyProviderBuilder3<T, T2, T3, R>(BuildContext context, T value, T2 value2, T3 value3, R previous) → R
ProxyProviderBuilder4<T, T2, T3, T4, R>(BuildContext context, T value, T2 value2, T3 value3, T4 value4, R previous) → R
ProxyProviderBuilder5<T, T2, T3, T4, T5, R>(BuildContext context, T value, T2 value2, T3 value3, T4 value4, T5 value5, R previous) → R
ProxyProviderBuilder6<T, T2, T3, T4, T5, T6, R>(BuildContext context, T value, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, R previous) → R
RefresherBuilder(BuildContext context, RefreshPhysics physics) Widget
a builder for attaching refresh function with the physics
SfDialogBuilder(SfDialog dialog) Widget
ShouldFollowContent(LoadStatus status) bool
when viewport not full one page, for different state,whether it should follow the content
ShouldRebuild<T>(T previous, T next) bool
StartListening<T>(InheritedContext<T> element, T value) VoidCallback
A callback used to start the listening of an object and return a function that cancels the subscription. [...]
ToastBuilder(CancelFunc cancelFunc) Widget
UpdateShouldNotify<T>(T previous, T current) bool
A function that returns true when the update from previous to current should notify listeners, if any. [...]
VoidFutureCallBack() Future<void>
WrapAnimation(AnimationController controller, CancelFunc cancelFunc, Widget widget) Widget
WrapWidget(CancelFunc cancelFunc, Widget widget) Widget

Exceptions / Errors

ProviderNotFoundException
The error that will be thrown if Provider.of fails to find a Provider as an ancestor of the BuildContext used.