flutter_essentials 0.0.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 67

flutter_essentials #

Flutter_essentials plugin was created as a port of the popular Xamarin.Essentials library.

Supported Platforms #

flutter_essentials is focused on the following platforms:

  • iOS (10+)
  • Android (4.4+)
  • Web (When Support Becomes Available)

API Documentation #

The following cross-platform APIs are available in flutter_essentials:

APIiOSAndroidWeb
AccelerometerTodo
App InformationTodo
BatteryTodoTodoTodo
ClipboardTodoTodoTodo
CompassTodoTodoTodo
ConnectivityTodoTodoTodo
Device Display InformationTodoTodoTodo
Device InformationTodo
EmailTodoTodoTodo
File System HelpersTodoTodoTodo
FlashlightTodoTodoTodo
GeocodingTodoTodoTodo
GeolocationTodoTodoTodo
GyroscopeTodoTodoTodo
LauncherTodoTodoTodo
MagnetometerTodoTodoTodo
MapsTodoTodoTodo
Open BrowserTodoTodoTodo
Phone DialerTodo
PreferencesTodo
Screen LockTodoTodoTodo
Secure StorageTodoTodoTodo
ShareTodoTodoTodo
SMSTodoTodoTodo
Text-to-SpeechTodoTodoTodo
Version TrackingTodo
VibrateTodoTodoTodo

License #

Please see the License.

0.0.4 #

  • Update more documentation

0.0.3 #

  • Update api documentation
  • Convert AppInfo.showSettingsUI to a function

0.0.2 #

  • Contains App Info Api
  • Contains Device Info Api
  • Contains App Preference Api
  • Contains Version Tracking Api

0.0.5 #

  • Add accelerometer
  • Add Phone Dialer

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_essentials_example/accelerometer_page.dart';
import 'package:flutter_essentials_example/app_info_page.dart';
import 'package:flutter_essentials_example/preferences_page.dart';
import 'package:flutter_essentials_example/version_tracking_page.dart';
import 'package:flutter_essentials/version_tracking.dart';
import 'package:flutter_essentials_example/phone_dialer_page.dart';
import 'device_info_page.dart';

void main() async {
  runApp(MaterialApp(
    title: 'Home',
    home: HomePage(),
  ));
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    VersionTracking.init();
    return Scaffold(
      appBar: AppBar(
        title: const Text('Plugin example app'),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            RaisedButton(
              child: Text("App Info"),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => new AppInfoPage()),
                );
              },
            ),
            RaisedButton(
              child: Text("Preferences"),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => new PreferencesPage()),
                );
              },
            ),
            RaisedButton(
              child: Text("Version Tracking"),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => new VersionTrackingPage()),
                );
              },
            ),
            RaisedButton(
              child: Text("Device Info"),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => new DeviceInfoPage()),
                );
              },
            ),
            RaisedButton(
              child: Text("Phone Dialer"),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => new PhoneDialerPage()),
                );
              },
            ),
            RaisedButton(
              child: Text("Accelerometer"),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => new AccelerometerPage()),
                );
              },
            )
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_essentials: ^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:flutter_essentials/flutter_essentials.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
40
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.9+1
  • Flutter: 1.17.3

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:flutter_essentials/flutter_essentials.dart]

Package does not support Flutter platform macos

Because of import path [package:flutter_essentials/flutter_essentials.dart]

Package does not support Flutter platform web

Because of import path [package:flutter_essentials/flutter_essentials.dart]

Package does not support Flutter platform windows

Because of import path [package:flutter_essentials/flutter_essentials.dart]

Package not compatible with SDK dart

because of import path [flutter_essentials]

Health suggestions

Fix lib/accelerometer.dart. (-1.99 points)

Analysis of lib/accelerometer.dart reported 4 hints:

line 18 col 33: Close instances of dart.core.Sink.

line 102 col 11: Override == if overriding hashCode.

line 135 col 5: Dead code.

line 135 col 5: Avoid empty statements.

Format lib/exceptions.dart.

Run flutter format to format lib/exceptions.dart.

Format lib/phone_dialer.dart.

Run flutter format to format lib/phone_dialer.dart.

Format lib/types.dart.

Run flutter format to format lib/types.dart.

Maintenance suggestions

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.

Dependencies

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