2024-02-13 15:22:59 +01:00

564 B

Flutter

Was ist Flutter [@FlutterArchitecturalOverviewb]

test [@weiserComputer21stCentury1999]

import 'package:retry/retry.dart';

final response = await retry(
  // Make a GET request
  () => http.get('https://google.com').timeout(Duration(seconds: 5)),
  // Retry on SocketException or TimeoutException
  retryIf: (e) => e is SocketException || e is TimeoutException,
);
print(response.body);

Nice Dart highlighting!

WORKING :)