async_view 0.0.1 copy "async_view: ^0.0.1" to clipboard
async_view: ^0.0.1 copied to clipboard

A async load widget

async_view #

Usage #

AsyncView<String>(
  initialData: "Initial Result",
  builder: (context, result) {
    ///main view builder
    return Text("show result:$result");
  },
  retryChildBuilder: (context) {
    ///retry button child view
    return Text("Retry Button child");
  },
  loadingBuilder: (context) {
    ///loading view
    return Center(child: CircularProgressIndicator());
  },
  future: (context) async {
    ///async function
    await Future.delayed(Duration(milliseconds: 100));
    return "test result";
  },
);
1
likes
20
pub points
0%
popularity

Publisher

verified publisherjtechhub.me

A async load widget

Homepage

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on async_view