native_ui 0.0.5

  • Readme
  • Changelog
  • Installing
  • 25

NativeUI #

NativeUI widget wrappers for Android and iOS.

This package is under development, some help is always welcome.

Getting Started #

Import the native_ui package #

To use the native_ui package, follow the package installation instructions.

Examples #

Platform Native Button #

Renders an iOS style button when the TargetPlatform is iOS and an Android style button when the TargetPlatform is Android.

    onPressed: _login(context),
    padding: const EdgeInsets.symmetric(vertical: 8.0),
    width: 86.0,
    child: Text(
      style: TextStyle(
          color: Colors.white, fontWeight: FontWeight.bold),

ConditionalBuilder #

Render a Widget based on a boolean expression.

    condition: _isLogging,
    trueWidget: Text(
        style: Theme.of(context).textTheme.title,
    falseWidget: FlatButton(
        onPressed: () => {},
        child: Text(
          style: TextStyle(
              color: Theme.of(context).primaryColorDark,
              fontWeight: FontWeight.bold),

PlatformSwitcher #

Unique widget for switch widgets between platforms.

  iOSChild: iOSButton(
    child: child,
    onPressed: onPressed,
    color: color,
    padding: padding,
    height: height,
    width: width,
  androidChild: MaterialButton(
    key: key,
    onPressed: onPressed,
    child: child,
    color: color,
    padding: padding,
    minWidth: width,
    height: height,

Contribution #

Please contribute sending feedback or reporting a bug, or sending a pull request. Thank you!

[0.0.2] - 31/05/2018

  • Button wrapper with native styles for Android and iOS
  • PlatformSwitcher widget
  • ConditionalBuilder widget

[0.0.3] - 01/06/2018

  • BSD License
  • API Docs
  • Child property is now required for Button widget.

[0.0.4] - 05/06/2018

  • Tests
  • iOS FormView and FormFieldView widgets.

[0.0.5] - 05/08/2018

  • Dart 2 compatibility.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  native_ui: ^0.0.5

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:native_ui/native_ui.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Fix lib/src/ios/button.dart. (-25.38 points)

Analysis of lib/src/ios/button.dart failed with 1 error, 1 hint:

line 184 col 33: A value of type 'TickerFuture' can't be assigned to a variable of type 'Future

line 46 col 7: Name types using UpperCamelCase.

Maintenance suggestions

Package is getting outdated. (-47.12 points)

The package was last published 76 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and native_ui.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies