{"id":32300536,"url":"https://github.com/kishormainali/fp_util","last_synced_at":"2026-02-22T18:03:17.247Z","repository":{"id":182199266,"uuid":"656094580","full_name":"kishormainali/fp_util","owner":"kishormainali","description":"Utilities and Extensions for num, BuildContext, EdgeInsets, File, String. Constants for horizontal and vertical spacing.","archived":false,"fork":false,"pushed_at":"2025-10-14T03:10:15.000Z","size":28354,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-23T05:32:22.727Z","etag":null,"topics":["bottomsheet","dart","dialogs","extensions","flutter","inputs","logger","snackbars","utility-library"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/fp_util","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kishormainali.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-06-20T08:47:41.000Z","updated_at":"2025-10-14T03:08:42.000Z","dependencies_parsed_at":"2023-07-19T04:39:36.578Z","dependency_job_id":"da05bdbe-af21-40f5-a98b-5bc34856185e","html_url":"https://github.com/kishormainali/fp_util","commit_stats":null,"previous_names":["kishormainali/fp_util"],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/kishormainali/fp_util","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishormainali%2Ffp_util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishormainali%2Ffp_util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishormainali%2Ffp_util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishormainali%2Ffp_util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kishormainali","download_url":"https://codeload.github.com/kishormainali/fp_util/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishormainali%2Ffp_util/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29721056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: 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":["bottomsheet","dart","dialogs","extensions","flutter","inputs","logger","snackbars","utility-library"],"created_at":"2025-10-23T05:20:49.069Z","updated_at":"2026-02-22T18:03:17.239Z","avatar_url":"https://github.com/kishormainali.png","language":"Dart","readme":"# FPUtil\n\n![Image](https://raw.githubusercontent.com/kishormainali/fp_util/main/assets/full_logo.png)\n\n[![pub package](https://img.shields.io/pub/v/fp_util.svg)](https://pub.dev/packages/fp_util)\n\n- Utilities and Extensions for num, BuildContext, EdgeInsets, File, String. Constants for horizontal and vertical spacing.\n- Social Buttons - Facebook, Google, Apple\n- Gradient Button\n- ImagePickerHelper for picking images and files\n\n\u003e [View full documentation](https://docs.kishormainali.com)\n\n## Constants\n\n##### Vertical Spacing\n\n```dart\n\nimport 'package:flutter/material.dart';\n\nclass SpacingTest extends StatelessWidget {\n const SpacingTest({super.key});\n\n @override\n Widget build(BuildContext context) {\n   return Column(\n     children: const [\n\n       /// 4px vertical space\n       Sizes.gap4,\n\n       /// 8px vertical space\n       Sizes.gap8,\n\n       /// 12px vertical space\n       Sizes.gap12,\n\n       /// 16px vertical space\n       Sizes.gap16,\n\n       /// 24px vertical space\n       Sizes.gap24,\n\n       /// 32px vertical space\n       Sizes.gap32,\n\n       /// 48px vertical space\n       Sizes.gap48,\n\n       /// 54px vertical space\n       Sizes.gap54,\n\n       /// 64px vertical space\n       Sizes.gap64,\n     ],\n   );\n }\n}\n```\n\n##### Horizontal Spacing\n\n```dart\n\nimport 'package:flutter/material.dart';\n\nclass SpacingTest extends StatelessWidget {\nconst SpacingTest({super.key});\n\n@override\nWidget build(BuildContext context) {\n  return Row(\n    children: const [\n\n      /// 4px horizontal space\n      Sizes.gap4,\n\n      /// 8px horizontal space\n      Sizes.gap8,\n\n      /// 12px horizontal space\n      Sizes.gap12,\n\n      /// 16px horizontal space\n      Sizes.gap16,\n\n      /// 24px horizontal space\n      Sizes.gap24,\n\n      /// 32px horizontal space\n      Sizes.gap32,\n\n      /// 48px horizontal space\n      Sizes.gap48,\n\n      /// 54px horizontal space\n      Sizes.gap54,\n\n      /// 64px horizontal space\n      Sizes.gap64,\n    ],\n  );\n}\n}\n```\n\n## Extensions\n\n#### String Extensions\n\n```dart\n\nString text = 'hello world';\n\n/// capitalize first letter of string\nfinal capitalize = text.capitalize;\n\n/// checks given string is null or empty\nbool isNullOrEmpty = text.isNullOrEmpty;\n\n/// checks given text is not null and not empty\nbool isNotNullNotEmpty = text.isNotNullNotEmpty;\n\n/// checks given string is blank\nbool isBlank = text.isBlank;\n\n/// checks given string os not blank\nbool isNotBlank = text.isNotBlank;\n\n/// checks string is email\nbool isEmail = text.isEmail;\n\n\n/// recase extensions\n\n/// snakeCase\nString snakeCase = text.snakeCase;\n\n/// capitalize\nString capitalize  = text.capitalize;\n\n/// camelCase\nString camelCase = text.camelCase;\n\n\n/// constantCase\nString constantCase = text.constantCase;\n\n/// sentenceCase\nString sentenceCase = text.sentenceCase;\n\n/// snakeCase\nString snakeCase = text.snakeCase;\n\n/// dotCase\nString dotCase = text.dotCase;\n\n/// paramCase\nString paramCase = text.paramCase;\n\n/// pathCase\nString pathCase = text.pathCase;\n\n/// pascalCase\nString pascalCase = text.pascalCase;\n\n/// headerCase\nString headerCase = text.headerCase;\n\n/// titleCase\nString titleCase = text.titleCase;\n\n/// lowercase\nString lowercase = text.lowercase;\n\n/// uppercase\nString uppercase = text.uppercase;\n\n\n\n/// returns default value is given string is blank\nString withDefault = text.getOrDefault('default value');\n\n/// return null if given string is nullOrEmpty\nString? withNull = text.getOrNull();\n\n/// checks string is valid phone number\nbool isPhoneNumber = text.isValidPhoneNumber;\n\n/// checks string is number\nbool isNumeric = text.isNumeric;\n\n/// removes whitespace from string\nString removeWhiteSpace = text.removeWhiteSpace;\n\n/// removes \\n from string\nString removeNextLine = text.removeNextLine;\n\n/// converts to bool\nbool? isBool = text.toBool;\n\n/// converts to int\nint? isInt = text.isInt;\n\n/// converts to double\ndouble? isDouble = text.toDouble;\n\n/// check string is valid url\nbool isUrl = text.isUrl;\n\n/// check string is image  path\nbool isImage = text.isImage;\n\n/// checks string is video path\nbool isVideo = text.isVideo;\n\n/// checks string is audio path\nbool isAudio = text.isAudio;\n\n/// checks string is pdf path\nbool isPdf = text.isPdf;\n\n/// checks string is text path\nbool isText = text.isTxt;\n\n/// checks string is office word file\nbool isDocx = text.isDocx;\n\n/// checks string is office excel\nbool isXls = text.isXls;\n\n/// checks string is office presentation file\nbool isPpt = text.isPpt;\n\n/// checks string is svg path\nbool isSvg = text.isSvg;\n\n/// checks string is xml file path\nbool isXml = text.isXml;\n\n/// checks string is file path\nbool isFile = text.isFile;\n\n```\n\n### Num Extensions\n\n- #### gap()\n\nCreates Gap with height or width according to its parent\n\n````dart\n\n###### Usage:\n\n```dart\nimport 'package:flutter/material.dart';\n\nclass SpacingYTest extends StatelessWidget {\n  const SpacingYTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        const Text('Text 1'),\n        10.gap(/*true if you want to use responsiveness*/),\n        const Text('Text 2'),\n      ],\n    );\n  }\n}\n\nclass SpacingXTest extends StatelessWidget {\n  const SpacingXTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Row(\n      children: [\n        const Text('Text 1'),\n        10.gap(/*true if you want to use responsiveness*/),\n        const Text('Text 2'),\n      ],\n    );\n  }\n}\n````\n\n- ##### Duration\n  - microseconds\n  - milliseconds\n  - seconds\n  - minutes\n  - hours\n  - days\n\n```dart\n\n/// Creates Duration on microseconds\nfinal duration = 10.microseconds;\n\n/// Creates Duration on milliseconds\nfinal duration = 10.milliseconds;\n\n/// Creates Duration on seconds\nfinal duration = 10.seconds;\n\n/// Creates Duration on minutes\nfinal duration = 10.minutes;\n\n/// Creates Duration on hours\nfinal duration = 10.hours;\n\n/// Creates Duration on days\nfinal duration = 10.days;\n\n```\n\n- ##### Delayed Duration\n  - delayedMicroSeconds()\n  - delayedMilliSeconds()\n  - delayedSeconds()\n  - delayedMinutes()\n  - delayedHours()\n\n```dart\n\n/// Creates Future of Duration on microseconds\nfinal duration = 10.delayedMicroSeconds(()async{\n  // optional callback\n});\n\n/// Creates Future of Duration on milliseconds\nfinal duration = 10.delayedMilliseconds(()async{\n  // optional callback\n});\n\n/// Creates Future of Duration on seconds\nfinal duration = 10.delayedSeconds(()async{\n  // optional callback\n});\n\n/// Creates Future of Duration on minutes\nfinal duration = 10.delayedMinutes(()async{\n  // optional callback\n});\n\n/// Creates Future of Duration on hours\nfinal duration = 10.delayedHours(()async{\n  // optional callback\n});\n\n\n```\n\n- ##### circularBorderRadius()\n\nCreated Circular Border Radius\n\n```dart\nimport 'package:flutter/material.dart';\n\nclass RadiusTest extends StatelessWidget {\n  const RadiusTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: BoxDecoration(\n        /// creates 10px rounded corner\n        borderRadius: 10.circularBorderRadius(/*true if you want to use responsiveness*/),\n      ),\n    );\n  }\n}\n```\n\n- ##### circularRadius()\n\nCreated Circular Radius\n\n```dart\nimport 'package:flutter/material.dart';\n\nclass RadiusTest extends StatelessWidget {\n  const RadiusTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: BoxDecoration(\n\n        /// creates 10px rounded corner for topLeft and topRight\n        borderRadius: BorderRadius.only(topLeft: 10.circularRadius(/*true if you want to use responsiveness*/),\n        topRight: 10.circularRadius(/*true if you want to use responsiveness*/),),),\n    );\n  }\n}\n```\n\n- ##### EdgeInsets\n\n  - all()\n  - padLeft()\n  - padRight()\n  - padTop()\n  - padBottom()\n  - padX()\n  - padY()\n\n```dart\nimport 'package:flutter/material.dart';\n\nclass EdgeInsetsTest extends StatelessWidget {\n  const EdgeInsetsTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n\n        /// creates padding with 10px all\n        Padding(padding: 10.all(/*true if you want to use responsiveness*/)),\n\n        /// creates padding with 10px top only\n        Padding(padding: 10.padTop(/*true if you want to use responsiveness*/)),\n\n        /// creates padding with 10px right only\n        Padding(padding: 10.padRight(/*true if you want to use responsiveness*/)),\n\n        /// creates padding with 10px bottom only\n        Padding(padding: 10.padBottom(/*true if you want to use responsiveness*/)),\n\n        /// creates padding with 10px left only\n        Padding(padding: 10.padLeft(/*true if you want to use responsiveness*/)),\n\n        /// creates padding with 10px horizontal\n        Padding(padding: 10.padX(/*true if you want to use responsiveness*/)),\n\n        /// creates padding with 10px vertical\n        Padding(padding: 10.padY(/*true if you want to use responsiveness*/)),\n      ],\n    );\n  }\n}\n\n```\n\n- ##### sliverVerticalSpace\n\nCreates SizedBox with height converted to sliver\n\n```dart\nimport 'package:flutter/material.dart';\n\nclass SliverSpaceY extends StatelessWidget {\n  const SliverSpaceY({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return CustomScrollView(\n      slivers: [\n        SliverList(/*children*/),\n        10.sliverVerticalSpace(/*true if you want to use responsiveness*/),\n        SliverList(/*children*/)\n      ],\n    );\n  }\n}\n\n```\n\n- ##### sliverHorizontalSpace\n\nCreates SizedBox with width converted to sliver\n\n```dart\n\nimport 'package:flutter/material.dart';\n\nclass SliverSpaceX extends StatelessWidget {\n  const SliverSpaceX({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return CustomScrollView(\n      scrollDirection: Axis.horizontal,\n      slivers: [\n        SliverPadding(padding: 10.all),\n        10.sliverHorizontalSpace(/*true if you want to use responsiveness*/),\n        SliverPadding(padding: 10.all),\n      ],\n    );\n  }\n}\n```\n\n### Widget Extensions\n\n- #### scrollable()\n\nMake widgets scrollable\n\n```dart\nimport 'package:flutter/material.dart';\n\nclass ScrollableTest extends StatelessWidget {\n  const ScrollableTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        Text('Text 1'),\n        Text('Text 2'),\n        Text('Text 3'),\n      ],\n    ).scrollable();\n  }\n}\n```\n\n- #### clickable()\n\nMake widgets clickable\n\n```dart\nimport 'package:flutter/material.dart';\n\nclass ClickableTest extends StatelessWidget {\n  const ClickableTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        Text('Text 1'),\n        Text('Text 2'),\n        Text('Text 3'),\n      ],\n    ).clickable(onTap: () {\n      /*\n      * onTap Callback\n      * */\n    },);\n  }\n}\n```\n\n- #### center()\n\nAlign widgets to center\n\n```dart\nimport 'package:flutter/material.dart';\n\nclass CenterTest extends StatelessWidget {\n  const CenterTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        Text('Text 1').center(),\n        Text('Text 2').center(),\n        Text('Text 3').center(),\n      ],\n    );\n  }\n}\n```\n\n- #### Align\n  - alignTopLeft()\n  - alignTopCenter()\n  - alignTopRight()\n  - alignCenterLeft()\n  - alignCenterRight()\n  - alignBottomLeft()\n  - alignBottomCenter()\n  - alignBottomRight()\n\nCreate Align widgets\n\n```dart\n\nimport 'package:flutter/material.dart';\n\nclass AlignTest extends StatelessWidget {\n  const AlignTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n\n        /// align top left\n        const Text('Text 1').alignTopLeft(),\n\n        /// align top center\n        const Text('Text 1').alignTopCenter(),\n\n        /// align top right\n        const Text('Text 1').alignTopRight(),\n\n        /// align center left\n        const Text('Text 1').alignCenterLeft(),\n\n        /// align center\n        const Text('Text 1').center(),\n\n        /// align center right\n        const Text('Text 1').alignCenterRight(),\n\n        /// align bottom left\n        const Text('Text 1').alignBottomLeft(),\n\n        /// align bottom center\n        const Text('Text 1').alignBottomCenter(),\n\n        /// align bottom right\n        const Text('Text 1').alignBottomRight(),\n      ],\n    );\n  }\n}\n```\n\n- #### Padding\n  - pad()\n  - padX()\n  - padY()\n  - padLeft()\n  - padTop()\n  - padRight()\n  - padBottom()\n  - padLTRB()\n\nWraps with padding widget\n\n```dart\n\nimport 'package:flutter/material.dart';\n\nclass PaddingTest extends StatelessWidget {\n  const PaddingTest({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n\n        /// wraps with all padding\n        const Text('Text 1').pad(10,responsive:true /* if you want to use responsiveness */),\n\n        /// wraps with left only padding\n        const Text('Text 1').padLeft(10,responsive:true /* if you want to use responsiveness */),\n\n        /// wraps with right only padding\n        const Text('Text 1').padRight(10,responsive:true /* if you want to use responsiveness */),\n\n        /// wraps with bottom only padding\n        const Text('Text 1').padBottom(10,responsive:true /* if you want to use responsiveness */),\n\n        /// wraps with top only padding\n        const Text('Text 1').padTop(10,responsive:true /* if you want to use responsiveness */),\n\n        /// wraps with horizontal padding\n        const Text('Text 1').padX(10,responsive:true /* if you want to use responsiveness */),\n\n        /// wraps width vertical padding\n        const Text('Text 1').padY(10,responsive:true /* if you want to use responsiveness */),\n\n        /// wraps widget with padding of left top right bottom\n        const Text('Text 1').padLTRB(left: 10,\n         top: 5, right: 10, bottom: 10,\n         responsive:true /* if you want to use responsiveness */\n         ),\n\n      ],\n    );\n  }\n}\n```\n\n### Context Extensions\n\n- #### theme\n- #### colorScheme\n\n  - primaryColor\n  - onPrimaryColor\n  - primaryContainerColor\n  - onPrimaryContainerColor\n\n  /// secondary colors\n\n  - secondaryColor\n  - onSecondaryColor\n  - secondaryContainerColor\n  - onSecondaryContainerColor\n\n  /// tertiary color\n\n  - tertiaryColor\n  - onTertiaryColor\n  - tertiaryContainerColor\n  - onTertiaryContainerColor\n\n  /// surface color\n\n  - surfaceColor\n  - onSurfaceColor\n\n  /// surface variant color\n\n  - surfaceVariantColor\n  - onSurfaceVariantColor\n\n  /// inverse colors\n\n  - inverseSurfaceColor\n  - onInverseSurfaceColor\n\n  /// background color\n\n  - backgroundColor\n  - onBackgroundContainerColor\n\n  /// outline color\n\n  - outlineColor\n  - outlineVariantColor\n\n  /// error colors\n\n  - errorColor\n  - onErrorColor\n  - errorContainerColor\n  - onErrorContainerColor\n\n- #### textTheme\n\n  - displayLarge\n  - displayMedium\n  - displaySmall\n  - headlineLarge\n  - headlineMedium\n  - headlineSmall\n  - titleLarge\n  - titleMedium\n  - titleSmall\n  - labelLarge\n  - labelMedium\n  - labelSmall\n  - bodyLarge\n  - bodyMedium\n  - bodySmall\n\n- #### size\n  - width\n  - height\n  - percentWidth\n  - percentHeight\n- #### Focus\n  - removeFocus\n  - hasFocus\n- #### EdgeInsets\n  - padding\n  - viewInsets\n  - viewPadding\n- #### MediaQuery\n\n  - mq\n\n- #### Responsive Value\n\n  - responsiveValue\n\n- #### Platform Brightness\n\n  - platformBrightness\n\n- #### Keyboard Height\n  - keyboardHeight\n\n```dart\n  final theme = context.theme;\n  final colorScheme = context.colorScheme;\n\n  /// display text styles\n  final displayLarge = context.displayLarge;\n  final displayMedium = context.displayMedium;\n  final displaySmall = context.displaySmall;\n\n  /// headline style\n  final headlineLarge = context.headlineLarge;\n  final headlineMedium = context.headlineMedium;\n  final headlineSmall = context.headlineSmall;\n\n   /// title style\n  final titleLarge = context.titleLarge;\n  final titleMedium = context.titleMedium;\n  final titleSmall = context.titleSmall;\n\n   /// label style\n  final labelLarge = context.labelLarge;\n  final labelMedium = context.labelMedium;\n  final labelSmall = context.labelSmall;\n\n   /// body style\n  final bodyLarge = context.bodyLarge;\n  final bodyMedium = context.bodyMedium;\n  final bodySmall = context.bodySmall;\n\n\n/// colors\nfinal Color primaryColor = context.primaryColor;\nfinal Color onPrimaryColor = context.onPrimaryColor;\nfinal Color primaryContainerColor = context.primaryContainerColor;\nfinal Color onPrimaryContainerColor = context.onPrimaryContainerColor;\n\n/// secondary colors\nfinal Color secondaryColor = context.secondaryColor;\nfinal Color onSecondaryColor = context.onSecondaryColor;\nfinal Color secondaryContainerColor = context.secondaryContainerColor;\nfinal Color onSecondaryContainerColor =\u003e colorScheme.onSecondaryContainer;\n\n/// tertiary color\nfinal Color tertiaryColor = context.tertiaryColor;\nfinal Color onTertiaryColor = context.onTertiaryColor;\nfinal Color tertiaryContainerColor = context.tertiaryContainerColor;\nfinal Color onTertiaryContainerColor = context.onTertiaryContainerColor;\n\n/// surface color\nfinal Color surfaceColor = context.surfaceColor;\nfinal Color onSurfaceColor = context.onSurfaceColor;\n\n/// surface variant color\nfinal Color surfaceVariantColor = context.surfaceVariantColor;\nfinal Color onSurfaceVariantColor = context.onSurfaceVariantColor;\n\n/// inverse colors\nfinal Color inverseSurfaceColor = context.inverseSurfaceColor;\nfinal Color onInverseSurfaceColor = context.onInverseSurfaceColor;\n\n/// background color\nfinal Color backgroundColor = context.backgroundColor;\nfinal Color onBackgroundContainerColor = context.onBackgroundContainerColor;\n\n/// outline color\nfinal Color outlineColor = context.outlineColor;\nfinal Color outlineVariantColor = context.outlineVariantColor;\n\n/// error colors\nfinal Color errorColor = context.errorColor;\nfinal Color onErrorColor = context.onErrorColor;\nfinal Color errorContainerColor = context.errorContainerColor;\nfinal Color onErrorContainerColor = context.onErrorContainerColor;\n\n\n  /// sizes\n  final width = context.width;\n  final height = context.height;\n\n  /// 1% of screen width\n  final widthPercentage = context.pw(.1);\n\n  /// 1% of screen height\n  final heightPercentage = context.ph(.4);\n\n  /// remove focus / hide keyboard\n  context.removeFocus();\n\n  /// check is keyboard is open\n  context.hasFocus;\n\n  /// padding\n  /// The parts of the display that are partially obscured by system UI,\n  /// typically by the hardware display \"notches\" or the system status bar.\n  /// for more check [MediaQuery.paddingOf(context)]\n  context.padding;\n\n  /// view insets\n  /// The parts of the display that are completely obscured by system UI,\n  /// typically by the device's keyboard.\n  /// for more check [MediaQuery.viewInsetsOf(context)]\n  context.viewInsets;\n\n  /// view padding\n  /// The parts of the display that are partially obscured by system UI,\n  /// typically by the hardware display \"notches\" or the system status bar.\n  /// for more check [MediaQuery.viewPaddingOf(context)]\n  context.viewPadding;\n\n  /// media query\n  context.mq;\n\n  /// platform brightness\n  /// returns platform brightness using [MediaQuery.platformBrightnessOf(context)]\n  context.platformBrightness\n\n\n  /// keyboard height\n  /// returns the space occupied by keyboard i.e. [MediaQuery.viewInsetsOf(context).bottom]\n  context.keyboardHeight\n\n\n  /// responsive value according to device type\n  final rValue = context.responsiveValue\u003cdouble\u003e(10,desktop:30,tablet:20);\n\n```\n\n## FPSnackbar\n\nSingleton class for showing Snackbar\n\n- ### Global Properties\n  - defaultStyle\n  - successStyle\n  - errorStyle\n  - warningStyle\n  - infoStyle\n  - duration (defaults 3 seconds)\n  - floating (defaults true)\n  - centerText (defaults false)\n  - contextMaxLines (defaults 2)\n\nyou can change global properties using `FPSnackbar.instance.propertyName = value`\n\n- ### Variants\n  - #### Success\n    Snackbar for success messages\n    ```dart\n       FPSnackbar.success(\n            context,\n            title: 'Title',\n            message: 'User created successfully',\n          );\n    ```\n  - #### Error\n    Snackbar for error messages\n    ```dart\n       FPSnackbar.error(\n            context,\n            title: 'Title',\n            message: 'Something went wrong!',\n          );\n    ```\n- #### Info\n  Snackbar for info messages\n  ```dart\n     FPSnackbar.info(\n          context,\n          title: 'Title',\n          message: 'Some informative message',\n        );\n  ```\n- #### Warning\n  Snackbar for warning messages\n  ```dart\n     FPSnackbar.warning(\n          context,\n          title: 'Title',\n          message: 'Warning message',\n        );\n  ```\n- #### Default\n  Default Snackbar\n  ```dart\n     FPSnackbar.show(\n          context,\n          title: 'Create User',\n          message: 'message',\n        );\n  ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkishormainali%2Ffp_util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkishormainali%2Ffp_util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkishormainali%2Ffp_util/lists"}