{"id":21486070,"url":"https://github.com/felipecastrosales/flutter_error","last_synced_at":"2026-02-02T20:34:07.658Z","repository":{"id":184826676,"uuid":"672280514","full_name":"felipecastrosales/flutter_error","owner":"felipecastrosales","description":"💡 | Flutter Custom Error Page - avoid red screen in debug / grey screen in release. ","archived":false,"fork":false,"pushed_at":"2024-07-06T14:02:53.000Z","size":608,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-07T16:33:35.318Z","etag":null,"topics":["app","application","apps","dart","debug","development","flutter","flutter-app","flutter-dev","flutter-examples","flutter-ui","hack","release","strategy"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipecastrosales.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-29T14:32:08.000Z","updated_at":"2024-07-06T14:02:57.000Z","dependencies_parsed_at":"2024-11-23T14:30:52.572Z","dependency_job_id":null,"html_url":"https://github.com/felipecastrosales/flutter_error","commit_stats":null,"previous_names":["felipecastrosales/flutter_error"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/felipecastrosales/flutter_error","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecastrosales%2Fflutter_error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecastrosales%2Fflutter_error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecastrosales%2Fflutter_error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecastrosales%2Fflutter_error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipecastrosales","download_url":"https://codeload.github.com/felipecastrosales/flutter_error/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecastrosales%2Fflutter_error/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29019460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:51:31.335Z","status":"ssl_error","status_checked_at":"2026-02-02T18:49:20.777Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app","application","apps","dart","debug","development","flutter","flutter-app","flutter-dev","flutter-examples","flutter-ui","hack","release","strategy"],"created_at":"2024-11-23T13:18:53.388Z","updated_at":"2026-02-02T20:34:07.625Z","avatar_url":"https://github.com/felipecastrosales.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Error Page\n\n### I'm sure you've seen this!\n\nDo you know how to customize this error screen?\n\n🐛 Debug Mode | 📱 Release Mode\n:-------------------------:|:-------------------------:\n\u003cimg src=\".github/images/mode_debug.png\" width=\"420\"\u003e | \u003cimg src=\".github/images/mode_release.png\" width=\"420\"\u003e\n\n---\n\nYou have certainly come across this red screen while developing applications, and you should also know that in release mode it turns grey.\n\nCan you imagine your users seeing this unfriendly screen? \n\n**There is the solution for this, and I'll show you.**\n\n---\n\n### How to make\n\nWhen an error occurs, the `ErrorWidget.builder` is called; and by default the behaviour is what we already know.\n\nBut we can customize this, returning a widget of our own.\n\n```dart\nreturn MaterialApp(\n  title: 'Flutter Error Page',\n  home: const MyHomePage(),\n  builder: (context, widget) {\n    ErrorWidget.builder = (FlutterErrorDetails errorDetails) {\n      return CustomError(errorDetails: errorDetails); // the custom widget\n    };\n\n    return widget ?? const SizedBox.shrink();\n  },\n);\n```\n\nJust return it in this callback.\n\nAnd on it, you can do absolutely whatever you want (remember to consider the *constraints*, available space, e.g) - happen at the most unexpected moment. 😆\n\n```dart\nreturn const MyAppCard(\n  color: Colors.red,\n  text: 'Um erro ocorreu.',\n);\n```\n\n---\n\n### How will it be\n\nExpected | Default Error | Release Error | Debug and/or Release with custom widget\n:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:\n\u003cimg src=\".github/images/grid_1.png\" width=\"420\"\u003e | \u003cimg src=\".github/images/grid_2.png\" width=\"420\"\u003e | \u003cimg src=\".github/images/grid_3.png\" width=\"420\"\u003e | \u003cimg src=\".github/images/grid_4.png\" width=\"420\"\u003e\n\n--- \n\n\u003e So, did you know this strategy? \n\u003e \n\u003e Star ⭐️ this project if you liked it, and share it! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipecastrosales%2Fflutter_error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipecastrosales%2Fflutter_error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipecastrosales%2Fflutter_error/lists"}