Coder Social home page Coder Social logo

shawon1fb / flutter_minimalist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saiful00000/flutter_minimalist

0.0 0.0 0.0 366 KB

License: MIT License

C++ 35.34% C 2.41% Objective-C 0.06% Kotlin 0.21% Dart 25.38% Swift 1.96% HTML 3.07% CMake 31.56%

flutter_minimalist's Introduction

Provide some technique and simplified functionalities to minimize some frequently used Flutter/Dart code to maximize productivity and maintain a readable codebase.

Brings together some basic and frequently used methods for easy to access.

Features

  • Functionalities as extension.
  • Minimal code.
  • Maximize productivity.
  • More meaningful and readable code structure.

Getting started

Include dependency in your pubspec.yaml file

dependencies:
  flutter:
    sdk: flutter
  # add flutter_address_from_latlng
  flutter_minimalist: ^(updated version)

Usage

For some spacing whether its like margin or padding inside Row() or Column() widget just call getters on num

Column(
  children: [
    16.verticalSpace, // Equivalent to SizedBox(height: 16)
    /// Some widgets
    16.verticalSpace, // // Equivalent to SizedBox(height: 16)
    Row(
      children: [
        16.horizontalSpace, // Equivalent to SizedBox(width: 16)
        // Some Widgets
        16.horizontalSpace, // Equivalent to SizedBox(width: 16)
        // Some widgets
      ]
    ),
  ]
)

For Margin and padding just call getters on num

// for all padding and margin
Contianer(
  padding: 16.allPadding,
  margin: 16.allMargin,
)

// for left padding and margin
Contianer(
  padding: 16.leftPadding,
  margin: 16.leftMargin,
)

Simplify Duration() like

void example(){
  1.seconds; // Equivalent to Duration(seconds: 16)
  1000.milliSeconds; // Equivalent to Duration(milliseconds: 16)
  1000000.microSeconds;
  2.minutes;
  1.hours;
}

Ue Future.delay() more minimalistic way

void example() {
  1000.milliSeconds.delay.then((val){
    //Do your work after 10 seconds delay
  });
}

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository on GitHub and submit a pull request.

Issues

If you encounter any issues or bugs, please feel free to file an issue on the github issue tracker. We'll do our best to address the issue in a timely manner.

Support

If you have any questions or need help with the package, contact [email protected].

License

This package is released under the MIT License

flutter_minimalist's People

Contributors

saiful00000 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.