skip to Main Content

Flutter – Exception handling inside FutureBuilder

import 'package:flutter/material.dart'; void main() { runApp(const MainApp()); } class MainApp extends StatelessWidget { const MainApp({super.key}); Future<void> _initialize() async { await Future.delayed(const Duration(seconds: 2)); try { throw Exception("Error"); } catch (e) {} } @override Widget build(BuildContext context) { return MaterialApp( home:…

VIEW QUESTION
Back To Top
Search