This file contains hidden or 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 'dart:async'; | |
| class Result { | |
| final dynamic value; | |
| final bool isSuccess; | |
| Result.success(this.value) : isSuccess = true; | |
| Result.error() : value = null, isSuccess = false; | |
| } |
This file contains hidden or 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 'dart:async'; | |
| import 'package:flutter/material.dart'; | |
| typedef LoadingBuilder = Widget Function(BuildContext); | |
| typedef DataBuilder<T> = Widget Function(BuildContext, T?); | |
| typedef ErrorBuilder<T> = Widget Function(BuildContext, dynamic, T?); | |
| class FutureUpdater<T> extends StatefulWidget { | |
| const FutureUpdater({ |