{"id":15519595,"url":"https://github.com/alnitak/magnifying_glass","last_synced_at":"2025-04-23T03:34:49.558Z","repository":{"id":42561254,"uuid":"442545587","full_name":"alnitak/magnifying_glass","owner":"alnitak","description":"Flutter real-time magnifying glass lens widget with Barrel/Pincushion distortion","archived":false,"fork":false,"pushed_at":"2024-09-28T09:03:44.000Z","size":8184,"stargazers_count":23,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T19:16:59.433Z","etag":null,"topics":["flutter","flutter-package","flutter-ui","flutter-widgets","glass","lens"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alnitak.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":"2021-12-28T18:07:12.000Z","updated_at":"2025-02-16T14:23:16.000Z","dependencies_parsed_at":"2022-09-09T14:01:13.821Z","dependency_job_id":"394ca9ab-8976-489f-bd8f-6bf4a5a892f2","html_url":"https://github.com/alnitak/magnifying_glass","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alnitak%2Fmagnifying_glass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alnitak%2Fmagnifying_glass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alnitak%2Fmagnifying_glass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alnitak%2Fmagnifying_glass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alnitak","download_url":"https://codeload.github.com/alnitak/magnifying_glass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366285,"owners_count":21418766,"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-package","flutter-ui","flutter-widgets","glass","lens"],"created_at":"2024-10-02T10:22:05.972Z","updated_at":"2025-04-23T03:34:49.542Z","avatar_url":"https://github.com/alnitak.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/marcobavag"],"categories":["Dart"],"sub_categories":[],"readme":"# MagnifyingGlass Flutter plugin\n\nFlutter real-time magnifying glass lens widget with Barrel/Pincushion distortion.\n\n![Screenshot](https://github.com/alnitak/magnifying_glass/blob/master/img/magnifying_glass.gif?raw=true \"Magnifying Glass Demo\")\n\n\u003ca href=\"https://www.buymeacoffee.com/marcobavag\" target=\"_blank\"\u003e\u003cimg align=\"left\" src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n## Getting Started\n\nMake [MagnifyingGlass] widget as the parent of the widget you wish to be used (usually MyHomePage).\n\n```dart\n    @override\n    Widget build(BuildContext context) {\n    MagnifyingGlassController magnifyingGlassController = MagnifyingGlassController();\n    return MagnifyingGlass(\n      controller: magnifyingGlassController,\n      glassPosition: GlassPosition.touchPosition,\n      borderThickness: 8.0,\n      borderColor: Colors.grey,\n      glassParams: GlassParams(\n        startingPosition: Offset(150, 150),\n        diameter: 150,\n        distortion: 1.0,\n        magnification: 1.2,\n        padding: EdgeInsets.all(10),\n      ),\n      child: Scaffold( \n        body: ...,\n\n        floatingActionButton: FloatingActionButton(\n          onPressed: () =\u003e magnifyingGlassController.openGlass(),\n          child: const Icon(Icons.search),\n        ),\n      )\n    );\n```\n\n## MagnifyingGlass properties\n\n|Name|Type|Description|\n|:-------|:----------|:-----------|\n**controller**|MagnifyingGlassController|Let you control the glass state and parameters: \u003cbr\u003e**openGlass()**\u003cbr\u003e**closeGlass()**\u003cbr\u003e**setDistortion(** *double distortion, double magnification* **)**\u003cbr\u003e**setDiameter(** *int diameter* **)**\u003cbr\u003e**refresh()**|\n**glassPosition**|enum|enum to set the touch behavior or sticky position|\n**glassParams**|GlassParams|class to set lens parameters|\n**borderColor**|Color|border color|\n**borderThickness**|double|border thickness|\n**elevation**|double|shadow elevation|\n**shadowOffset**|Offset|shadow offset|\n\n\u003cbr\u003e\n\n**GlassPosition class**\n\n|Name|Description|\n|:-------|:-----------|\n**touchPosition**|move the glass with finger touch|\n**topLeft**|sticky position to top left corner of the screen|\n**topRight**|sticky position to top rigth corner of the screen|\n**bottomLeft**|sticky position to bottom left corner of the screen|\n**bottomRight**|sticky position to bottom right corner of the screen|\n\n\u003cbr\u003e\n\n**GlassParams class**\n\n|Name|Description|\n|:-------|:-----------|\n**startingPosition**|the startin glass position. If not given the lens will be placed at the center of the screen.|\n**diameter**|the diameter of the glass|\n**magnification**|the magnification of the lens\u003cbr\u003e1 means no magnification\u003cbr\u003e\u003e1 means magnification\u003cbr\u003e\u003c1 means shrinking|\n**distortion**|Barrel/Pincushion distortion power\u003cbr\u003e0 means no distortion|\n**padding**|the padding surrounding the glass to enlarge touching area|\n\n| ![distorsion0.5-mag1.0.png](https://github.com/alnitak/magnifying_glass/blob/master/img/distorsion0.5-mag1.0.png?raw=true) | ![distorsion0.5-mag1.4.png](https://github.com/alnitak/magnifying_glass/blob/master/img/distorsion0.5-mag1.4.png?raw=true) | ![distorsion2.0-mag1.7.png](https://github.com/alnitak/magnifying_glass/blob/master/img/distorsion2.0-mag1.7.png?raw=true) | \n|:--:|:--:|:--:|\n| *distorsion 0.5 \u003cbr\u003e mag 1.0* | *distorsion 0.5 \u003cbr\u003e mag 1.4* | *distorsion 2.0 \u003cbr\u003e mag 1.7* |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falnitak%2Fmagnifying_glass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falnitak%2Fmagnifying_glass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falnitak%2Fmagnifying_glass/lists"}