native_ui 0.0.5

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 58

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.

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

ConditionalBuilder

Render a Widget based on a boolean expression.

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

PlatformSwitcher

Unique widget for switch widgets between platforms.

PlatformSwitcher(
  iOSChild: iOSButton(
    child: child,
    onPressed: onPressed,
    color: color,
    padding: padding,
    borderRadius:
        borderRadius,
    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:


dependencies:
  native_ui: ^0.0.5

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages 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';
  
Version Uploaded Documentation Archive
0.0.5 Aug 5, 2018 Go to the documentation of native_ui 0.0.5 Download native_ui 0.0.5 archive
0.0.4 Jun 5, 2018 Go to the documentation of native_ui 0.0.4 Download native_ui 0.0.4 archive
0.0.3 Jun 1, 2018 Go to the documentation of native_ui 0.0.3 Download native_ui 0.0.3 archive
0.0.2 May 31, 2018 Go to the documentation of native_ui 0.0.2 Download native_ui 0.0.2 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
47
Health:
Code health derived from static analysis. [more]
75
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
58
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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<Null>'.

line 46 col 7: Name types using UpperCamelCase.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use native_ui.dart.

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

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

Dependencies

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