Flukit is a versatile and easy-to-use Flutter mini framework inspired by Get that simplifies app development. With Flukit, you can easily manage routing, theming, and utilities, as well as take advantage of pre-designed widgets and shortcuts to streamline your Flutter projects.
Welcome to Flukit
, a powerful toolkit designed to simplify the app development process for Flutter developers. We aim to provide an efficient and streamlined solution for common app development tasks, including routing, theming, utilities, and widgets.
Developing apps can be complex and time-consuming, and our framework is here to make your life easier. This mini framework aims to empower developers by offering a set of tools that enhance productivity and provide a better development experience.
Whether you're building a small project or a complex application, this Flutter Mini Framework is here to help you achieve your goals faster and with less effort.
- Pre-designed widgets like buttons, avatars, screens, images, etc.
- Routing: Just define a bunch of pages and you're good to go.
- Theming: Customize your app's appearance effortlessly with a flexible theming system that allows you to create unique designs.
- Utilities: Access a set of handy utility functions that streamline common development tasks.
- Shortcuts: Save time and reduce boilerplate code with prebuilt shortcuts and code snippets for common tasks.
To use flukit
in your Flutter project, add the following dependency to your pubspec.yaml:
dependencies:
flukit:
git:
url: https://github.com/charles9904/flukit
Then run bash flutter packages get
in your terminal to install the package.
To use Flukit in your project, import the package and use any of the provided widgets or utilities. For example, to use the flukit Button widget:
FluButton(
onPressed: () {
// Handle button press.
},
text: 'Press me',
),
Please see the documentation (Coming Soon) for more information and examples.
- App
- Avatar group
- Avatar
- Badge
- Bottom navigation bar
- Bottom sheet
- Button
- Chip
- Collapsible
- Country selector
- Dashed circle
- Divider
- Glass
- Grid
- Image
- Text input
- Loader
- Outline
- Page view notifier
- Tabs indicators
-
[BuildContext] extensions
context.mediaQuerySize
: equivalent of MediaQuery.of(context).sizecontext.height
: equivalent of MediaQuery.of(context).size.heightcontext.width
: equivalent of MediaQuery.of(context).size.widthcontext.heightTransformer
: Gives you the power to get a portion of the screen height.context.widthTransformer
: Gives you the power to get a portion of the screen width.context.ratio
: Divide the height proportionally by the given value.context.theme
: similar to [Theme.of(context)]context.colorScheme
: similar to [Theme.of(context).colorScheme]context.textTheme
: similar to [Theme.of(context).textTheme]context.isDarkMode
: Check if dark mode theme is enabledcontext.iconColor
: give access to [Theme.of(context).iconTheme.color]context.systemUiOverlayStyle
: Set a [SystemUiOverlayStyle] based on the provided [ThemeData]context.mediaQuery
: similar to [MediaQuery.of(context)]context.mediaQueryPadding
: similar to [MediaQuery.of(context).padding]context.mediaQueryViewPadding
: similar to [MediaQuery.of(context).viewPadding]context.mediaQueryViewInsets
: similar to [MediaQuery.of(context).viewInsets]context.orientation
: similar to [MediaQuery.of(context).orientation]context.statusBarHeight
: return [MediaQuery.of(context).padding.top]context.isKeyboardHidden
: Check if the keyboard is visible or notcontext.alwaysUse24HourFormat
: similar to [MediaQuery.of(context).alwaysUse24HourFormat]context.isLandscape
: check if device is on landscape modecontext.isPortrait
: check if device is on portrait modecontext.devicePixelRatio
: similar to [MediaQuery.of(this).devicePixelRatio]context.textScaleFactor
: similar to [MediaQuery.of(this).textScaleFactor]context.mediaQueryShortestSide
: get the shortestSide from screencontext.showNavbar
: True if width be larger than 800context.isPhoneOrLess
: True if the width is smaller than 600pcontext.isPhoneOrWider
: True if the width is higher than 600pcontext.isPhone
: True if the shortestSide is smaller than 600pcontext.isSmallTabletOrLess
: True if the width is smaller than 600pcontext.isSmallTabletOrWider
: True if the width is higher than 600pcontext.isSmallTablet
: True if the shortestSide is largest than 600pcontext.isLargeTablet
: True if the shortestSide is largest than 720pcontext.isLargeTabletOrLess
: True if the width is smaller than 720pcontext.isLargeTabletOrWider
: True if the width is higher than 720pcontext.isTablet
: True if the current device is Tabletcontext.isDesktopOrLess
: True if the width is smaller than 1200pcontext.isDesktopOrWider
: True if the width is higher than 1200pcontext.isDesktop
: same as [isDesktopOrLess]
-
[num] extensions
[num].isLowerThan
[num].isGreaterThan
[num].isEqual
[num].toPositive
[num].isLowerThan
[num].delay
: Utility to delay some callback. Read more
-
[double] or [int] extensions
[double / int].milliseconds
ordouble.ms
: double to milliseconds [Duration][double / int].seconds
: double to seconds [Duration][double / int].minutes
: double to minutes [Duration][double / int].hours
: double to hours [Duration][double / int].days
: double to days [Duration]
-
[Durations] extensions
[Duration].delay
: Utility to delay some callback. Read more
-
[List] extensions
[List].addIf
: Add element to list if condition is respected
-
[String] extensions
[String].isNum
: Discover if the String is a valid number[String].isNumericOnly
: Discover if the String is numeric only[String].isAlphabetOnly
: Discover if the String is alphanumeric only[String].isBool
: Discover if the String is a boolean[String].isVectorFileName
: Discover if the String is a vector[String].isImageFileName
: Discover if the String is a ImageFileName[String].isAudioFileName
: Discover if the String is a AudioFileName[String].isVideoFileName
: Discover if the String is a VideoFileName[String].isTxtFileName
: Discover if the String is a TxtFileName[String].isDocumentFileName
: Discover if the String is a Document Word[String].isExcelFileName
: Discover if the String is a Document Excel[String].isPPTFileName
: Discover if the String is a Document Powerpoint[String].isAPKFileName
: Discover if the String is a APK File[String].isPDFFileName
: Discover if the String is a PDF file[String].isHTMLFileName
: Discover if the String is a HTML file[String].isURL
: Discover if the String is a URL file[String].isEmail
: Discover if the String is a Email[String].isPhoneNumber
: Discover if the String is a Phone Number[String].isDateTime
: Discover if the String is a DateTime[String].isMD5
: Discover if the String is a MD5 Hash[String].isSHA1
: Discover if the String is a SHA1 Hash[String].isSHA256
: Discover if the String is a SHA256 Hash[String].isBinary
: Discover if the String is a bynary value[String].isIPv4
: Discover if the String is a ipv4[String].isIPv6
: Discover if the String is a ipv6[String].isHexadecimal
: Discover if the String is a Hexadecimal[String].isPalindrom
: Discover if the String is a palindrom[String].isPassport
: Discover if the String is a passport number[String].isCurrency
: Discover if the String is a currency[String].isCpf
: Discover if the String is a CPF number[String].isCnpj
: Discover if the String is a CNPJ number[String].isCaseInsensitiveContains
: Discover if the String is a case insensitive[String].isCaseInsensitiveContainsAny
: Discover if the String is a case sensitive and contains any value[String].capitalize
: capitalize the String[String].capitalizeFirst
: Capitalize the first letter of the String[String].removeAllWhitespace
: remove all whitespace from the String[String].camelCase
: converter the String[String].paramCase
: Discover if the String is a valid URL[String].createPath
: add segments to the String[String].capitalizeAllWordsFirstLetter
: capitalize only first letter in String words to upper case
-
Platform
Flu.isWeb
Flu.isMacOS
Flu.isWindows
Flu.isLinux
Flu.isAndroid
Flu.isIOS
Flu.isFuchsia
Flu.isMobile
Flu.isDesktop
-
Connectivity (pre-alpha)
Flu.deviceIsOnline
Flu.getDeviceConnectivity
Flu.listenToDeviceConnectivityChange
-
Trigger haptic
Flu.triggerSelectionClickHaptic
Flu.triggerVibrationHaptic
Flu.triggerLightImpactHaptic
Flu.triggerMediumImpactHaptic
Flu.triggerHeavyImpactHaptic
-
Validators
Flu.validatePhoneNumber
Flu.validateEmail
-
Parsers
Flu.dataFromBase64String
: Decodes [base64] or [base64url] encoded bytes.
-
Helpers
M3FontSizes
: Material design 3 recommended font sizes.Countries
: List of countries. Read moreFlu.numberToCompactFormat
: A number format for compact representations, e.g. "1.2M" instead of "1,200,000".Flu.textToAvatarFormat
Flu.hideKeyboard
Flu.showKeyboard
Flu.getAvatar
Flu.showFluModalBottomSheet
Flu.showCountrySelector
-
Date time
Flu.dateTimeFromTimestamp
: Get DateTime from timestampFlu.timeFromDateTime
: Get only the time from a datetime.Flu.formatDate
: Creates a new DateFormat, using the format specified by [pattern]Flu.timeago
: Formats provided [date] to a fuzzy time like 'a moment ago'Flu.timeFromSeconds
: Get time from secondsFlu.timeLeft
Flu.formatDuration
-
Navigation
to
: Pushes a newpage
to the stacktoNamed
: Pushes a new namedpage
to the stack.offNamed
: Pop the current namedpage
in the stack and push a new one in its placeuntil
: Calls pop several times in the stack until [predicate] returns trueoffUntil
: Push the givenpage
, and then pop several pages in the stack until [predicate] returns trueoffNamedUntil
: Push the given namedpage
, and then pop several pages in the stack until [predicate] returns trueoffAndToNamed
: Pop the current named page and pushes a newpage
to the stack in its placeremoveRoute
: Remove a specific [route] from the stackoffAllNamed
: Push a namedpage
and pop several pages in the stack until [predicate] returns true. [predicate] is optionalback
: Pop the current page, snackbar, dialog or bottomsheet in the stackclose
: Close as many routes as defined by [times]off
: Pop the current page and pushes a newpage
to the stackoffAll
: Push apage
and pop several pages in the stack until [predicate] returns true. [predicate] is optionalcleanRouteName
: Takes a route name String generated, cleans the extra chars and accommodates the format. Eg:() => MyHomeScreenView
becomes/my-home-screen-view
.focusScope
: give access to FocusScope.of(context)
Contributions to Flukit are welcome and encouraged! To contribute, please fork the repository and submit a pull request. Please make sure to read the Contributing Guide before making a pull request.
-
What needs to be done:
- Write a documentation
- Write & setup tests
- Optimize the code
- Add more widget & utilities
Flukit is licensed under the MIT License.