Closed billyurs closed 5 years ago
You should read what the error is and then fix it 😄
You need a controller. Not a stream. So provide the controller. Not the stream
use
StreamProvider
StreamProvider
I get the error error: The argument type 'Widget Function(BuildContext)' can't be assigned to the parameter type 'Widget Function(BuildContext, Widget)'. (argument_type_not_assignable at [appint] lib/main.dart:32) when I try to put this in main.dart
@c-shashank seems like you're trying to supply a Widget where it expects a function that returns a widget. Use
(context) => Widget()
instead of
Widget()
I am getting error at this line
@override Widget build(BuildContext context) { return StreamProvider(
builder: (context) => LocationService().locationStream,
child: MaterialApp(title: 'Flutter Demo', home: HomeView()));
}