Created
July 6, 2020 21:19
-
-
Save fedotxxl/15b4dcdacdf06fa5d1cf96e138224d60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:evtrip/utils/my_future_builder.dart'; | |
import 'package:flutter/widgets.dart'; | |
class MyFutureNullableBuilder extends StatelessWidget { | |
final Future<bool> future; | |
final AsyncWidgetBuilder<bool> builder; | |
MyFutureNullableBuilder({ | |
Key key, | |
Future<dynamic> future, | |
@required this.builder, | |
}) : assert(builder != null), | |
future = future.then((value) => true), | |
super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return MyFutureBuilder( | |
future: future, | |
builder: builder, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment