GithubHelp home page GithubHelp logo

andrewtzhang / infinity_ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from o4x/infinity_ui

0.0 1.0 0.0 185 KB

A flutter plugin for remove status & navigation bar padding.

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

License: MIT License

Java 33.67% Swift 6.35% Objective-C 4.82% Dart 48.49% Ruby 6.67%

infinity_ui's Introduction

Infinity Ui

demo

     

A flutter plugin for remove status & navigation bar padding.

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

  • Add this to your pubspec.yaml

    dependencies:
    infinity_ui: ^0.1.1
    
    
  • Get the package from Pub:

    flutter pub get
    
  • Import it in your file

    import 'package:infinity_ui/infinity_ui.dart';
    

Usage

  • Infinity Ui just need to enable.
...

void main() async {
 WidgetsFlutterBinding.ensureInitialized();
 await InfinityUi.enableInfinity(); // you can enable it anywhere
 runApp(MyApp());
}

...
  • Now for get height just using Infinity class.
...

 @override
 Widget build(BuildContext context) {
   return Container(
       margin: EdgeInsets.only(
           bottom: InfinityUi.navigationBarHeight,
           top: InfinityUi.statusBarHeight
       ),
       width: MediaQuery.of(context).size.width,
       height: MediaQuery.of(context).size.height,
       child: child, // your code
   ),
 }

...
  • Or if you are lazy, you can use SafeInfinityUi.
...

 @override
 Widget build(BuildContext context) {
   return SafeInfinityUi(
       background: background, // Anything you like.
       child: child, // your code
       navigationBarColor: Colors.transparent,
       statusBarColor: Colors.transparent,
   );
 }

...

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

infinity_ui's People

Contributors

o4x avatar

Watchers

James Cloos 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.