id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
flutter_classes/345451_157_0.txt | ` 4b78b82 `
This updates `AsyncSnapshot.data` to act as `AsyncSnapshot.requireData`
used to -- and it removes `AsyncSnapshot.requireData`. Correspondingly,
this adds a `StreamBuilder.withoutInitialData()` constructor, makes the
`initialData` argument to the default `StreamBuilder()` construc... | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_21_0.txt | ` FutureBuilder ` is a ` StatefulWidget ` that uses state as a snapshot.
Looking at the ` FutureBuilder ` source code , we can recognize the initial
snapshot shown in the code snippet below:
_snapshot = widget.initialData == null
? AsyncSnapshot<T>.nothing()
: AsyncSnapshot<T... | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_22_0.txt | As well as there is another parameter called the initialData like intialData
parameter in FutureBuilder. we can use it as a default value until and unless
we get the value from the stream.
As I mentioned before, we can load any widget while loading the data, and also
we can handle load any widget or handle it when t... | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_45_0.txt | Dropdown menu
* Copy link
* * Hide
* * * | |
flutter_classes/345451_49_0.txt | Copy link
Member | |
flutter_classes/345451_153_0.txt | Copy link
Contributor Author | |
flutter_classes/345451_202_0.txt | Milestone
No milestone | |
flutter_classes/345451_79_0.txt | We could do a soft transition, whereby only in debug mode (via asserts), we'd
throw if the ` data ` property was accessed without ` error ` or ` hasError `
also being consulted.
---
👍 4 audkar, cbenhagen, rubensdemelo, and rich-j reacted with thumbs up emoji
All reactions | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_6_0.txt | * The Dart event loop
* Building Flutter widgets
* ` FutureBuilder ` widget
* ` StreamBuilder ` widget
* Conclusion
Introducing Galileo AI | |
flutter_classes/345451_34_0.txt | # Accessing AsyncSnapshot.data should throw if there's an error #34545
Open | |
flutter_classes/345451_36_0.txt | # Accessing AsyncSnapshot.data should throw if there's an error #34545
tvolkert opened this issue Jun 15, 2019 · 67 comments | |
flutter_classes/345451_69_0.txt | Copy link
Contributor Author | |
flutter_classes/how-i-built-and-published-a-flutter-app-in-48-hours9_14_0.txt | ## Design
I'm not a designer, but thankfully, it's easy to build beautiful looking UIs
with Flutter. I decided to simply use the Material widgets to make my life
easier, as the Material look is decent enough for all platforms. | |
flutter_classes/345451_91_0.txt | Code review has led @goderbauer and I to lean towards just making the
breaking change. Bottom line: callers who are blindly accessing ` data ` in
the current API have broken code, but it's broken in an insidious way: without
them being alerted to it via crash reports. Here's the associated breaking
change announceme... | |
flutter_classes/flutter_classes_3_1.txt | xcludeBottomFocus = true } )
Creates a cross-fade animation widget.
const
## Properties
[ alignment ](widgets/AnimatedCrossFade/alignment.html) → [ AlignmentGeometry
](painting/AlignmentGeometry-class.html)
How the children should be aligned while the size is animating.
final
[ crossFadeState ](... | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_50_0.txt | ### Monitoring MySQL with Prometheus and Grafana in Docker
Mario García - Apr 17 | |
flutter_classes/345451_135_0.txt | Sorry, something went wrong.
40 hidden items Load more… | |
flutter_classes/345451_64_0.txt | goderbauer commented Jun 17, 2019
That does sound like a good idea. It's a small breaking change, but probably
worth doing to remind people to check for errors. I'll repurpose this bug.
---
All reactions | |
flutter_classes/flutter_classes_7_1.txt | ed
[ debugFillProperties ](widgets/IndexedSemantics/debugFillProperties.html) (
[ DiagnosticPropertiesBuilder ](foundation/DiagnosticPropertiesBuilder-
class.html) properties ) → void
Add additional properties associated with the node.
override
[ didUnmountRenderObject
](widgets/RenderObjectWidget/didUnmoun... | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_32_0.txt | Building widgets with ` FutureBuilder ` and ` StreamBuilder ` is a serious
benefit of using Dart and Flutter for structuring your UI. Hopefully, now you
understand how these two widgets work at the fundamental level through the
Dart event loop.
## Get set up with LogRocket's modern error tracking in minutes: | |
flutter_classes/345451_11_0.txt | * All features
* Documentation
* GitHub Skills
* Blog
* Solutions | |
flutter_classes/345451_203_0.txt | Development
No branches or pull requests | |
flutter_classes/345451_149_0.txt | Closed
Copy link | |
flutter_classes/345451_33_0.txt | Already on GitHub? Sign in to your account
Jump to bottom | |
flutter_classes/345451_51_0.txt | edited
My first reaction is: This is working as intended. The StreamBuilder catches exceptions of the stream and feeds them as ` AsyncSnapshot ` s into the builder. In there it is the developer's responsibility to properly handle the error by checking ` snapshot.hasError ` and ` snapshot.error ` . They can then either... | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_46_0.txt | he use once and that's OK to create in build?
Like comment: Like comment: 1 like Like Comment button Reply | |
flutter_classes/how-i-built-and-published-a-flutter-app-in-48-hours9_5_0.txt | A couple of years ago, I built and published my first app built with Flutter,
Timelog . It's a time tracking app which lets you track your time across
different activities, and set daily/weekly/monthly goals per activity. I built
this app mainly for myself, but I was quite happy to find out that a lot of
other people ... | |
flutter_classes/345451_152_0.txt | @tvolkert You might want to adjust the changelog or did you keep it
intentionally?
---
All reactions
Sorry, something went wrong. | |
flutter_classes/345451_46_0.txt | Copy link
Contributor Author | |
flutter_classes/flutter_classes_5_0.txt | menu
1. [ Flutter ](index.html)
2. [ animation.dart ](animation/animation-library.html)
3. FlippedCurve class
FlippedCurve
brightness_4 brightness_5
[ description
](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/animation/curves.dart#L1132
"View source code")
# FlippedCurve class... | |
flutter_classes/flutter_classes_2_0.txt | menu
1. [ Flutter ](index.html)
2. [ widgets.dart ](widgets/widgets-library.html)
3. AbsorbPointer class
AbsorbPointer
brightness_4 brightness_5
[ description
](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/basic.dart#L6949
"View source code")
# AbsorbPointer class
A wi... | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_10_0.txt | Once someone opens an app, many different events occur in no predictable order
until the app is closed. Each time an event happens, it enters a queue and
waits to be processed. The Dart event loop retrieves the event at the top of
the queue, processes it, and triggers a callback until all the events in the
queue are co... | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_44_0.txt | #### A guide to cookies in Next.js
Cookies are crucial to web development. This article will explore how to
handle cookies in your Next.js applications. | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_48_0.txt | Yeah
No thanks | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_27_0.txt | Happy Coding 👽!!!
## Top comments (2) | |
flutter_classes/flutter_classes_1_2.txt | ateState ](widgets/StreamBuilderBase/createState.html) ( ) → [ State
](widgets/State-class.html) < [ StreamBuilderBase ](widgets/StreamBuilderBase-
class.html) < T , [ AsyncSnapshot ](widgets/AsyncSnapshot-class.html) < T >
> >
Creates the mutable state for this widget at a given location in the tree.
inhe... | |
flutter_classes/345451_118_0.txt |
StreamBuilder<T>(
initialData: t,
stream: controller.stream,
builder: (context, snapshot) {
// `snapshot.hasData` should return `true` even when `snapshot.connectionState`
// is `none`/`waiting`
}
}
---
All reactions
Sorry, something went wron... | |
flutter_classes/345451_85_0.txt | Proposed soft-transition period: #34626 Note that it's still a breaking
change because I had to remove the ` const ` qualifiers from the `
AsyncSnapshot ` constructors.
---
All reactions
Sorry, something went wrong. | |
flutter_classes/345451_122_0.txt | Copy link
Contributor | |
flutter_classes/345451_54_0.txt | goderbauer commented Jun 17, 2019
See also the sample code on StreamBuilder (line 352/353): flutter/packages/flutter/lib/src/widgets/async.dart Lines 349 to 361 in 5493fe4 | | /// StreamBuilder<int>(
---|---
| /// stream: _lot?.bids, // a Stream<int> or null
| /// builder: (BuildContext context, Async... | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_5_0.txt | More...
Copy link Copy link | |
flutter_classes/345451_176_0.txt | the issue persists
Thank you
---
All reactions
Sorry, something went wrong. | |
flutter_classes/345451_114_0.txt | goderbauer commented Jul 3, 2019
What do you mean by the ` initialData ` ? ` AsyncSnapshot ` doesn't seem to
have a property for that?
---
All reactions | |
flutter_classes/345451_194_0.txt | Copy link
Member | |
flutter_classes/345451_55_0.txt | Sorry, something went wrong.
Copy link | |
flutter_classes/how-i-built-and-published-a-flutter-app-in-48-hours9_42_0.txt | Sponsor
Learn more about Hashnode Sponsors | |
flutter_classes/345451_115_0.txt | Sorry, something went wrong.
Copy link | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_28_0.txt | The ` StreamBuilder ` widget automatically subscribes and unsubscribes from
the ` stream ` . When disposing a widget, you don’t have to worry about
unsubscribing, which could cause a memory leak:
@override
Widget build(BuildContext context) {
return StreamBuilder<String>(
stream: ... | |
flutter_classes/345451_142_0.txt | Sorry, something went wrong.
Copy link | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_54_0.txt | Yohan Malshika
Follow | |
flutter_classes/345451_185_0.txt | awhitford commented Jan 5, 2021
@giorgio79 Don't you need to use ` rethrow ` ? See How do I rethrow an
exception and preserve the stack trace? .
---
All reactions | |
flutter_classes/345451_68_0.txt | Actually, there is already ` AsyncSnapshot.requireData ` , that basically does
this check: https://master-
api.flutter.dev/flutter/widgets/AsyncSnapshot/requireData.html
---
All reactions
Sorry, something went wrong. | |
flutter_classes/345451_188_0.txt | creativecreatorormaybenot commented Jan 6, 2021
@awhitford No, ` rethrow ` only works in ` catch ` blocks. Throwing with a
custom (or original) stack trace is not support. See dart-lang/sdk#10297 .
---
All reactions | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_33_0.txt | I'm a Google Developer Expert in Dart and Flutter (one of 12 in North
America). I have 45 years of experience with backend, web, mobile, devops, and
training.
* Location | |
flutter_classes/flutter_classes_0_4.txt | hen some have errors.
[ TimeoutException ](dart-async/TimeoutException-class.html)
Thrown when a scheduled timeout happens while waiting for an async result.
1. [ Flutter ](index.html)
2. dart:async
##### Flutter package
1. Libraries
2. [ animation ](animation/animation-library.html)
3. [ cuper... | |
flutter_classes/how-i-built-and-published-a-flutter-app-in-48-hours9_36_0.txt | ## Publishing
And so, after a little less than 48 hours divided across 1-3 hour sessions,
Flow was ready for production. I spent some time making screenshots for the
Play Store listing, and quickly wrote short and long descriptions. A couple of
days later, Flow was approved, and live on the Play Store . | |
flutter_classes/flutter_classes_1_1.txt | tml) ? key , T? initialData , required [ Stream
](dart-async/Stream-class.html) < T > ? stream , required [
AsyncWidgetBuilder ](widgets/AsyncWidgetBuilder.html) < T > builder } )
Creates a new [ StreamBuilder ](widgets/StreamBuilder-class.html) that builds itself based on the latest snapshot of in... | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_5_0.txt | Majid Hajian Majid is a Google Developer Expert, an award-winning author,
Flutter, PWA, a perf enthusiast, and a passionate software developer with
years of developing and architecting complex web and mobile applications.
Table of contents | |
flutter_classes/how-i-built-and-published-a-flutter-app-in-48-hours9_16_0.txt | ## Data storage
For an expense tracking app, we need to store the user's expenses and
categories. At least for the first version, we're just going to store the data
locally on the user's device. For this, I went with Drift , which is built
on top of ` sqflite ` . For less critical data such as the theme and user
pr... | |
flutter_classes/345451_112_0.txt | Sorry, something went wrong.
Copy link | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_51_0.txt | ### Difference between technology and methodology - Dgi Host.com
Gurpinder Singh - Apr 18 | |
flutter_classes/345451_104_0.txt | ###
danwulff commented Jul 3, 2019 | |
flutter_classes/345451_22_0.txt | We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted | |
flutter_classes/345451_39_0.txt | Contributor
### | |
flutter_classes/345451_127_0.txt |
StreamBuilder<T>(
initialData: () => null,
...
)
That'd allow differentiating between a non-initialized value ( ` initialData
== null ` ) and an initial value of ` null ` ( ` initialData: () => null ` )
So that the final implementation would be: | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_30_0.txt | * * *
## Over 200k developers use LogRocket to create better digital experiences | |
flutter_classes/345451_67_0.txt | ###
goderbauer commented Jun 17, 2019 | |
flutter_classes/345451_186_0.txt | Sorry, something went wrong.
Copy link | |
flutter_classes/flutter_classes_0_3.txt | e/handleUncaughtError.html) implementation function.
[ PrintHandler ](dart-async/PrintHandler.html) = void Function ( [ Zone
](dart-async/Zone-class.html) self , [ ZoneDelegate ](dart-
async/ZoneDelegate-class.html) parent , [ Zone ](dart-async/Zone-class.html)
zone , [ String ](dart-core/String-class.html) li... | |
flutter_classes/345451_90_0.txt | ###
tvolkert commented Jul 3, 2019 | |
flutter_classes/345451_110_0.txt | ###
rrousselGit commented Jul 3, 2019 • | |
flutter_classes/345451_106_0.txt | Copy link
Contributor Author | |
flutter_classes/345451_147_0.txt | * 👍 2 reactions
Sorry, something went wrong. | |
flutter_classes/345451_159_0.txt | ChristofferSkog21st commented Dec 18, 2019
@tvolkert What's the status of this? It's still marked as open but without
any apparent activity, I'm finding myself a bit confused as to how to work
with the data right now that's why I'm asking.
---
All reactions | |
flutter_classes/345451_126_0.txt | * * *
To fix that we'd probably have to change the ` initialData ` API to be a ` T
Function() ` instead of ` T ` : | |
flutter_classes/345451_182_0.txt | ###
creativecreatorormaybenot commented Jan 5, 2021 | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_43_0.txt | Onuorah Bonaventure
May 1, 2024 ⋅ 14 min read | |
flutter_classes/345451_128_0.txt |
AsyncSnapshot<T> initial() =>
initialData != null
? AsyncSnapshot<T>.withData(ConnectionState.none, initialData())
: AsyncSnapshot<T>.nothing();
---
All reactions
Sorry, something went wrong. | |
flutter_classes/345451_169_0.txt | edited
It was rolled back? Edit: Ok, found it needs more discussion, but why? Here
is an Issue somewhat related, the StreamBuilder doesn't print the stacktrace
to the debug console: #53384 (comment)
---
All reactions | |
flutter_classes/345451_44_0.txt |
👍 8 mono0926, rich-j, xvrh, piecubed, HerrNiklasRaab, iapicca, osaxma, and
lucavenir reacted with thumbs up emoji
All reactions | |
flutter_classes/345451_160_0.txt | Sorry, something went wrong.
Copy link | |
flutter_classes/345451_206_0.txt | * Terms
* Privacy
* Security
* Status
* Docs
* Contact
* Manage cookies
* Do not share my personal information
You can’t perform that action at this time. | |
flutter_classes/345451_184_0.txt | Copy link
### | |
flutter_classes/345451_181_0.txt | Copy link
Contributor | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_41_0.txt | Collapse Expand
zello | |
flutter_classes/345451_92_0.txt | tvolkert added the c: API break Backwards-incompatible API changes label
Jul 3, 2019
Copy link | |
flutter_classes/345451_111_0.txt | edited
That would be ` ConnectionState.waiting ` / ` ConnectionState.none ` . But the
issue is, ` StreamBuilder ` 's ` initialData ` exists and it can be ` null `
too. Maybe just checking ` hasError ` is enough?
---
All reactions | |
flutter_classes/345451_32_0.txt | Sign up for GitHub
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement . We’ll occasionally send you account related emails. | |
flutter_classes/flutter_classes_1_0.txt | menu
1. [ Flutter ](index.html)
2. [ widgets.dart ](widgets/widgets-library.html)
3. StreamBuilder < T > class
StreamBuilder
brightness_4 brightness_5
[ description
](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/async.dart#L383
"View source code")
# StreamBuilder< T >... | |
flutter_classes/345451_88_0.txt | Based on initial discussion in the PR, the most recent idea is to deprecate `
AsyncSnapshot.data ` altogether in favor of an ` AsyncSnapshot.value `
property, which will throw if there's an error. The thought is that it forces
all developers to make a change, and in so doing, they'll be curious as to the
difference bet... | |
flutter_classes/345451_108_0.txt | @rrousselGit @danwulff yep, that's a good point and use case. How about if
we create a sentinel value that represents "no data yet received", different
from null, and throw if data is accessed when we're in that state?
---
All reactions
Sorry, something went wrong. | |
flutter_classes/how-i-built-and-published-a-flutter-app-in-48-hours9_37_0.txt | Once I gather some more feedback from the Android version and make some more
improvements, I also want to publish Flow to the App Store. Maybe even on
desktop platforms, but I would need to make some layout changes first so that
it looks good on larger screens.
## Future plans | |
flutter_classes/345451_37_0.txt | Labels
c: API break Backwards-incompatible API changes dependency: dart Dart team
may need to help us found in release: 3.3 Found to occur in 3.3 found in
release: 3.7 Found to occur in 3.7 framework flutter/packages/flutter
repository. See also f: labels. has reproducible steps The issue has been
confirmed... | |
flutter_classes/345451_123_0.txt | ###
rrousselGit commented Jul 3, 2019 • | |
flutter_classes/how-i-built-and-published-a-flutter-app-in-48-hours9_2_0.txt | # How I built and published a Flutter app in 48 hours
Christos | |
flutter_classes/async-callbacks-with-flutter-futurebuilder7_20_0.txt | 1. ` none ` : maybe with some initial data
2. ` waiting ` : asynchronous operation has begun. The data is typically null
3. ` active ` : data is non-null and has the potential to change over time
4. ` done ` : data is non-null
` snapshot.data ` returns the latest data, and ` snapshot.error ` returns the
ne... | |
flutter_classes/futurebuilder-and-streambuilder-in-flutter-g6m3_13_0.txt |
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter/material.dart';
class FutureBuilderTest extends StatefulWidget {
@override
_FutureBuilderTestState createState() => _FutureBuilderTestState();
}
class _FutureBuilderTestState extends St... | |
flutter_classes/345451_163_0.txt | All reactions
* 👍 1 reaction | |
flutter_classes/345451_24_0.txt | ## Use saved searches to filter your results more quickly
Name | |
flutter_classes/345451_74_0.txt | My 2¢:
* I personally had this problem when started using Flutter. Exceptions were handled silently and we didn't knew that they even happen.
* But... This is breaking change AND it will not be visible for developers immediately after Flutter version update in project. For many error will appear only after releas... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.