ComputeCallback ComputeImplcomputedartlibrary js_interopFutureOrRMFutureStringSchedulerBinding scheduleTaskSendPortsendIsolaterunTimelinecompute debugLabel€ ‹£›T6Γδ!ΠÁ/ dart:asyncdart.library.js_interop_isolates_web.dartG“–isolates–_isolates_io.dartŠΘŒ5T=€ˆ€§€©€Λ€λ€π",.DF‘£Ψέ‚‚‚V‚X‚₯‚πƒ ƒ$ƒ„ƒ†ƒΤ„ „„C„”„ε….…B…G…‹……₯…ς†††$†K†u†|††£†Ό†Σ†ά‡‡$‡=‡H‡Q‡e‡l‡u‡†‡‹‡Τˆˆ"ˆWˆ\ˆ¬ˆώ‰D‰I‰š‰μ‰ρŠŠ ŠRŠ˜ŠŠθ‹7‹‰‹εŒ2Œ5t/// @docImport 'dart:developer'; /// @docImport 'dart:isolate'; /// /// @docImport 'package:flutter/scheduler.dart';.F—–ƒ†ˆ­‹“‹“‡Μ/// Asynchronously runs the given [callback] - with the provided [message] - /// in the background and completes with the result. /// /// {@template flutter.foundation.compute.usecase} /// This is useful for operations that take longer than a few milliseconds, and /// which would therefore risk skipping frames. For tasks that will only take a /// few milliseconds, consider [SchedulerBinding.scheduleTask] instead. /// {@endtemplate} /// /// {@youtube 560 315 https://www.youtube.com/watch?v=5AxWC49ZMzs} /// /// {@tool snippet} /// The following code uses the [compute] function to check whether a given /// integer is a prime number. /// /// ```dart /// Future isPrime(int value) { /// return compute(_calculate, value); /// } /// /// bool _calculate(int value) { /// if (value == 1) { /// return false; /// } /// for (int i = 2; i < value; ++i) { /// if (value % i == 0) { /// return false; /// } /// } /// return true; /// } /// ``` /// {@end-tool} /// /// On web platforms this will run [callback] on the current eventloop. /// On native platforms this will run [callback] in a separate isolate. /// /// {@template flutter.foundation.compute.callback} /// /// The `callback`, the `message` given to it as well as the result have to be /// objects that can be sent across isolates (as they may be transitively copied /// if needed). The majority of objects can be sent across isolates. /// /// See [SendPort.send] for more information about exceptions as well as a note /// of warning about sending closures, which can capture more state than needed. /// /// {@endtemplate} /// /// On native platforms `await compute(fun, message)` is equivalent to /// `await Isolate.run(() => fun(message))`. See also [Isolate.run]. /// /// The `debugLabel` - if provided - is used as name for the isolate that /// executes `callback`. [Timeline] events produced by that isolate will have /// the name associated with them. This is useful when profiling an application.‹›‹›‹›‹ž‹ž‹ž‹‘‹Έ‹·‹Α ‹Δ‹Γ‹Ν‹Φ‹Υ£€±‚‚l/// Signature for the callback passed to [compute]. /// /// {@macro flutter.foundation.compute.callback} ///‚,‚,‚,‚/‚/‚/‚I ‚L‚K‚X*ƒƒ€±/// The signature of [compute], which spawns an isolate, runs `callback` on /// that isolate, passes it `message`, and (eventually) returns the value /// returned by `callback`.ƒ;ƒ;ƒ;ƒ>ƒ>ƒ>ƒAƒXƒWƒa ƒdƒcƒmƒvƒu€²dart:developer€Τ dart:isolate€ωpackage:flutter/scheduler.dartT=€ˆ€§€©€Λ€λ€π",.DF‘£Ψέ‚‚‚V‚X‚₯‚πƒ ƒ$ƒ„ƒ†ƒΤ„ „„C„”„ε….…B…G…‹……₯…ς†††$†K†u†|††£†Ό†Σ†ά‡‡$‡=‡H‡Q‡e‡l‡u‡†‡‹‡Τˆˆ"ˆWˆ\ˆ¬ˆώ‰D‰I‰š‰μ‰ρŠŠ ŠRŠ˜ŠŠθ‹7‹‰‹εŒ2Œ5compute"flutter.foundation.compute.usecase€ΫThis is useful for operations that take longer than a few milliseconds, and which would therefore risk skipping frames. For tasks that will only take a few milliseconds, consider [SchedulerBinding.scheduleTask] instead.#flutter.foundation.compute.callbackrThe `callback`, the `message` given to it as well as the result have to be objects that can be sent across isolates (as they may be transitively copied if needed). The majority of objects can be sent across isolates. See [SendPort.send] for more information about exceptions as well as a note of warning about sending closures, which can capture more state than needed.ΐ@