{"id":21723141,"url":"https://github.com/theiskaa/layoutry","last_synced_at":"2026-01-11T04:42:46.896Z","repository":{"id":65204772,"uuid":"587423751","full_name":"theiskaa/layoutry","owner":"theiskaa","description":"A simple layout information builder for your Flutter project","archived":false,"fork":false,"pushed_at":"2024-10-27T06:59:46.000Z","size":9,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T22:03:53.445Z","etag":null,"topics":["flutter","flutter-layout","flutter-package","layout-builder"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/layoutry","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theiskaa.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}},"created_at":"2023-01-10T18:08:24.000Z","updated_at":"2025-01-25T08:12:16.000Z","dependencies_parsed_at":"2024-10-27T07:53:25.916Z","dependency_job_id":"a9ebc600-1c33-4f4b-b9d8-6afd1e68f284","html_url":"https://github.com/theiskaa/layoutry","commit_stats":null,"previous_names":["theiskaa/layoutry","insolite-dev/layoutry"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiskaa%2Flayoutry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiskaa%2Flayoutry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiskaa%2Flayoutry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiskaa%2Flayoutry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theiskaa","download_url":"https://codeload.github.com/theiskaa/layoutry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637772,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["flutter","flutter-layout","flutter-package","layout-builder"],"created_at":"2024-11-26T02:37:16.738Z","updated_at":"2026-01-11T04:42:46.869Z","avatar_url":"https://github.com/theiskaa.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Layoutry\n\n\u003cp align=\"center\"\u003e\n \u003cbr\u003e\n \u003cimg width=\"400\" src=\"https://user-images.githubusercontent.com/59066341/211650854-e7350bd8-aba9-430b-a216-057c126e7354.svg\" alt=\"Package Logo\"\u003e\n \u003cbr\u003e\n \u003cbr\u003e\n \u003ca href=\"https://pub.dev/packages/layoutry\"\u003e\n  \u003cimg src=\"https://img.shields.io/pub/v/layoutry?color=blue\" alt=\"pub version\" /\u003e\n \u003c/a\u003e\n  \u003ca href=\"https://github.com/theiskaa/layoutry/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-red.svg\"\n      alt=\"License: MIT\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Installing\n**See the official installing guidline from [layoutry/install](https://pub.dev/packages/layoutry/install)**\n\n## Usage \u0026 Overview\n\n\u003cimg width=\"1000\" src=\"https://user-images.githubusercontent.com/59066341/211651068-27f5ca62-4d0d-44fa-b87d-7924605c017c.gif\" alt=\"Package Example Overview\"\u003e\n\nLayoutry is a modified implementation of the **LayoutBuilder**, so that we can use its **LayoutInfo** to easily catch the device's type via its screen size.\nWhere the **LayoutDevice** is a custom `Platform.operatingSystem` implementation `enum`, which used to mark current device's type by screen size.\n\nHere is the code:\n```dart\nLayoutry(\n  builder: (context, info) {\n    // A manual defined layout-device to color map.\n    final colors = \u003cLayoutDevice, Color\u003e{\n      LayoutDevice.mobile: Colors.blue,\n      LayoutDevice.tablet: Colors.red,\n      LayoutDevice.web: Colors.green,\n    };\n\n    return AnimatedContainer(\n      duration: const Duration(milliseconds: 500),\n      // color will be generated from [colors],\n      // by listening to device's screen size.\n      color: colors[info.device],\n      child: Center(child: Builder(builder: (context) {\n        // If the device's screen size is like mobile:\n        // \"Hi Mobile\" will written in the screen.\n        if (info.device.isMobile()) {\n          return const Text(\n            'Hi Mobile',\n            style: TextStyle(color: Colors.white, fontSize: 20),\n          );\n        }\n\n        // If the device's screen size is like web:\n        // \"Hi Web\" will written in the screen.\n        if (info.device.isWeb()) {\n          return const Text(\n            'Hi Web',\n            style: TextStyle(color: Colors.white, fontSize: 20),\n          );\n        }\n\n        // In other cases: Hi current device's screen size\n        // appropriate device type will be written in the screen.\n        return Text(\n          'Hi ${info.device.toString()}',\n          style: const TextStyle(color: Colors.white, fontSize: 20),\n        );\n      })),\n    );\n  },\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheiskaa%2Flayoutry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheiskaa%2Flayoutry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheiskaa%2Flayoutry/lists"}