Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fedotxxl/15b4dcdacdf06fa5d1cf96e138224d60 to your computer and use it in GitHub Desktop.
Save fedotxxl/15b4dcdacdf06fa5d1cf96e138224d60 to your computer and use it in GitHub Desktop.
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