Skip to content

Commit

Permalink
Merge branch 'release/3.0.0-nullsafety.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Mar 23, 2021
2 parents 77192ad + 43846c4 commit b5afcf0
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.0-nullsafety.2 - 2021-03-24
### Added
- Add some badges

## 3.0.0-nullsafety.1 - 2021-02-19
### Changed
- Non nullable ready
Expand Down
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
[![Actions Status](https://github.com/PlugFox/platform_info/workflows/platform_info/badge.svg)](https://github.com/PlugFox/platform_info/actions)
[![Coverage](https://codecov.io/gh/PlugFox/platform_info/branch/master/graph/badge.svg)](https://codecov.io/gh/PlugFox/platform_info)
[![Pub](https://img.shields.io/pub/v/platform_info.svg)](https://pub.dev/packages/platform_info)
[![Likes](https://img.shields.io/badge/dynamic/json?color=blue&label=likes&query=likes&url=http://www.pubscore.gq/likes?package=platform_info&style=flat-square&cacheSeconds=90000)](https://pub.dev/packages/platform_info)
[![Health](https://img.shields.io/badge/dynamic/json?color=blue&label=health&query=pub_points&url=http://www.pubscore.gq/pub-points?package=platform_info&style=flat-square&cacheSeconds=90000)](https://pub.dev/packages/platform_info/score)
[![Code size](https://img.shields.io/github/languages/code-size/plugfox/platform_info?logo=github&logoColor=white)](https://github.com/plugfox/platform_info)
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](https://en.wikipedia.org/wiki/WTFPL)
[![effective_dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart)
[![GitHub stars](https://img.shields.io/github/stars/PlugFox/platform_info?style=social)](https://github.com/PlugFox/platform_info/)



## About
Expand Down Expand Up @@ -49,31 +54,31 @@ Provides platform information such as:

+ The number of individual execution units of the machine (`0` if not available)

+ Operating system is known type
+ Operating system is a known type

+ Is a web-based applications
+ Is a Web-based applications

+ Is a I/O supporting for non-web applications

+ Is a mobile device (Android, iOS)

+ Is a desktop device (Windows, macOS, Fuchsia)

+ Is material design device (Android, Fuchsia)
+ Is Material design device (Android, Fuchsia)

+ Is cupertino design device (macOS, iOS)
+ Is Cupertino design device (macOS, iOS)

+ isLinux
+ is Linux

+ isMacOS
+ is macOS

+ isWindows
+ is Windows

+ isAndroid
+ is android

+ isIOS
+ is iOS

+ isFuchsia
+ is fuchsia

+ `when` method allowing to compose a complex condition

Expand Down
3 changes: 2 additions & 1 deletion lib/src/platform.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ignore_for_file: avoid_equals_and_hash_code_on_mutable_classes

import 'package:meta/meta.dart' show immutable;
import 'package:meta/meta.dart' show immutable, visibleForTesting;

import 'base_host_platform.dart';
import 'constants.dart';
Expand Down Expand Up @@ -167,6 +167,7 @@ class Platform extends ExtendedHostPlatform with PlatformMethods {

/// Fake class for test needs
@immutable
@visibleForTesting
class FakePlatform extends Platform {
/// Fake constructor for test needs
FakePlatform({
Expand Down
3 changes: 3 additions & 0 deletions lib/src/stub_host_platform.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:meta/meta.dart';

import 'base_host_platform.dart';
import 'default_host_platform.dart';

/// Get host platform if dart.library.html and dart.library.io available
/// Return unknown host platform with default values
@internal
HostPlatform getHostPlatform() => const DefaultHostPlatform();
3 changes: 2 additions & 1 deletion lib/src/web_host_platform.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import 'dart:async';
import 'dart:html' as html show window;

import 'package:meta/meta.dart' show immutable;
import 'package:meta/meta.dart' show immutable, internal;

import 'base_host_platform.dart';
import 'constants.dart';
import 'enums.dart';

/// Get host platform if dart.library.html available
@internal
HostPlatform getHostPlatform() => _WebHostPlatform._();

/// Web based host platform
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: platform_info
description: >
Contains info about current platform
such as Build mode and Operating system
version: 3.0.0-nullsafety.1
version: 3.0.0-nullsafety.2
repository: https://github.com/PlugFox/platform_info/tree/master
issue_tracker: https://github.com/PlugFox/platform_info/issues
homepage: https://github.com/PlugFox/platform_info
Expand Down

1 comment on commit b5afcf0

@vercel
Copy link

@vercel vercel bot commented on b5afcf0 Mar 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.