NetworkPlugin class
Plugin for retrieving the network status of App.
- Inheritance
- Mixed-in types
Constructors
Properties
-
app
→ App<
Object> -
The App referenced by the plugin.
no setterinherited
-
dependencies
→ List<
Type> -
The list of other plugins that this plugin depends on.
This property should be used to add the types of other plugins that are required for this Plugin to work.
For example, when using the FirebaseAnalyticsPlugin, you need to include FirebaseCorePlugin.
no setterinherited
- disposed → bool
-
Get whether this Plugin has been disposed.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- information → NetworkInformation
-
Return the current network status of App.
no setter
-
informationStream
→ Stream<
NetworkInformation> -
Stream to get the latest network state of the app
no setter
- initialized → bool
-
Whether this Plugin is initialized or not.
no setterinherited
-
methodCallLogs
→ List<
MethodCall> -
finalinherited
- name → String
-
The unique name of this Plugin.
This property is referenced in various situations, such as when enabling or disabling the plugin,
and when enabling or disabling the mock, and when communicating with Native code.
no setterinherited
-
Get the list of NavigatorObservers to pass to Patapata for this plugin.
This Observers list will ultimately be added to the App.navigatorObservers list.
no setterinherited
- remoteConfigEnabledKey → String
-
Get the RemoteConfig key name to enable or disable this plugin.
no setterinherited
- requireRemoteConfig → bool
-
This property determines whether initialization should occur after the RemoteConfig system has started when set to true,
or before it starts when set to false.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createAppWidgetWrapper(
Widget child) → Widget -
Wraps the Widget that will ultimately be passed to Flutter's runApp function.
This is used when the plugin needs to wrap App.createAppWidget to add widgets to the App's widget tree.
override
-
createLocalConfig(
) → LocalConfig? -
Specify the LocalConfig to register with Patapata for this plugin.
inherited
-
createRemoteConfig(
) → RemoteConfig? -
Specify the RemoteConfig to register with Patapata for this plugin.
inherited
-
createRemoteMessaging(
) → RemoteMessaging? -
Specify the RemoteMessaging to register with Patapata for this plugin.
inherited
-
didChangeAccessibilityFeatures(
) → void -
Called when the system changes the set of currently active accessibility
features.
inherited
-
didChangeAppLifecycleState(
AppLifecycleState state) → Future< void> -
Called when the system puts the app in the background or returns
the app to the foreground.
override
-
didChangeLocales(
List< Locale> ? locales) → void -
Called when the system tells the app that the user's locale has
changed. For example, if the user changes the system language
settings.
inherited
-
didChangeMetrics(
) → void -
Called when the application's dimensions change. For example,
when a phone is rotated.
inherited
-
didChangePlatformBrightness(
) → void -
Called when the platform brightness changes.
inherited
-
didChangeTextScaleFactor(
) → void -
Called when the platform's text scale factor changes.
inherited
-
didChangeViewFocus(
ViewFocusEvent event) → void -
Called whenever the PlatformDispatcher receives a notification that the
focus state on a view has changed.
inherited
-
didHaveMemoryPressure(
) → void -
Called when the system is running low on memory.
inherited
-
didPopRoute(
) → Future< bool> -
Called when the system tells the app to pop the current route, such as
after a system back button press or back gesture.
inherited
-
didPushRoute(
String route) → Future< bool> -
Called when the host tells the application to push a new route onto the
navigator.
inherited
-
didPushRouteInformation(
RouteInformation routeInformation) → Future< bool> -
Called when the host tells the application to push a new
RouteInformation and a restoration state onto the router.
inherited
-
didRequestAppExit(
) → Future< AppExitResponse> -
Called when a request is received from the system to exit the application.
inherited
-
dispose(
) → FutureOr< void> -
Disposes this Plugin.
Always call
super.disposebefore any other overridden code. In general you should not call this method as App will do that for you.override -
handleCancelBackGesture(
) → void -
Called when a predictive back gesture is canceled, indicating that no
navigation should occur.
inherited
-
handleCommitBackGesture(
) → void -
Called when a predictive back gesture is finished successfully, indicating
that the current route should be popped.
inherited
-
handleStartBackGesture(
PredictiveBackEvent backEvent) → bool -
Called at the start of a predictive back gesture.
inherited
-
handleStatusBarTap(
) → void -
Called when the user taps the status bar on iOS, to scroll a scroll
view to the top.
inherited
-
handleUpdateBackGestureProgress(
PredictiveBackEvent backEvent) → void -
Called when a predictive back gesture moves.
inherited
-
init(
App< Object> app) → FutureOr<bool> -
Executed when a
PatapataAppruns or when a this Plugin is added to thePatapataAppafterrun. This may return a Future for asynchronous initialization. Always callsuper.initbefore any other overridden code.override -
mockPatapataDisable(
) → void -
This is a function to mock patapataDisable running in native code.
It will only be called when kIsTest is true.
inherited
-
mockPatapataEnable(
) → void -
This is a function to mock patapataEnable running in native code.
It will only be called when kIsTest is true.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setMockMethodCallHandler(
) → void -
A function for mocking a MethodChannel.
override
-
setMockStreamHandler(
) → void -
A function for mocking a MockStreamHandler.
override
-
testChangeConnectivity(
List< NetworkConnectivity> result) → Future<void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited