taro 1.0.1 taro: ^1.0.1 copied to clipboard
Taro is a library for loading data from network and saving it to storage to speed up data loading.
import 'package:dio/dio.dart';
import 'package:example/app.dart';
import 'package:example/dio_http.dart';
import 'package:flutter/material.dart';
import 'package:taro/taro.dart';
void main() {
const useDio = true;
if (useDio) {
Taro.instance.networkLoader = TaroLoaderNetwork(
client: DioHttp(
dio: Dio()
..options.connectTimeout = const Duration(seconds: 10)
..options.receiveTimeout = const Duration(seconds: 10),
),
);
}
runApp(const App());
}