Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Randal L. Schwartz
@RandalSchwartz
yeah, your syntax matches
int id2 = await txn.rawInsert(
      'INSERT INTO Test(name, value, num) VALUES(?, ?, ?)',
      ['another name', 12345678, 3.1416]);
  print('inserted2: $id2');
});
from the official doc
Ghost
@ghost~5f8f66f2d73408ce4ff20dd5
whats the best way to wait for an async function in a synchronous function?
Randal L. Schwartz
@RandalSchwartz
You can’t.
If any method is marked async, or uses the explicit Future/Stream protocol, everything that invokes it (and recursively) must also be non-blocking.
Randal L. Schwartz
@RandalSchwartz
More simply, if it returns a Future<…> or a Stream<…>, it and everything that invokes it must be treated as returning a Future or Stream.
matrixbot
@matrixbot
yeetmeokayimdead2222 hi
yeetmeokayimdead2222 what is future/stream?
matrixbot
@matrixbot
yeetmeokayimdead2222 thank u
Randal L. Schwartz
@RandalSchwartz
You’re welcome!
matrixbot
@matrixbot
yeetmeokayimdead2222 so, what is this group about!?
Randal L. Schwartz
@RandalSchwartz
Are you trolling now? Why would you ask about future/stream without some idea of the channel?
matrixbot
@matrixbot
yeetmeokayimdead2222 ...
yeetmeokayimdead2222 um
Randal L. Schwartz
@RandalSchwartz
this is a serious discussion about the framework described at http://flutter.dev
matrixbot
@matrixbot
yeetmeokayimdead2222 oh ok
yeetmeokayimdead2222 thanks again
Ghost
@ghost~5f8f66f2d73408ce4ff20dd5
@RandalSchwartz thank you
So many things I am trying to do dont work without explanation
=$
Randal L. Schwartz
@RandalSchwartz
heh
matrixbot
@matrixbot
yeetmeokayimdead2222 ...
yeetmeokayimdead2222 what does flutter mean in a business
Ghost
@ghost~5f8f66f2d73408ce4ff20dd5
I am trying to control the state in a series of children from the main thread which is reading multicast data. The only way I have found to do this is to create a thread with a receive port, that sends its sendPort to the main thread an the main thread passes that sendport to each child widget, and those child widgets create receive ports and send their send ports to that main receive port
very convoluted
Getting hung up on the fact that Statefulwidgets constructors are synchronous and cant synchronize an asynchronous call
*gasp
matrixbot
@matrixbot
yeetmeokayimdead2222 oh
yeetmeokayimdead2222 cool!
yeetmeokayimdead2222 i am new here!
Ghost
@ghost~5f8f66f2d73408ce4ff20dd5
What I find is that the problem I am trying to solve is very simple - but the problems with flutter I am trying to work around are very complex
And taking a lot of time to work around
matrixbot
@matrixbot
yeetmeokayimdead2222 oh
Randal L. Schwartz
@RandalSchwartz
I think initState is async for Stateful. That should be sufficient.
Ahh returns void effectively can return a Future or Stream that’s ignored.
matrixbot
@matrixbot
yeetmeokayimdead2222 yall voten for trump or biden?
Randal L. Schwartz
@RandalSchwartz
Not appropriate here, yeetmeookayimdead2222
matrixbot
@matrixbot
yeetmeokayimdead2222 oh sorry.
matrixbot
@matrixbot
yeetmeokayimdead2222 i am so so so so so very sorry sir.
Ghost
@ghost~5f8f66f2d73408ce4ff20dd5
if I am receiving many sendports from different widgets on one receiveport, how do I differentiate them? Can I do it by the sendport hash?
bristolsamo
@bristolsamo
Can someone help me out with these errors I/flutter (18990): Another exception was thrown: Each child must be laid out exactly once.
I/flutter (18990): Another exception was thrown: AnimatedTextState.initState() returned a Future.
I/flutter (18990): Another exception was thrown: Each child must be laid out exactly once.
I/flutter (18990): Another exception was thrown: Updated layout information required for RenderErrorBox#26491 NEEDS-LAYOUT NEEDS-PAINT to calculate semantics.
Waiter Huge
@im_mhrzd_twitter
hi guys. I want a custom widget that is a textfield and opens a dialog on tap. in the dialog, user choose a number and it shows it in the textfield when the dialog is popped back.
I pass a variable to dialog and change it there which I think should work, but the problem is I can't show it in the textfield as there is no "on popped back" function.
anyone can help?
matrixbot
@matrixbot
stonegate What you need is ValueChanged
Ghost
@ghost~5f8f66f2d73408ce4ff20dd5
I resolved my issue. I didnt realize you could send a list over a send/receive port
Waiter Huge
@im_mhrzd_twitter
:point_up: October 23, 2020 7:48 PM can you explain how to use it? sorry I'm a beginner.
stonegate
@stonega
 class TextFiledWidget extends StatelessWidget {
  const TextFiledWidget({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return DialogWidget(onSelected: (value) {});
  }
}

class DialogWidget extends StatelessWidget {
  final ValueChanged<int> onSelected;
  DialogWidget({this.onSelected, Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Center(),
    );
  }
}