Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.
/ infinity_ui Public archive
forked from o4x/infinity_ui

A flutter plugin for remove status & navigation bar padding.

License

Notifications You must be signed in to change notification settings

andrewtzhang/infinity_ui

 
 

Repository files navigation

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.

About

A flutter plugin for remove status & navigation bar padding.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 48.5%
  • Java 33.7%
  • Ruby 6.7%
  • Swift 6.3%
  • Objective-C 4.8%