{"id":32271722,"url":"https://github.com/nerdy-pro/flutter-adaptive-layout","last_synced_at":"2026-05-17T02:35:21.373Z","repository":{"id":153901812,"uuid":"631056936","full_name":"nerdy-pro/flutter-adaptive-layout","owner":"nerdy-pro","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-21T23:36:03.000Z","size":493,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T22:57:22.177Z","etag":null,"topics":["dart","flutter","pubdev"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_adaptive_layout","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nerdy-pro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-21T20:18:00.000Z","updated_at":"2023-05-14T22:11:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb4aed10-f27c-4350-8912-14f02dc6c155","html_url":"https://github.com/nerdy-pro/flutter-adaptive-layout","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nerdy-pro/flutter-adaptive-layout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdy-pro%2Fflutter-adaptive-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdy-pro%2Fflutter-adaptive-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdy-pro%2Fflutter-adaptive-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdy-pro%2Fflutter-adaptive-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nerdy-pro","download_url":"https://codeload.github.com/nerdy-pro/flutter-adaptive-layout/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdy-pro%2Fflutter-adaptive-layout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33125323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"online","status_checked_at":"2026-05-17T02:00:05.366Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dart","flutter","pubdev"],"created_at":"2025-10-22T22:57:21.329Z","updated_at":"2026-05-17T02:35:21.332Z","avatar_url":"https://github.com/nerdy-pro.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_adaptive_layout\n\n![Pub Version](https://img.shields.io/pub/v/flutter_adaptive_layout)\n![GitHub](https://img.shields.io/github/license/nerdy-pro/flutter-adaptive-layout)\n\nA convenient way to implement screen-size-driven layouts for your widgets.\n\n## Features\n\n- extracts device's screen size\n- applies provided (or overriden) breakpoints for the screen size\n- renders a provided layout variant for the extracted screen size\n\n## Gallery\n\n| iPhone 14                                                                                      | iPad Mini                                                                                      | iPad Pro 12\"                                                                                             |\n|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| ![iPhone 14](https://github.com/nerdy-pro/flutter-adaptive-layout/blob/main/img/iphone_14.png) | ![iPad Mini](https://github.com/nerdy-pro/flutter-adaptive-layout/blob/main/img/ipad_mini.png) | ![iPad Pro 12 inch](https://github.com/nerdy-pro/flutter-adaptive-layout/blob/main/img/ipad_12_inch.png) |\n\n## Getting started\n\n- install the library\n\n```shell\nflutter pub add flutter_adaptive_layout\n```\n\n- import the library\n\n```dart\nimport 'package:flutter_adaptive_layout/flutter_adaptive_layout.dart';\n```\n\n- wrap your widget with an `AdaptiveLayout` builder\n\n```dart\nWidget build(BuildContext context) {\n  return AdaptiveLayout(\n    smallBuilder: (context, child) =\u003e child!,\n    mediumBuilder: (context, child) =\u003e\n        Center(\n          child: Material(\n            color: Colors.white,\n            elevation: 4,\n            shape: RoundedRectangleBorder(\n              borderRadius: BorderRadius.circular(16),\n            ),\n            child: ConstrainedBox(\n              constraints: BoxConstraints.tight(const Size.square(400)),\n              child: child,\n            ),\n          ),\n        ),\n    largeBuilder: (context, child) =\u003e\n        Center(\n          child: Material(\n            color: Colors.white,\n            elevation: 4,\n            shape: RoundedRectangleBorder(\n              borderRadius: BorderRadius.circular(16),\n            ),\n            child: ConstrainedBox(\n              constraints: BoxConstraints.tight(const Size.square(600)),\n              child: child,\n            ),\n          ),\n        ),\n    child: const MyHomePage(),\n  );\n}\n```\n\n## Usage\n\nWorking example can be found in [/example](https://github.com/nerdy-pro/flutter-adaptive-layout/tree/main/example)\ndirectory\n\nDefault breakpoints are set to `400` for small-medium screens and `600` for medium-large screens.\nYou optionally can change these by providing `smallBreakpoint` and `mediumBreakpoint` variables in `BreakpointQualifier`\nfor an `AdaptiveLayout`\n\n```dart\nWidget build(BuildContext context) {\n  return AdaptiveLayout(\n    qualifier: BreakpointsQualifier(\n      smallBreakpoint: 300,\n      mediumBreakpoint: 700,\n    ),\n    smallBuilder: ...,\n    mediumBuilder: ...,\n    largeBuilder: ...,\n    child: ...,\n  );\n}\n```\n\nOr instead you also can implement your own `ScreenSizeQualifier`.\n\nAlso you can override the default breakpoints by wrapping your widget tree with an `BreakpointsSetting` instance:\n\n```dart\nWidget build(BuildContext context) {\n  return BreakpointsSetting(\n    smallScreenBreakpoint: 200,\n    mediumScreenBreakpoint: 500,\n    child: MaterialApp(...),\n  );\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerdy-pro%2Fflutter-adaptive-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnerdy-pro%2Fflutter-adaptive-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerdy-pro%2Fflutter-adaptive-layout/lists"}