Git Product home page Git Product logo

swarajkumarsingh / flutter_gearbox Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 299 KB

Flutter Package contains common utility functions(approuter, snackbar, network functions and more published on Pub dev.

Home Page: https://pub.dev/packages/flutter_gearbox

License: BSD 3-Clause "New" or "Revised" License

Java 0.86% Shell 1.22% Objective-C 1.05% Dart 39.95% C++ 28.03% C 2.39% CMake 23.89% Swift 2.47% Kotlin 0.14%
flutter dart package

flutter_gearbox's Introduction

Flutter GearBox

Flutter Package contains common utility functions(logger, appRouter, snackBar, NetworkUtils, custom extension, UrlLauncher, Custom TextFields and ect... ) published on Pub dev.

Supported Devices

  • Android
  • IOS
  • Linux
  • Windows
  • Macos

Installation

  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
  flutter_gearbox: 
  1. Import the package and use it in your Flutter App.
import 'package:flutter_gearbox/flutter_gearbox.dart';
  1. Add Keys in Material App for routing and display snackbar without BuiltContext
 MaterialApp(
   scaffoldMessengerKey: snackbarKey,
   navigatorKey: navigatorKey,
   ...
 )

Features

  • Custom Logger
    • print
    • info
    • verbose
    • wtf
    • debug
    • warning
    • error
  • Custom appRouter without BuiltContext
    • push
    • pushOFFAll
    • pushNamed
    • pop
  • ShowSnackBar without BuildContext
    • showSnackBar
  • Spaces
    • VerticalSpace
    • HorizontalSpace
  • NetworkUtils
    • isConnectionAvailable
    • performAction
    • listenConnectionStream
  • CustomTextField
    • NameTextField
    • SearchTextField
    • EmailTextField
    • PasswordTextField
    • PhoneNumberTextField
  • Status Codes
    • statusOk
    • statusNotFound
    • statusInvalidRequest
    • statusInternalServerError
  • UrlLauncher
    • launchURL
  • Extension
    • string_extension --> capitalize
  • Custom Variables
    • isInProduction
    • isDebugMode
  • Custom Screens
    • NoInterNetScreen

Example

Logger

logger.error("My Error Print");

AppRouter without BuildContext

appRouter.push(HomeScreen());

ShowSnackBar without BuildContext

showSnackBar(msg: "MOM ❤");

Spacer VerticalSpace

VerticalSpace(height: 10);

Spacer HorizontalSpace

HorizontalSpace(width: 10);

NetworkUtils

final connectionStatus = await networkUtils.isConnectionAvailable();
await networkUtils.performAction();
await networkUtils.listenConnectionStream();

CustomTextField

CustomTextField(text: "Enter your name");

Status Code

if(res.status == statusOk) {
  ....
}

UrlLauncher

await launchURL("google.com")

String Extension

String name = username.toString().capitalize;

Custom Debug Variables

if(isInProduction){
  ...Report to crash analysis
}

if(isDebugMode) {
  print("HELLO WORLD");
}

NoInterNetScreen

NoInterNetScreen();

Next Goals

  • Added Utility functions(extensions, logger, navigator, network, custom screen, snackbar, spaces, status_code, custom_text_field, url_launcher)
  • More functions to add

Contributions

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.

If you fixed a bug or implemented a feature, please send a pull request.

flutter_gearbox's People

Contributors

swarajkumarsingh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.