The darkTheme property is currently always applied when the underlying platform wants to be dark — and it *only* applies when the underlying platform wants to be dark. You may want to do something like:
theme: myBlocWantsLight ? lightTheme : darkTheme,
It depends on what the relationship is between your theme and your BLoCs. Generally speaking, I would not expect a “Business Logic Component” to have a relationship with your visual theme.
New Flutter developers are likely to work exclusively with widgets, so elements and render objects are ignored. The phrase “everything in Flutter is a widget” is a way of introducing new developers to Flutter, but I agree that the statement is inaccurate.
Would you like to coordinate polish on fluttery_audio? If you can help drive use cases then I can try to get them implemented. I had two goals with fluttery_audio. First, provide a great reactive style API instead of imperative. Second, get the most important features working cross platform.
It looks like you’ll have to add an incoming property called onDismiss, which is a VoidCallback. Then invoke that callback from the dismiss() method:
It’s part of Dart’s constructor syntax. All final properties must be initialized before the body of a constructor, which means you either have to give them values within the constructor’s parameter list, or you need to initialize those properties after the parameter list by placing them after the colon. You should check out the Dart language specification if you’re curious about that.