{"id":17684624,"url":"https://github.com/mattrltrent/core_utils","last_synced_at":"2025-05-12T23:54:50.469Z","repository":{"id":61990324,"uuid":"556919570","full_name":"mattrltrent/core_utils","owner":"mattrltrent","description":"A Flutter Pub package that contains common utilities.","archived":false,"fork":false,"pushed_at":"2023-12-02T03:38:46.000Z","size":6499,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T23:54:43.629Z","etag":null,"topics":["dart","flutter","package","pub"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/core_utils","language":"C++","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/mattrltrent.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":"2022-10-24T19:08:03.000Z","updated_at":"2022-10-25T07:15:10.000Z","dependencies_parsed_at":"2024-10-24T13:00:33.677Z","dependency_job_id":"4751af1a-aa57-4ce0-b4da-6e19141ba571","html_url":"https://github.com/mattrltrent/core_utils","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"af73ce6722bceb35ebffcf6b36e4b7cc340b072c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattrltrent%2Fcore_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattrltrent%2Fcore_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattrltrent%2Fcore_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattrltrent%2Fcore_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattrltrent","download_url":"https://codeload.github.com/mattrltrent/core_utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843194,"owners_count":21972871,"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":["dart","flutter","package","pub"],"created_at":"2024-10-24T10:24:17.778Z","updated_at":"2025-05-12T23:54:50.441Z","avatar_url":"https://github.com/mattrltrent.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![analytics](https://hidden-coast-90561-45544df95b1b.herokuapp.com/api/v1/analytics/?kind=package-core-utils)\n\n# A package containing helpful utility functions and widgets for Flutter projects.\n\n-\u003e Submit an issue [here](https://github.com/mattrltrent/core_utils/issues).\n-\u003e Create a pull request [here](https://github.com/mattrltrent/core_utils/pulls).\n-\u003e Contact me via email [here](mailto:me@matthewtrent.me).\n\n## Popular Utils 🔥\n\n- Responsive widget that rebuilds for mobile, tablet, and desktop views.\n  - `ResponsiveView(mobile: YOUR_WIDGET, tablet: YOUR_WIDGET, desktop: YOUR_WIDGET)`\n- Shorthands for `MediaQuery.of(context).size.HEIGHT/WIDTH * SOME_FRACTION`\n  - `heightFrac(context, SOME_FRACTION)`\n  - `widthFrac(context, SOME_FRACTION)`\n- Number formatting.\n  - `largeNumberFormatter(int number)` -\u003e Example: 1812212 to \"1.8m\"\n  - `numberPostfix(int number)` -\u003e Example: 4 to \"th\", or 3 to \"rd\"\n- **And much more, just scroll down for the list of functions/widgets!**\n\n## Example Gif 📸\n\n\u003cimg src=\"https://github.com/mattrltrent/core_utils/blob/main/resources/example.gif?raw=true\" style=\"display: inline\"/\u003e\n\n## Functions: Numbers 📜\n\n### **Checks if the integer passed is plural.**\n\n```dart\nbool isPlural(int number);\n\nExample: 13 -\u003e true\n```\n\n### **Converts large numbers into smaller representations with letters.**\n\n```dart\nString largeNumberFormatter(\nint  number, {\nString  billionLetter  =  \"b\",\nString  millionLetter  =  \"m\",\nString  thousandLetter  =  \"k\",\n});\n```\n\nExample: 1,812,398 -\u003e \"1.8m\"\n\n### **Adds a postfix to numbers.**\n\n```dart\nString numberPostfix(int number);\n```\n\nExample: 4 -\u003e \"4th\"\n\n## Functions: Sizing 📜\n\n### **Height fraction of screen, up to a set point.**\n\n```dart\ndouble heightBreakpointFrac(Buildcontext context, double fraction, double lockPoint);\n```\n\nExample: If you set fraction as 1/4, then this will return 1/4 \\* screen\nheight up to the point that you set as lockPoint.\n\n### **Width fraction of screen, up to a set point.**\n\n```dart\ndouble widthBreakpointFrac(Buildcontext context, double fraction, double lockPoint);\n```\n\nExample: If you set fraction as 1/4, then this will return 1/4 \\* screen\nwidth up to the point that you set as lockPoint.\n\n### **Height fraction of screen.**\n\n```dart\ndouble  heightFrac(BuildContext  context, double  fraction);\n```\n\nExample: If you set fraction as 1/5, then it will return\n1/5 \\* screen height.\n\n### **Width fraction of screen.**\n\n```dart\ndouble  widthFrac(BuildContext  context, double  fraction);\n```\n\nExample: If you set fraction as 1/5, then it will return\n1/5 \\* screen width.\n\n### **Height excluding top or bottom safe area.**\n\n```dart\ndouble  heightWithoutSafeArea(BuildContext  context,{bool  withoutTopSafeArea  =  true, bool  withoutBottomSafeArea  =  true});\n```\n\nExample: Will return the height of the screen excluding\neither the top or bottom safe area heights.\n\n### **Number until limit.**\n\n```dart\ndouble  numberUntilLimit(double number, double limit);\n```\n\nExample: If number is the screen width and limit is 200, then this will\nreturn the screen width until limit is reached, then it will just\nreturn 200.\n\n## Functions: Types 📜\n\n### **Checks if value is null.**\n\n```dart\nbool  isNull(dynamic value);\n```\n\nExample: If null is passed, this will return true. Otherwise, it\nwould return false.\n\n### **Checks if value is not null.**\n\n```dart\nbool  notNull(dynamic value);\n```\n\nExample: If \"14\" is passed, this will return true.\n\n## Functions: Validators 📜\n\n### **Passed String is empty checker.**\n\n```dart\nbool emptyValidator(String value);\n```\n\nExample: If \" \" is passed, then it will return false.\n\n### **Passed list of Strings is empty checker.**\n\n```dart\nbool  multipleEmptyValidator(List\u003cString\u003e values);\n```\n\nExample: If [\"test1\", \"test2\", \" \"] is passed, then it will return false;\n\n## Widgets: Sizing 📜\n\n### **Mobile, Tablet, and Desktop view builder.**\n\n```dart\nResponsiveView(\n\t mobile: Scaffold(...),\n\t tablet: Scaffold(...),\n\t desktop: Scaffold(...),\n);\n```\n\nExample: Builds out 3 different views based on screen width breakpoints.\nBreakpoint values can be customized.\n\n### **SizedBox same height as bottom safe area.**\n\n```dart\nSimulatedBottomSafeArea(\n\t heightMultiplier: 2,\n);\n```\n\nExample: Returns a SizedBox with the height of the bottom\nsafe area \\* heightMultiplier. Useful for lists where you desire\nthem to be scrolled without being wrapped with a SafeArea, but\ndon't want the last list item to be obscured by it. Usually, placed at\nthe end of a long list of widgets.\n\n## Additional Info 📣\n\n- The package is always open to improvements, suggestions, and additions!\n\n- I'll deal with PRs and issues as soon as I can!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattrltrent%2Fcore_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattrltrent%2Fcore_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattrltrent%2Fcore_utils/lists"}