[roll] Update dart 3p packages, include flutter_gallery assets
The goal is to be able to compare performance and size of the
same app across platforms. The Flutter gallery seems good for
that.
Change-Id: I3a0256c15de92d24b036e2a53b3a32638ef4556e
diff --git a/built_value/BUILD.gn b/built_value/BUILD.gn
index df5ccee..3368db9 100644
--- a/built_value/BUILD.gn
+++ b/built_value/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by importer.py for built_value-6.1.5
+# This file is generated by importer.py for built_value-6.1.6
import("//build/dart/dart_library.gni")
diff --git a/built_value/CHANGELOG.md b/built_value/CHANGELOG.md
index 5ec6679..1d0ebcd 100644
--- a/built_value/CHANGELOG.md
+++ b/built_value/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+# 6.1.6
+
+- Switch to new analyzer API in version `0.33.3`.
+
# 6.1.5
- Bump versions of `analyzer`, `analyzer_plugin`, `build`, `build_runner`.
diff --git a/built_value/pubspec.yaml b/built_value/pubspec.yaml
index cda0e08..2f00637 100644
--- a/built_value/pubspec.yaml
+++ b/built_value/pubspec.yaml
@@ -1,5 +1,5 @@
name: built_value
-version: 6.1.5
+version: 6.1.6
description: >
Value types with builders, Dart classes as enums, and serialization.
This library is the runtime dependency.
diff --git a/fixnum/.travis.yml b/fixnum/.travis.yml
index c22b630..7a04dbd 100644
--- a/fixnum/.travis.yml
+++ b/fixnum/.travis.yml
@@ -1,13 +1,14 @@
language: dart
dart:
+ - stable
- dev
dart_task:
- test: --platform vm
xvfb: false
- - test: --platform firefox -j 1
- - dartanalyzer: --fatal-warnings .
+ - test: --platform chrome
+ - dartanalyzer: --fatal-warnings --fatal-infos .
- dartfmt
# Only building master means that we don't run two builds for each pull request.
diff --git a/fixnum/BUILD.gn b/fixnum/BUILD.gn
index 0cb823b..58f48b9 100644
--- a/fixnum/BUILD.gn
+++ b/fixnum/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by importer.py for fixnum-0.10.8
+# This file is generated by importer.py for fixnum-0.10.9
import("//build/dart/dart_library.gni")
diff --git a/fixnum/CHANGELOG.md b/fixnum/CHANGELOG.md
index 9c978a5..9cfc509 100644
--- a/fixnum/CHANGELOG.md
+++ b/fixnum/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.10.9
+
+* Add `Int64.toStringUnsigned()` and `Int64.toRadixStringUnsigned()` functions.
+
## 0.10.8
* Set SDK version constraint to `>=2.0.0-dev.65 <3.0.0`.
diff --git a/fixnum/analysis_options.yaml b/fixnum/analysis_options.yaml
new file mode 100644
index 0000000..8ef67de
--- /dev/null
+++ b/fixnum/analysis_options.yaml
@@ -0,0 +1,58 @@
+include: package:pedantic/analysis_options.yaml
+linter:
+ rules:
+ #- annotate_overrides
+ - avoid_function_literals_in_foreach_calls
+ - avoid_init_to_null
+ - avoid_null_checks_in_equality_operators
+ - avoid_relative_lib_imports
+ - avoid_returning_null
+ - avoid_unused_constructor_parameters
+ - await_only_futures
+ - camel_case_types
+ - cancel_subscriptions
+ - comment_references
+ #- constant_identifier_names
+ - control_flow_in_finally
+ - directives_ordering
+ - empty_catches
+ - empty_constructor_bodies
+ - empty_statements
+ - hash_and_equals
+ - implementation_imports
+ - invariant_booleans
+ - iterable_contains_unrelated_type
+ - library_names
+ - library_prefixes
+ - list_remove_unrelated_type
+ - no_adjacent_strings_in_list
+ - non_constant_identifier_names
+ #- omit_local_variable_types
+ - only_throw_errors
+ - overridden_fields
+ - package_api_docs
+ - package_names
+ - package_prefixed_library_names
+ - prefer_adjacent_string_concatenation
+ - prefer_collection_literals
+ - prefer_conditional_assignment
+ - prefer_const_constructors
+ - prefer_final_fields
+ - prefer_initializing_formals
+ - prefer_interpolation_to_compose_strings
+ #- prefer_single_quotes
+ - prefer_typing_uninitialized_variables
+ - slash_for_doc_comments
+ - test_types_in_equals
+ - super_goes_last
+ - test_types_in_equals
+ - throw_in_finally
+ - type_init_formals
+ - unnecessary_brace_in_string_interps
+ - unnecessary_const
+ - unnecessary_getters_setters
+ - unnecessary_lambdas
+ - unnecessary_new
+ - unnecessary_null_aware_assignments
+ - unnecessary_statements
+ #- unnecessary_this
diff --git a/fixnum/lib/fixnum.dart b/fixnum/lib/fixnum.dart
index fe21c47..6d08ba8 100644
--- a/fixnum/lib/fixnum.dart
+++ b/fixnum/lib/fixnum.dart
@@ -2,16 +2,14 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-/**
- * Signed 32- and 64-bit integer support.
- *
- * The integer implementations in this library are designed to work
- * identically whether executed on the Dart VM or compiled to JavaScript.
- *
- * For information on installing and importing this library, see the
- * [fixnum package on pub.dartlang.org]
- * (http://pub.dartlang.org/packages/fixnum).
- */
+/// Signed 32- and 64-bit integer support.
+///
+/// The integer implementations in this library are designed to work
+/// identically whether executed on the Dart VM or compiled to JavaScript.
+///
+/// For information on installing and importing this library, see the
+/// [fixnum package on pub.dartlang.org]
+/// (http://pub.dartlang.org/packages/fixnum).
library fixnum;
part 'src/intx.dart';
diff --git a/fixnum/lib/src/int32.dart b/fixnum/lib/src/int32.dart
index db8ecd0..f3cc72c 100644
--- a/fixnum/lib/src/int32.dart
+++ b/fixnum/lib/src/int32.dart
@@ -4,37 +4,25 @@
part of fixnum;
-/**
- * An immutable 32-bit signed integer, in the range [-2^31, 2^31 - 1].
- * Arithmetic operations may overflow in order to maintain this range.
- */
+/// An immutable 32-bit signed integer, in the range [-2^31, 2^31 - 1].
+/// Arithmetic operations may overflow in order to maintain this range.
class Int32 implements IntX {
- /**
- * The maximum positive value attainable by an [Int32], namely
- * 2147483647.
- */
- static const Int32 MAX_VALUE = const Int32._internal(0x7FFFFFFF);
+ /// The maximum positive value attainable by an [Int32], namely
+ /// 2147483647.
+ static const Int32 MAX_VALUE = Int32._internal(0x7FFFFFFF);
- /**
- * The minimum positive value attainable by an [Int32], namely
- * -2147483648.
- */
- static const Int32 MIN_VALUE = const Int32._internal(-0x80000000);
+ /// The minimum positive value attainable by an [Int32], namely
+ /// -2147483648.
+ static const Int32 MIN_VALUE = Int32._internal(-0x80000000);
- /**
- * An [Int32] constant equal to 0.
- */
- static const Int32 ZERO = const Int32._internal(0);
+ /// An [Int32] constant equal to 0.
+ static const Int32 ZERO = Int32._internal(0);
- /**
- * An [Int32] constant equal to 1.
- */
- static const Int32 ONE = const Int32._internal(1);
+ /// An [Int32] constant equal to 1.
+ static const Int32 ONE = Int32._internal(1);
- /**
- * An [Int32] constant equal to 2.
- */
- static const Int32 TWO = const Int32._internal(2);
+ /// An [Int32] constant equal to 2.
+ static const Int32 TWO = Int32._internal(2);
// Hex digit char codes
static const int _CC_0 = 48; // '0'.codeUnitAt(0)
@@ -58,13 +46,11 @@
static int _validateRadix(int radix) {
if (2 <= radix && radix <= 36) return radix;
- throw new RangeError.range(radix, 2, 36, 'radix');
+ throw RangeError.range(radix, 2, 36, 'radix');
}
- /**
- * Parses a [String] in a given [radix] between 2 and 16 and returns an
- * [Int32].
- */
+ /// Parses a [String] in a given [radix] between 2 and 16 and returns an
+ /// [Int32].
// TODO(rice) - Make this faster by converting several digits at once.
static Int32 parseRadix(String s, int radix) {
_validateRadix(radix);
@@ -73,21 +59,17 @@
int c = s.codeUnitAt(i);
int digit = _decodeDigit(c);
if (digit < 0 || digit >= radix) {
- throw new FormatException("Non-radix code unit: $c");
+ throw FormatException("Non-radix code unit: $c");
}
x = (x * radix) + digit;
}
return x;
}
- /**
- * Parses a decimal [String] and returns an [Int32].
- */
- static Int32 parseInt(String s) => new Int32(int.parse(s));
+ /// Parses a decimal [String] and returns an [Int32].
+ static Int32 parseInt(String s) => Int32(int.parse(s));
- /**
- * Parses a hexadecimal [String] and returns an [Int32].
- */
+ /// Parses a hexadecimal [String] and returns an [Int32].
static Int32 parseHex(String s) => parseRadix(s, 16);
// Assumes i is <= 32-bit.
@@ -134,10 +116,8 @@
const Int32._internal(int i) : _i = i;
- /**
- * Constructs an [Int32] from an [int]. Only the low 32 bits of the input
- * are used.
- */
+ /// Constructs an [Int32] from an [int]. Only the low 32 bits of the input
+ /// are used.
Int32([int i = 0]) : _i = (i & 0x7fffffff) - (i & 0x80000000);
// Returns the [int] representation of the specified value. Throws
@@ -148,7 +128,7 @@
} else if (val is int) {
return val;
}
- throw new ArgumentError(val);
+ throw ArgumentError(val);
}
// The +, -, * , &, |, and ^ operaters deal with types as follows:
@@ -169,17 +149,17 @@
if (other is Int64) {
return this.toInt64() + other;
}
- return new Int32(_i + _toInt(other));
+ return Int32(_i + _toInt(other));
}
IntX operator -(other) {
if (other is Int64) {
return this.toInt64() - other;
}
- return new Int32(_i - _toInt(other));
+ return Int32(_i - _toInt(other));
}
- Int32 operator -() => new Int32(-_i);
+ Int32 operator -() => Int32(-_i);
IntX operator *(other) {
if (other is Int64) {
@@ -194,14 +174,14 @@
// Result will be Int32
return (this.toInt64() % other).toInt32();
}
- return new Int32(_i % _toInt(other));
+ return Int32(_i % _toInt(other));
}
Int32 operator ~/(other) {
if (other is Int64) {
return (this.toInt64() ~/ other).toInt32();
}
- return new Int32(_i ~/ _toInt(other));
+ return Int32(_i ~/ _toInt(other));
}
Int32 remainder(other) {
@@ -216,38 +196,38 @@
if (other is Int64) {
return (this.toInt64() & other).toInt32();
}
- return new Int32(_i & _toInt(other));
+ return Int32(_i & _toInt(other));
}
Int32 operator |(other) {
if (other is Int64) {
return (this.toInt64() | other).toInt32();
}
- return new Int32(_i | _toInt(other));
+ return Int32(_i | _toInt(other));
}
Int32 operator ^(other) {
if (other is Int64) {
return (this.toInt64() ^ other).toInt32();
}
- return new Int32(_i ^ _toInt(other));
+ return Int32(_i ^ _toInt(other));
}
- Int32 operator ~() => new Int32(~_i);
+ Int32 operator ~() => Int32(~_i);
Int32 operator <<(int n) {
if (n < 0) {
- throw new ArgumentError(n);
+ throw ArgumentError(n);
}
if (n >= 32) {
return ZERO;
}
- return new Int32(_i << n);
+ return Int32(_i << n);
}
Int32 operator >>(int n) {
if (n < 0) {
- throw new ArgumentError(n);
+ throw ArgumentError(n);
}
if (n >= 32) {
return isNegative ? const Int32._internal(-1) : ZERO;
@@ -258,12 +238,12 @@
} else {
value = (_i >> n) | (0xffffffff << (32 - n));
}
- return new Int32(value);
+ return Int32(value);
}
Int32 shiftRightUnsigned(int n) {
if (n < 0) {
- throw new ArgumentError(n);
+ throw ArgumentError(n);
}
if (n >= 32) {
return ZERO;
@@ -274,13 +254,11 @@
} else {
value = (_i >> n) & ((1 << (32 - n)) - 1);
}
- return new Int32(value);
+ return Int32(value);
}
- /**
- * Returns [:true:] if this [Int32] has the same numeric value as the
- * given object. The argument may be an [int] or an [IntX].
- */
+ /// Returns [:true:] if this [Int32] has the same numeric value as the
+ /// given object. The argument may be an [int] or an [IntX].
bool operator ==(other) {
if (other is Int32) {
return _i == other._i;
@@ -337,17 +315,17 @@
int get hashCode => _i;
- Int32 abs() => _i < 0 ? new Int32(-_i) : this;
+ Int32 abs() => _i < 0 ? Int32(-_i) : this;
Int32 clamp(lowerLimit, upperLimit) {
if (this < lowerLimit) {
if (lowerLimit is IntX) return lowerLimit.toInt32();
- if (lowerLimit is int) return new Int32(lowerLimit);
- throw new ArgumentError(lowerLimit);
+ if (lowerLimit is int) return Int32(lowerLimit);
+ throw ArgumentError(lowerLimit);
} else if (this > upperLimit) {
if (upperLimit is IntX) return upperLimit.toInt32();
- if (upperLimit is int) return new Int32(upperLimit);
- throw new ArgumentError(upperLimit);
+ if (upperLimit is int) return Int32(upperLimit);
+ throw ArgumentError(upperLimit);
}
return this;
}
@@ -356,17 +334,17 @@
int numberOfTrailingZeros() => _numberOfTrailingZeros(_i);
Int32 toSigned(int width) {
- if (width < 1 || width > 32) throw new RangeError.range(width, 1, 32);
- return new Int32(_i.toSigned(width));
+ if (width < 1 || width > 32) throw RangeError.range(width, 1, 32);
+ return Int32(_i.toSigned(width));
}
Int32 toUnsigned(int width) {
- if (width < 0 || width > 32) throw new RangeError.range(width, 0, 32);
- return new Int32(_i.toUnsigned(width));
+ if (width < 0 || width > 32) throw RangeError.range(width, 0, 32);
+ return Int32(_i.toUnsigned(width));
}
List<int> toBytes() {
- List<int> result = new List<int>(4);
+ List<int> result = List<int>(4);
result[0] = _i & 0xff;
result[1] = (_i >> 8) & 0xff;
result[2] = (_i >> 16) & 0xff;
@@ -377,7 +355,7 @@
double toDouble() => _i.toDouble();
int toInt() => _i;
Int32 toInt32() => this;
- Int64 toInt64() => new Int64(_i);
+ Int64 toInt64() => Int64(_i);
String toString() => _i.toString();
String toHexString() => _i.toRadixString(16);
diff --git a/fixnum/lib/src/int64.dart b/fixnum/lib/src/int64.dart
index a84cbd9..a1109c0 100644
--- a/fixnum/lib/src/int64.dart
+++ b/fixnum/lib/src/int64.dart
@@ -4,10 +4,8 @@
part of fixnum;
-/**
- * An immutable 64-bit signed integer, in the range [-2^63, 2^63 - 1].
- * Arithmetic operations may overflow in order to maintain this range.
- */
+/// An immutable 64-bit signed integer, in the range [-2^63, 2^63 - 1].
+/// Arithmetic operations may overflow in order to maintain this range.
class Int64 implements IntX {
// A 64-bit integer is represented internally as three non-negative
// integers, storing the 22 low, 22 middle, and 20 high bits of the
@@ -31,43 +29,29 @@
static const int _SIGN_BIT = 19; // _BITS2 - 1
static const int _SIGN_BIT_MASK = 1 << _SIGN_BIT;
- /**
- * The maximum positive value attainable by an [Int64], namely
- * 9,223,372,036,854,775,807.
- */
- static const Int64 MAX_VALUE = const Int64._bits(_MASK, _MASK, _MASK2 >> 1);
+ /// The maximum positive value attainable by an [Int64], namely
+ /// 9,223,372,036,854,775,807.
+ static const Int64 MAX_VALUE = Int64._bits(_MASK, _MASK, _MASK2 >> 1);
- /**
- * The minimum positive value attainable by an [Int64], namely
- * -9,223,372,036,854,775,808.
- */
- static const Int64 MIN_VALUE = const Int64._bits(0, 0, _SIGN_BIT_MASK);
+ /// The minimum positive value attainable by an [Int64], namely
+ /// -9,223,372,036,854,775,808.
+ static const Int64 MIN_VALUE = Int64._bits(0, 0, _SIGN_BIT_MASK);
- /**
- * An [Int64] constant equal to 0.
- */
- static const Int64 ZERO = const Int64._bits(0, 0, 0);
+ /// An [Int64] constant equal to 0.
+ static const Int64 ZERO = Int64._bits(0, 0, 0);
- /**
- * An [Int64] constant equal to 1.
- */
- static const Int64 ONE = const Int64._bits(1, 0, 0);
+ /// An [Int64] constant equal to 1.
+ static const Int64 ONE = Int64._bits(1, 0, 0);
- /**
- * An [Int64] constant equal to 2.
- */
- static const Int64 TWO = const Int64._bits(2, 0, 0);
+ /// An [Int64] constant equal to 2.
+ static const Int64 TWO = Int64._bits(2, 0, 0);
- /**
- * Constructs an [Int64] with a given bitwise representation. No validation
- * is performed.
- */
+ /// Constructs an [Int64] with a given bitwise representation. No validation
+ /// is performed.
const Int64._bits(this._l, this._m, this._h);
- /**
- * Parses a [String] in a given [radix] between 2 and 36 and returns an
- * [Int64].
- */
+ /// Parses a [String] in a given [radix] between 2 and 36 and returns an
+ /// [Int64].
static Int64 parseRadix(String s, int radix) {
return _parseRadix(s, Int32._validateRadix(radix));
}
@@ -84,7 +68,7 @@
int c = s.codeUnitAt(i);
int digit = Int32._decodeDigit(c);
if (digit < 0 || digit >= radix) {
- throw new FormatException("Non-radix char code: $c");
+ throw FormatException("Non-radix char code: $c");
}
// [radix] and [digit] are at most 6 bits, component is 22, so we can
@@ -106,23 +90,17 @@
return Int64._masked(d0, d1, d2);
}
- /**
- * Parses a decimal [String] and returns an [Int64].
- */
+ /// Parses a decimal [String] and returns an [Int64].
static Int64 parseInt(String s) => _parseRadix(s, 10);
- /**
- * Parses a hexadecimal [String] and returns an [Int64].
- */
+ /// Parses a hexadecimal [String] and returns an [Int64].
static Int64 parseHex(String s) => _parseRadix(s, 16);
//
// Public constructors
//
- /**
- * Constructs an [Int64] with a given [int] value; zero by default.
- */
+ /// Constructs an [Int64] with a given [int] value; zero by default.
factory Int64([int value = 0]) {
int v0 = 0, v1 = 0, v2 = 0;
bool negative = false;
@@ -160,7 +138,7 @@
bottom <<= 8;
bottom |= bytes[0] & 0xff;
- return new Int64.fromInts(top, bottom);
+ return Int64.fromInts(top, bottom);
}
factory Int64.fromBytesBigEndian(List<int> bytes) {
@@ -180,13 +158,11 @@
bottom <<= 8;
bottom |= bytes[7] & 0xff;
- return new Int64.fromInts(top, bottom);
+ return Int64.fromInts(top, bottom);
}
- /**
- * Constructs an [Int64] from a pair of 32-bit integers having the value
- * [:((top & 0xffffffff) << 32) | (bottom & 0xffffffff):].
- */
+ /// Constructs an [Int64] from a pair of 32-bit integers having the value
+ /// [:((top & 0xffffffff) << 32) | (bottom & 0xffffffff):].
factory Int64.fromInts(int top, int bottom) {
top &= 0xffffffff;
bottom &= 0xffffffff;
@@ -202,11 +178,11 @@
if (value is Int64) {
return value;
} else if (value is int) {
- return new Int64(value);
+ return Int64(value);
} else if (value is Int32) {
return value.toInt64();
}
- throw new ArgumentError.value(value);
+ throw ArgumentError.value(value);
}
Int64 operator +(other) {
@@ -341,7 +317,7 @@
Int64 operator <<(int n) {
if (n < 0) {
- throw new ArgumentError.value(n);
+ throw ArgumentError.value(n);
}
if (n >= 64) {
return ZERO;
@@ -367,7 +343,7 @@
Int64 operator >>(int n) {
if (n < 0) {
- throw new ArgumentError.value(n);
+ throw ArgumentError.value(n);
}
if (n >= 64) {
return isNegative ? const Int64._bits(_MASK, _MASK, _MASK2) : ZERO;
@@ -412,7 +388,7 @@
Int64 shiftRightUnsigned(int n) {
if (n < 0) {
- throw new ArgumentError.value(n);
+ throw ArgumentError.value(n);
}
if (n >= 64) {
return ZERO;
@@ -437,10 +413,8 @@
return Int64._masked(res0, res1, res2);
}
- /**
- * Returns [:true:] if this [Int64] has the same numeric value as the
- * given object. The argument may be an [int] or an [IntX].
- */
+ /// Returns [:true:] if this [Int64] has the same numeric value as the
+ /// given object. The argument may be an [int] or an [IntX].
bool operator ==(other) {
Int64 o;
if (other is Int64) {
@@ -450,7 +424,7 @@
// Since we know one of [_h] or [_m] is non-zero, if [other] fits in the
// low word then it can't be numerically equal.
if ((_MASK & other) == other) return false;
- o = new Int64(other);
+ o = Int64(other);
} else if (other is Int32) {
o = other.toInt64();
}
@@ -512,9 +486,7 @@
return a0.bitLength;
}
- /**
- * Returns a hash code based on all the bits of this [Int64].
- */
+ /// Returns a hash code based on all the bits of this [Int64].
int get hashCode {
// TODO(sra): Should we ensure that hashCode values match corresponding int?
// i.e. should `new Int64(x).hashCode == x.hashCode`?
@@ -535,10 +507,8 @@
return this;
}
- /**
- * Returns the number of leading zeros in this [Int64] as an [int]
- * between 0 and 64.
- */
+ /// Returns the number of leading zeros in this [Int64] as an [int]
+ /// between 0 and 64.
int numberOfLeadingZeros() {
int b2 = Int32._numberOfLeadingZeros(_h);
if (b2 == 32) {
@@ -553,10 +523,8 @@
}
}
- /**
- * Returns the number of trailing zeros in this [Int64] as an [int]
- * between 0 and 64.
- */
+ /// Returns the number of trailing zeros in this [Int64] as an [int]
+ /// between 0 and 64.
int numberOfTrailingZeros() {
int zeros = Int32._numberOfTrailingZeros(_l);
if (zeros < 32) {
@@ -577,7 +545,7 @@
}
Int64 toSigned(int width) {
- if (width < 1 || width > 64) throw new RangeError.range(width, 1, 64);
+ if (width < 1 || width > 64) throw RangeError.range(width, 1, 64);
if (width > _BITS01) {
return Int64._masked(_l, _m, _h.toSigned(width - _BITS01));
} else if (width > _BITS) {
@@ -594,7 +562,7 @@
}
Int64 toUnsigned(int width) {
- if (width < 0 || width > 64) throw new RangeError.range(width, 0, 64);
+ if (width < 0 || width > 64) throw RangeError.range(width, 0, 64);
if (width > _BITS01) {
int h = _h.toUnsigned(width - _BITS01);
return Int64._masked(_l, _m, h);
@@ -608,7 +576,7 @@
}
List<int> toBytes() {
- List<int> result = new List<int>(8);
+ List<int> result = List<int>(8);
result[0] = _l & 0xff;
result[1] = (_l >> 8) & 0xff;
result[2] = ((_m << 6) & 0xfc) | ((_l >> 16) & 0x3f);
@@ -638,21 +606,15 @@
}
}
- /**
- * Returns an [Int32] containing the low 32 bits of this [Int64].
- */
+ /// Returns an [Int32] containing the low 32 bits of this [Int64].
Int32 toInt32() {
- return new Int32(((_m & 0x3ff) << _BITS) | _l);
+ return Int32(((_m & 0x3ff) << _BITS) | _l);
}
- /**
- * Returns [this].
- */
+ /// Returns `this`.
Int64 toInt64() => this;
- /**
- * Returns the value of this [Int64] as a decimal [String].
- */
+ /// Returns the value of this [Int64] as a decimal [String].
String toString() => _toRadixString(10);
// TODO(rice) - Make this faster by avoiding arithmetic.
@@ -668,6 +630,17 @@
return hexStr;
}
+ /// Returns the digits of `this` when interpreted as an unsigned 64-bit value.
+ @pragma('dart2js:noInline')
+ String toStringUnsigned() {
+ return _toRadixStringUnsigned(10, _l, _m, _h, '');
+ }
+
+ @pragma('dart2js:noInline')
+ String toRadixStringUnsigned(int radix) {
+ return _toRadixStringUnsigned(Int32._validateRadix(radix), _l, _m, _h, '');
+ }
+
String toRadixString(int radix) {
return _toRadixString(Int32._validateRadix(radix));
}
@@ -677,8 +650,6 @@
int d1 = _m;
int d2 = _h;
- if (d0 == 0 && d1 == 0 && d2 == 0) return '0';
-
String sign = '';
if ((d2 & _SIGN_BIT_MASK) != 0) {
sign = '-';
@@ -695,6 +666,12 @@
// d2, d1, d0 now are an unsigned 64 bit integer for MIN_VALUE and an
// unsigned 63 bit integer for other values.
}
+ return _toRadixStringUnsigned(radix, d0, d1, d2, sign);
+ }
+
+ static String _toRadixStringUnsigned(
+ int radix, int d0, int d1, int d2, String sign) {
+ if (d0 == 0 && d1 == 0 && d2 == 0) return '0';
// Rearrange components into five components where all but the most
// significant are 10 bits wide.
@@ -770,7 +747,7 @@
// Table of 'fat' radix values. Each entry for index `i` is the largest power
// of `i` whose remainder fits in 20 bits.
- static const _fatRadixTable = const <int>[
+ static const _fatRadixTable = <int>[
0,
0,
2 *
@@ -834,7 +811,7 @@
}
static Int64 _masked(int a0, int a1, int a2) =>
- new Int64._bits(_MASK & a0, _MASK & a1, _MASK2 & a2);
+ Int64._bits(_MASK & a0, _MASK & a1, _MASK2 & a2);
static Int64 _sub(int a0, int a1, int a2, int b0, int b1, int b2) {
int diff0 = a0 - b0;
@@ -867,7 +844,7 @@
static Int64 _divide(Int64 a, other, int what) {
Int64 b = _promote(other);
if (b.isZero) {
- throw new IntegerDivisionByZeroException();
+ throw const IntegerDivisionByZeroException();
}
if (a.isZero) return ZERO;
@@ -997,9 +974,9 @@
}
// 0 <= R < B
- assert(Int64.ZERO <= new Int64._bits(r0, r1, r2));
+ assert(Int64.ZERO <= Int64._bits(r0, r1, r2));
assert(r2 < b2 || // Handles case where B = -(MIN_VALUE)
- new Int64._bits(r0, r1, r2) < new Int64._bits(b0, b1, b2));
+ Int64._bits(r0, r1, r2) < Int64._bits(b0, b1, b2));
assert(what == _RETURN_DIV || what == _RETURN_MOD || what == _RETURN_REM);
if (what == _RETURN_DIV) {
diff --git a/fixnum/lib/src/intx.dart b/fixnum/lib/src/intx.dart
index 3c2207d..cdc4b05 100644
--- a/fixnum/lib/src/intx.dart
+++ b/fixnum/lib/src/intx.dart
@@ -4,233 +4,189 @@
part of fixnum;
-/**
- * A fixed-precision integer.
- */
+/// A fixed-precision integer.
abstract class IntX implements Comparable<dynamic> {
- /** Addition operator. */
+ /// Addition operator.
IntX operator +(other);
- /** Subtraction operator. */
+ /// Subtraction operator.
IntX operator -(other);
- /**
- * Negate operator.
- *
- * Note that `-MIN_VALUE` is equal to `MIN_VALUE` due to overflow.
- */
+ /// Negate operator.
+ ///
+ /// Note that `-MIN_VALUE` is equal to `MIN_VALUE` due to overflow.
IntX operator -();
- /** Multiplication operator. */
+ /// Multiplication operator.
IntX operator *(other);
- /**
- * Euclidean modulo operator.
- *
- * Returns the remainder of the euclidean division. The euclidean division
- * of two integers `a` and `b` yields two integers `q` and `r` such that
- * `a == b * q + r` and `0 <= r < a.abs()`.
- */
+ /// Euclidean modulo operator.
+ ///
+ /// Returns the remainder of the euclidean division. The euclidean division
+ /// of two integers `a` and `b` yields two integers `q` and `r` such that
+ /// `a == b * q + r` and `0 <= r < a.abs()`.
IntX operator %(other);
- /** Truncating division operator. */
+ /// Truncating division operator.
IntX operator ~/(other);
- /**
- * Returns the remainder of the truncating division of this integer by
- * [other].
- */
+ /// Returns the remainder of the truncating division of this integer by
+ /// [other].
IntX remainder(other);
- /** Bitwise and operator. */
+ /// Bitwise and operator.
IntX operator &(other);
- /** Bitwise or operator. */
+ /// Bitwise or operator.
IntX operator |(other);
- /** Bitwise xor operator. */
+ /// Bitwise xor operator.
IntX operator ^(other);
- /** Bitwise negate operator. */
+ /// Bitwise negate operator.
IntX operator ~();
- /**
- * Left bit-shift operator.
- *
- * Returns the result of shifting the bits of this integer by [shiftAmount]
- * bits to the left. Low-order bits are filled with zeros.
- */
+ /// Left bit-shift operator.
+ ///
+ /// Returns the result of shifting the bits of this integer by [shiftAmount]
+ /// bits to the left. Low-order bits are filled with zeros.
IntX operator <<(int shiftAmount);
- /**
- * Right bit-shift operator.
- *
- * Returns the result of shifting the bits of this integer by [shiftAmount]
- * bits to the right. High-order bits are filled with zero in the case where
- * this integer is positive, or one in the case where it is negative.
- */
+ /// Right bit-shift operator.
+ ///
+ /// Returns the result of shifting the bits of this integer by [shiftAmount]
+ /// bits to the right. High-order bits are filled with zero in the case where
+ /// this integer is positive, or one in the case where it is negative.
IntX operator >>(int shiftAmount);
- /**
- * Unsigned right-shift operator.
- *
- * Returns the result of shifting the bits of this integer by [shiftAmount]
- * bits to the right. High-order bits are filled with zeros.
- */
+ /// Unsigned right-shift operator.
+ ///
+ /// Returns the result of shifting the bits of this integer by [shiftAmount]
+ /// bits to the right. High-order bits are filled with zeros.
IntX shiftRightUnsigned(int shiftAmount);
int compareTo(other);
- /**
- * Returns `true` if and only if [other] is an int or IntX equal in
- * value to this integer.
- */
+ /// Returns `true` if and only if [other] is an int or IntX equal in
+ /// value to this integer.
bool operator ==(other);
- /** Relational less than operator. */
+ /// Relational less than operator.
bool operator <(other);
- /** Relational less than or equal to operator. */
+ /// Relational less than or equal to operator.
bool operator <=(other);
- /** Relational greater than operator. */
+ /// Relational greater than operator.
bool operator >(other);
- /** Relational greater than or equal to operator. */
+ /// Relational greater than or equal to operator.
bool operator >=(other);
- /** Returns `true` if and only if this integer is even. */
+ /// Returns `true` if and only if this integer is even.
bool get isEven;
- /**
- * Returns `true` if and only if this integer is the maximum signed value
- * that can be represented within its bit size.
- */
+ /// Returns `true` if and only if this integer is the maximum signed value
+ /// that can be represented within its bit size.
bool get isMaxValue;
- /**
- * Returns `true` if and only if this integer is the minimum signed value
- * that can be represented within its bit size.
- */
+ /// Returns `true` if and only if this integer is the minimum signed value
+ /// that can be represented within its bit size.
bool get isMinValue;
- /** Returns `true` if and only if this integer is less than zero. */
+ /// Returns `true` if and only if this integer is less than zero.
bool get isNegative;
- /** Returns `true` if and only if this integer is odd. */
+ /// Returns `true` if and only if this integer is odd.
bool get isOdd;
- /** Returns `true` if and only if this integer is zero. */
+ /// Returns `true` if and only if this integer is zero.
bool get isZero;
int get hashCode;
- /** Returns the absolute value of this integer. */
+ /// Returns the absolute value of this integer.
IntX abs();
- /** Clamps this integer to be in the range [lowerLimit] - [upperLimit]. */
+ /// Clamps this integer to be in the range [lowerLimit] - [upperLimit].
IntX clamp(lowerLimit, upperLimit);
- /**
- * Returns the minimum number of bits required to store this integer.
- *
- * The number of bits excludes the sign bit, which gives the natural length
- * for non-negative (unsigned) values. Negative values are complemented to
- * return the bit position of the first bit that differs from the sign bit.
- *
- * To find the the number of bits needed to store the value as a signed value,
- * add one, i.e. use `x.bitLength + 1`.
- */
+ /// Returns the minimum number of bits required to store this integer.
+ ///
+ /// The number of bits excludes the sign bit, which gives the natural length
+ /// for non-negative (unsigned) values. Negative values are complemented to
+ /// return the bit position of the first bit that differs from the sign bit.
+ ///
+ /// To find the the number of bits needed to store the value as a signed value,
+ /// add one, i.e. use `x.bitLength + 1`.
int get bitLength;
- /**
- * Returns the number of high-order zeros in this integer's bit
- * representation.
- */
+ /// Returns the number of high-order zeros in this integer's bit
+ /// representation.
int numberOfLeadingZeros();
- /**
- * Returns the number of low-order zeros in this integer's bit representation.
- */
+ /// Returns the number of low-order zeros in this integer's bit representation.
int numberOfTrailingZeros();
- /**
- * Returns the least significant [width] bits of this integer, extending the
- * highest retained bit to the sign. This is the same as truncating the value
- * to fit in [width] bits using an signed 2-s complement representation. The
- * returned value has the same bit value in all positions higher than [width].
- *
- * If the input value fits in [width] bits without truncation, the result is
- * the same as the input. The minimum width needed to avoid truncation of `x`
- * is `x.bitLength + 1`, i.e.
- *
- * x == x.toSigned(x.bitLength + 1);
- */
+ /// Returns the least significant [width] bits of this integer, extending the
+ /// highest retained bit to the sign. This is the same as truncating the value
+ /// to fit in [width] bits using an signed 2-s complement representation. The
+ /// returned value has the same bit value in all positions higher than [width].
+ ///
+ /// If the input value fits in [width] bits without truncation, the result is
+ /// the same as the input. The minimum width needed to avoid truncation of `x`
+ /// is `x.bitLength + 1`, i.e.
+ ///
+ /// x == x.toSigned(x.bitLength + 1);
IntX toSigned(int width);
- /**
- * Returns the least significant [width] bits of this integer as a
- * non-negative number (i.e. unsigned representation). The returned value has
- * zeros in all bit positions higher than [width].
- *
- * If the input fits in [width] bits without truncation, the result is the
- * same as the input. The minimum width needed to avoid truncation of `x` is
- * given by `x.bitLength`, i.e.
- *
- * x == x.toUnsigned(x.bitLength);
- */
+ /// Returns the least significant [width] bits of this integer as a
+ /// non-negative number (i.e. unsigned representation). The returned value has
+ /// zeros in all bit positions higher than [width].
+ ///
+ /// If the input fits in [width] bits without truncation, the result is the
+ /// same as the input. The minimum width needed to avoid truncation of `x` is
+ /// given by `x.bitLength`, i.e.
+ ///
+ /// x == x.toUnsigned(x.bitLength);
IntX toUnsigned(int width);
- /**
- * Returns a byte-sequence representation of this integer.
- *
- * Returns a list of int, starting with the least significant byte.
- */
+ /// Returns a byte-sequence representation of this integer.
+ ///
+ /// Returns a list of int, starting with the least significant byte.
List<int> toBytes();
- /**
- * Returns the double representation of this integer.
- *
- * On some platforms, inputs with large absolute values (i.e., > 2^52) may
- * lose some of their low-order bits.
- */
+ /// Returns the double representation of this integer.
+ ///
+ /// On some platforms, inputs with large absolute values (i.e., > 2^52) may
+ /// lose some of their low-order bits.
double toDouble();
- /**
- * Returns the int representation of this integer.
- *
- * On some platforms, inputs with large absolute values (i.e., > 2^52) may
- * lose some of their low-order bits.
- */
+ /// Returns the int representation of this integer.
+ ///
+ /// On some platforms, inputs with large absolute values (i.e., > 2^52) may
+ /// lose some of their low-order bits.
int toInt();
- /**
- * Returns an Int32 representation of this integer.
- *
- * Narrower values are sign-extended and wider values have their high bits
- * truncated.
- */
+ /// Returns an Int32 representation of this integer.
+ ///
+ /// Narrower values are sign-extended and wider values have their high bits
+ /// truncated.
Int32 toInt32();
- /** Returns an Int64 representation of this integer. */
+ /// Returns an Int64 representation of this integer.
Int64 toInt64();
- /**
- * Returns a string representing the value of this integer in decimal
- * notation; example: `'13'`.
- */
+ /// Returns a string representing the value of this integer in decimal
+ /// notation; example: `'13'`.
String toString();
- /**
- * Returns a string representing the value of this integer in hexadecimal
- * notation; example: `'0xd'`.
- */
+ /// Returns a string representing the value of this integer in hexadecimal
+ /// notation; example: `'0xd'`.
String toHexString();
- /**
- * Returns a string representing the value of this integer in the given radix.
- *
- * [radix] must be an integer in the range 2 .. 16, inclusive.
- */
+ /// Returns a string representing the value of this integer in the given radix.
+ ///
+ /// [radix] must be an integer in the range 2 .. 16, inclusive.
String toRadixString(int radix);
}
diff --git a/fixnum/pubspec.yaml b/fixnum/pubspec.yaml
index d8f523d..db003b8 100644
--- a/fixnum/pubspec.yaml
+++ b/fixnum/pubspec.yaml
@@ -1,12 +1,13 @@
name: fixnum
-version: 0.10.8
+version: 0.10.9
description: Library for 32- and 64-bit signed fixed-width integers.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/fixnum
environment:
- sdk: '>=2.0.0-dev.65 <3.0.0'
+ sdk: '>=2.0.0 <3.0.0'
dev_dependencies:
+ pedantic: ^1.3.0
test: ^1.2.0
diff --git a/flutter_flux/BUILD.gn b/flutter_flux/BUILD.gn
index 02d579e..25f1b82 100644
--- a/flutter_flux/BUILD.gn
+++ b/flutter_flux/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by importer.py for flutter_flux-4.1.2
+# This file is generated by importer.py for flutter_flux-4.1.3
import("//build/dart/dart_library.gni")
diff --git a/flutter_flux/CHANGELOG.md b/flutter_flux/CHANGELOG.md
index 854e124..9c402a1 100644
--- a/flutter_flux/CHANGELOG.md
+++ b/flutter_flux/CHANGELOG.md
@@ -1,3 +1,10 @@
+## 4.1.3
+
+Fixed in the library:
+* Add support for new mixin syntax from Dart 2
+* Modified triggerOnConditionalAction() so that `onAction()` more accurately
+ describes its behavior by returning `FutureOr<bool>` instead of `bool`.
+
## 4.1.2
* Fixed dependencies versions
diff --git a/flutter_flux/analysis_options.yaml b/flutter_flux/analysis_options.yaml
deleted file mode 100644
index 2771b3c..0000000
--- a/flutter_flux/analysis_options.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file is required to fix the "flutter analyze" error that says:
-# mixin_inherits_from_not_object
-analyzer:
- language:
- enableSuperMixins: true
diff --git a/flutter_flux/lib/src/store.dart b/flutter_flux/lib/src/store.dart
index 5c7a93a..2d84e08 100644
--- a/flutter_flux/lib/src/store.dart
+++ b/flutter_flux/lib/src/store.dart
@@ -101,7 +101,7 @@
/// called until that future has resolved and the function returns either
/// void (null) or true.
void triggerOnConditionalAction<T>(
- Action<T> action, bool onAction(T payload)) {
+ Action<T> action, FutureOr<bool> onAction(T payload)) {
assert(action != null);
action.listen((dynamic payload) async {
// Action functions must return bool, or a Future<bool>.
diff --git a/flutter_flux/lib/src/store_watcher.dart b/flutter_flux/lib/src/store_watcher.dart
index 7f8a35b..f45882f 100644
--- a/flutter_flux/lib/src/store_watcher.dart
+++ b/flutter_flux/lib/src/store_watcher.dart
@@ -79,7 +79,7 @@
/// Listens to changes in a number of different stores.
///
/// Used by [StoreWatcher] to track which stores the widget is listening to.
-abstract class StoreWatcherMixin<T extends StatefulWidget> extends State<T>{
+mixin StoreWatcherMixin<T extends StatefulWidget> on State<T>{
final Map<Store, StreamSubscription<Store>> _streamSubscriptions = <Store, StreamSubscription<Store>>{};
/// Start receiving notifications from the given store, optionally routed
diff --git a/flutter_flux/pubspec.yaml b/flutter_flux/pubspec.yaml
index ce2d3f2..f3351f4 100644
--- a/flutter_flux/pubspec.yaml
+++ b/flutter_flux/pubspec.yaml
@@ -1,7 +1,7 @@
# Important: Use "flutter packages get", not "pub get".
name: flutter_flux
author: Flutter Authors <flutter-dev@googlegroups.com>
-version: 4.1.2
+version: 4.1.3
description: Flux library for Flutter, featuring unidirectional dataflow inspired by reflux and Facebook's flux architecture.
homepage: https://github.com/google/flutter_flux
dependencies:
@@ -11,7 +11,8 @@
dev_dependencies:
quiver: '>=2.0.0 <3.0.0'
- test: ^1.3.0
+ test: ^1.5.1
+ mockito: ^4.0.0
flutter_test:
sdk: flutter
diff --git a/flutter_gallery_assets/lib/food/butternut_squash_soup.png b/flutter_gallery_assets/lib/food/butternut_squash_soup.png
new file mode 100644
index 0000000..afe4441
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/butternut_squash_soup.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/cherry_pie.png b/flutter_gallery_assets/lib/food/cherry_pie.png
new file mode 100644
index 0000000..77a5d80
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/cherry_pie.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/chopped_beet_leaves.png b/flutter_gallery_assets/lib/food/chopped_beet_leaves.png
new file mode 100644
index 0000000..527879e
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/chopped_beet_leaves.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/icons/fish.png b/flutter_gallery_assets/lib/food/icons/fish.png
new file mode 100644
index 0000000..c57ffc8
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/icons/fish.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/icons/healthy.png b/flutter_gallery_assets/lib/food/icons/healthy.png
new file mode 100644
index 0000000..8fbbf49
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/icons/healthy.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/icons/main.png b/flutter_gallery_assets/lib/food/icons/main.png
new file mode 100644
index 0000000..c65d819
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/icons/main.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/icons/meat.png b/flutter_gallery_assets/lib/food/icons/meat.png
new file mode 100644
index 0000000..89ae4b4
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/icons/meat.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/icons/quick.png b/flutter_gallery_assets/lib/food/icons/quick.png
new file mode 100644
index 0000000..c5728dc
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/icons/quick.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/icons/spicy.png b/flutter_gallery_assets/lib/food/icons/spicy.png
new file mode 100644
index 0000000..d3ecd61
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/icons/spicy.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/icons/veggie.png b/flutter_gallery_assets/lib/food/icons/veggie.png
new file mode 100644
index 0000000..b826733
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/icons/veggie.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/pesto_pasta.png b/flutter_gallery_assets/lib/food/pesto_pasta.png
new file mode 100644
index 0000000..d82675e
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/pesto_pasta.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/roasted_chicken.png b/flutter_gallery_assets/lib/food/roasted_chicken.png
new file mode 100644
index 0000000..7c1b4d2
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/roasted_chicken.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/spanakopita.png b/flutter_gallery_assets/lib/food/spanakopita.png
new file mode 100644
index 0000000..1f1457a
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/spanakopita.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/food/spinach_onion_salad.png b/flutter_gallery_assets/lib/food/spinach_onion_salad.png
new file mode 100644
index 0000000..8d464ba
--- /dev/null
+++ b/flutter_gallery_assets/lib/food/spinach_onion_salad.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/logos/flutter_white/1.5x/logo.png b/flutter_gallery_assets/lib/logos/flutter_white/1.5x/logo.png
new file mode 100644
index 0000000..1449289
--- /dev/null
+++ b/flutter_gallery_assets/lib/logos/flutter_white/1.5x/logo.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/logos/flutter_white/2.5x/logo.png b/flutter_gallery_assets/lib/logos/flutter_white/2.5x/logo.png
new file mode 100644
index 0000000..2020e76
--- /dev/null
+++ b/flutter_gallery_assets/lib/logos/flutter_white/2.5x/logo.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/logos/flutter_white/3.0x/logo.png b/flutter_gallery_assets/lib/logos/flutter_white/3.0x/logo.png
new file mode 100644
index 0000000..b42acc1
--- /dev/null
+++ b/flutter_gallery_assets/lib/logos/flutter_white/3.0x/logo.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/logos/flutter_white/4.0x/logo.png b/flutter_gallery_assets/lib/logos/flutter_white/4.0x/logo.png
new file mode 100644
index 0000000..58bc2d9
--- /dev/null
+++ b/flutter_gallery_assets/lib/logos/flutter_white/4.0x/logo.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/logos/flutter_white/logo.png b/flutter_gallery_assets/lib/logos/flutter_white/logo.png
new file mode 100644
index 0000000..3277025
--- /dev/null
+++ b/flutter_gallery_assets/lib/logos/flutter_white/logo.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/logos/pesto/logo_small.png b/flutter_gallery_assets/lib/logos/pesto/logo_small.png
new file mode 100644
index 0000000..f41fbb8
--- /dev/null
+++ b/flutter_gallery_assets/lib/logos/pesto/logo_small.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/people/ali_landscape.png b/flutter_gallery_assets/lib/people/ali_landscape.png
new file mode 100644
index 0000000..8ac86a5
--- /dev/null
+++ b/flutter_gallery_assets/lib/people/ali_landscape.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/people/square/ali.png b/flutter_gallery_assets/lib/people/square/ali.png
new file mode 100644
index 0000000..177a60d
--- /dev/null
+++ b/flutter_gallery_assets/lib/people/square/ali.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/people/square/peter.png b/flutter_gallery_assets/lib/people/square/peter.png
new file mode 100644
index 0000000..98d8987
--- /dev/null
+++ b/flutter_gallery_assets/lib/people/square/peter.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/people/square/sandra.png b/flutter_gallery_assets/lib/people/square/sandra.png
new file mode 100644
index 0000000..96e4c3f
--- /dev/null
+++ b/flutter_gallery_assets/lib/people/square/sandra.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/people/square/stella.png b/flutter_gallery_assets/lib/people/square/stella.png
new file mode 100644
index 0000000..1a98808
--- /dev/null
+++ b/flutter_gallery_assets/lib/people/square/stella.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/people/square/trevor.png b/flutter_gallery_assets/lib/people/square/trevor.png
new file mode 100644
index 0000000..9fbd09e
--- /dev/null
+++ b/flutter_gallery_assets/lib/people/square/trevor.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_chennai_flower_market.png b/flutter_gallery_assets/lib/places/india_chennai_flower_market.png
new file mode 100644
index 0000000..f23f37a
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_chennai_flower_market.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_chennai_highway.png b/flutter_gallery_assets/lib/places/india_chennai_highway.png
new file mode 100644
index 0000000..f6012f5
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_chennai_highway.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_chettinad_produce.png b/flutter_gallery_assets/lib/places/india_chettinad_produce.png
new file mode 100644
index 0000000..7043685
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_chettinad_produce.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_chettinad_silk_maker.png b/flutter_gallery_assets/lib/places/india_chettinad_silk_maker.png
new file mode 100644
index 0000000..ea4ff6b
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_chettinad_silk_maker.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_pondicherry_beach.png b/flutter_gallery_assets/lib/places/india_pondicherry_beach.png
new file mode 100644
index 0000000..ba27be7
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_pondicherry_beach.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_pondicherry_fisherman.png b/flutter_gallery_assets/lib/places/india_pondicherry_fisherman.png
new file mode 100644
index 0000000..ccfa98b
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_pondicherry_fisherman.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_pondicherry_salt_farm.png b/flutter_gallery_assets/lib/places/india_pondicherry_salt_farm.png
new file mode 100644
index 0000000..7dab064
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_pondicherry_salt_farm.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_tanjore_bronze_works.png b/flutter_gallery_assets/lib/places/india_tanjore_bronze_works.png
new file mode 100644
index 0000000..23fe309
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_tanjore_bronze_works.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_tanjore_market_merchant.png b/flutter_gallery_assets/lib/places/india_tanjore_market_merchant.png
new file mode 100644
index 0000000..388b3d4
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_tanjore_market_merchant.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_tanjore_market_technology.png b/flutter_gallery_assets/lib/places/india_tanjore_market_technology.png
new file mode 100644
index 0000000..14ced9f
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_tanjore_market_technology.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_tanjore_thanjavur_temple.png b/flutter_gallery_assets/lib/places/india_tanjore_thanjavur_temple.png
new file mode 100644
index 0000000..8690aa2
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_tanjore_thanjavur_temple.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_tanjore_thanjavur_temple_carvings.png b/flutter_gallery_assets/lib/places/india_tanjore_thanjavur_temple_carvings.png
new file mode 100644
index 0000000..79e7af2
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_tanjore_thanjavur_temple_carvings.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/places/india_thanjavur_market.png b/flutter_gallery_assets/lib/places/india_thanjavur_market.png
new file mode 100644
index 0000000..5d808ac
--- /dev/null
+++ b/flutter_gallery_assets/lib/places/india_thanjavur_market.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/backpack.png b/flutter_gallery_assets/lib/products/backpack.png
new file mode 100644
index 0000000..3ed4c43
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/backpack.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/belt.png b/flutter_gallery_assets/lib/products/belt.png
new file mode 100644
index 0000000..c47993a
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/belt.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/cup.png b/flutter_gallery_assets/lib/products/cup.png
new file mode 100644
index 0000000..e294a56
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/cup.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/deskset.png b/flutter_gallery_assets/lib/products/deskset.png
new file mode 100644
index 0000000..e45b3d0
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/deskset.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/dress.png b/flutter_gallery_assets/lib/products/dress.png
new file mode 100644
index 0000000..e508339
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/dress.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/earrings.png b/flutter_gallery_assets/lib/products/earrings.png
new file mode 100644
index 0000000..603b9fe
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/earrings.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/flatwear.png b/flutter_gallery_assets/lib/products/flatwear.png
new file mode 100644
index 0000000..23d3081
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/flatwear.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/hat.png b/flutter_gallery_assets/lib/products/hat.png
new file mode 100644
index 0000000..8b9e115
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/hat.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/jacket.png b/flutter_gallery_assets/lib/products/jacket.png
new file mode 100644
index 0000000..595b545
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/jacket.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/jumper.png b/flutter_gallery_assets/lib/products/jumper.png
new file mode 100644
index 0000000..d113cf8
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/jumper.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/kitchen_quattro.png b/flutter_gallery_assets/lib/products/kitchen_quattro.png
new file mode 100644
index 0000000..5806a67
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/kitchen_quattro.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/napkins.png b/flutter_gallery_assets/lib/products/napkins.png
new file mode 100644
index 0000000..f96359b
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/napkins.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/planters.png b/flutter_gallery_assets/lib/products/planters.png
new file mode 100644
index 0000000..a78ef21
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/planters.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/platter.png b/flutter_gallery_assets/lib/products/platter.png
new file mode 100644
index 0000000..3986e51
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/platter.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/scarf.png b/flutter_gallery_assets/lib/products/scarf.png
new file mode 100644
index 0000000..dfb7cc2
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/scarf.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/shirt.png b/flutter_gallery_assets/lib/products/shirt.png
new file mode 100644
index 0000000..cf58066
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/shirt.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/sunnies.png b/flutter_gallery_assets/lib/products/sunnies.png
new file mode 100644
index 0000000..2b2d054
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/sunnies.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/sweater.png b/flutter_gallery_assets/lib/products/sweater.png
new file mode 100644
index 0000000..53d4f7e
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/sweater.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/sweats.png b/flutter_gallery_assets/lib/products/sweats.png
new file mode 100644
index 0000000..0305107
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/sweats.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/table.png b/flutter_gallery_assets/lib/products/table.png
new file mode 100644
index 0000000..f537bf8
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/table.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/teaset.png b/flutter_gallery_assets/lib/products/teaset.png
new file mode 100644
index 0000000..0d68165
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/teaset.png
Binary files differ
diff --git a/flutter_gallery_assets/lib/products/top.png b/flutter_gallery_assets/lib/products/top.png
new file mode 100644
index 0000000..30ff754
--- /dev/null
+++ b/flutter_gallery_assets/lib/products/top.png
Binary files differ
diff --git a/flutter_svg/.travis.yml b/flutter_svg/.travis.yml
index 94aa202..bc9f40b 100644
--- a/flutter_svg/.travis.yml
+++ b/flutter_svg/.travis.yml
@@ -15,7 +15,7 @@
- gem install coveralls-lcov
script:
- ./flutter/bin/flutter analyze
- - ./flutter/bin/flutter test
+ - ./flutter/bin/flutter test --coverage
after_success:
- coveralls-lcov coverage/lcov.info
cache:
diff --git a/flutter_svg/BUILD.gn b/flutter_svg/BUILD.gn
index cd6f447..f0c95de 100644
--- a/flutter_svg/BUILD.gn
+++ b/flutter_svg/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by importer.py for flutter_svg-0.6.2
+# This file is generated by importer.py for flutter_svg-0.6.3
import("//build/dart/dart_library.gni")
diff --git a/flutter_svg/CHANGELOG.md b/flutter_svg/CHANGELOG.md
index e7fb9ff..4607fb5 100644
--- a/flutter_svg/CHANGELOG.md
+++ b/flutter_svg/CHANGELOG.md
@@ -1,5 +1,10 @@
# CHANGES
+## 0.6.3
+
+- Consume updated fversion of path_drawing.
+- Fix bug with fill-rule inheritence + example to test.
+
## 0.6.2
- Consume updated version of path_drawing, which fixes https://github.com/dnfield/flutter_svg/issues/73
diff --git a/flutter_svg/analysis_options.yaml b/flutter_svg/analysis_options.yaml
index 65ebee8..24d2179 100644
--- a/flutter_svg/analysis_options.yaml
+++ b/flutter_svg/analysis_options.yaml
@@ -20,8 +20,6 @@
# in sync with this file.
analyzer:
- language:
- enableSuperMixins: true
strong-mode:
implicit-dynamic: false
errors:
@@ -151,4 +149,4 @@
# - use_setters_to_change_properties # not yet tested
# - use_string_buffers # https://github.com/dart-lang/linter/pull/664
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
- - valid_regexps
\ No newline at end of file
+ - valid_regexps
diff --git a/flutter_svg/example/lib/main.dart b/flutter_svg/example/lib/main.dart
index 6e38234..65363f5 100644
--- a/flutter_svg/example/lib/main.dart
+++ b/flutter_svg/example/lib/main.dart
@@ -12,6 +12,7 @@
'assets/simple/clip_path_3.svg',
'assets/simple/clip_path_2.svg',
'assets/simple/clip_path.svg',
+ 'assets/simple/fill-rule-inherit.svg',
'assets/simple/group_fill_opacity.svg',
'assets/simple/group_opacity.svg',
'assets/simple/text.svg',
@@ -87,51 +88,39 @@
super.initState();
_dimension = 250.0;
- _painters.add(SvgPicture.string('''
-<svg id="acc99994-a8f7-4371-a8ec-e7fabb1ab565" data-name="Layer 1"
- xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
- <title>ic_checked</title>
- <g id="a9c0b5e8-c624-4f06-90b7-95bea8ab2723" data-name="ic/List/Check/Checked/Black">
- <g id="db01bf07-79db-412b-9a40-32025b982b07" data-name="ic checked">
- <polygon id="0350d6c0-4373-4661-8af6-19745a3976c3" data-name="1b39d160-b6a3-47e1-9aa4-8e7c13c17c6e" points="48 0 0 0 0 48 48 48 48 0" fill="none"/>
- <path id="2c2e53a8-32f5-4c40-99de-684ef17f451f" data-name="Combined-Shape" d="M40.2,18.86l2.26-2.51a19.93,19.93,0,1,1-5.4-7.45l-2,2.22a17.08,17.08,0,1,0,5.14,7.74ZM42.93,7.45a1.5,1.5,0,1,1,2.13,2.11L24.82,30.05a1.5,1.5,0,0,1-2.14,0l-7.25-7.48a1.5,1.5,0,0,1,2.15-2.09l6.18,6.38Z" fill="#3c4043"/>
- </g>
- </g>
-</svg>'''));
+ for (String assetName in assetNames) {
+ _painters.add(
+ new SvgPicture.asset(assetName),
+ );
+ }
- // for (String assetName in assetNames) {
- // _painters.add(
- // new SvgPicture.asset(assetName),
- // );
- // }
+ for (int i = 0; i < iconNames.length; i++) {
+ _painters.add(
+ new Directionality(
+ textDirection: TextDirection.ltr,
+ child: new SvgPicture.asset(
+ iconNames[i],
+ color: Colors.blueGrey[(i + 1) * 100],
+ matchTextDirection: true,
+ ),
+ ),
+ );
+ }
- // for (int i = 0; i < iconNames.length; i++) {
- // _painters.add(
- // new Directionality(
- // textDirection: TextDirection.ltr,
- // child: new SvgPicture.asset(
- // iconNames[i],
- // color: Colors.blueGrey[(i + 1) * 100],
- // matchTextDirection: true,
- // ),
- // ),
- // );
- // }
+ // _painters.add(new SvgPicture.asset(iconNames[0], color: Colors.red));
- // // _painters.add(new SvgPicture.asset(iconNames[0], color: Colors.red));
-
- // for (String uriName in uriNames) {
- // _painters.add(
- // new SvgPicture.network(
- // uriName,
- // placeholderBuilder: (BuildContext context) => new Container(
- // padding: const EdgeInsets.all(30.0),
- // child: const CircularProgressIndicator()),
- // ),
- // );
- // }
- // _painters
- // .add(new AvdPicture.asset('assets/android_vd/battery_charging.xml'));
+ for (String uriName in uriNames) {
+ _painters.add(
+ new SvgPicture.network(
+ uriName,
+ placeholderBuilder: (BuildContext context) => new Container(
+ padding: const EdgeInsets.all(30.0),
+ child: const CircularProgressIndicator()),
+ ),
+ );
+ }
+ _painters
+ .add(new AvdPicture.asset('assets/android_vd/battery_charging.xml'));
}
@override
diff --git a/flutter_svg/lib/src/svg_parser.dart b/flutter_svg/lib/src/svg_parser.dart
index f4762f1..a67bc8c 100644
--- a/flutter_svg/lib/src/svg_parser.dart
+++ b/flutter_svg/lib/src/svg_parser.dart
@@ -242,7 +242,11 @@
dashArray: parseDashArray(el),
dashOffset: parseDashOffset(el),
fill: parseFill(el, bounds, definitions, parentStyle?.fill),
- pathFillType: parseFillRule(el),
+ pathFillType: parseFillRule(
+ el,
+ 'fill-rule',
+ parentStyle != null ? null : 'nonzero',
+ ),
groupOpacity: parseOpacity(el),
clipPath: parseClipPath(el, definitions),
textStyle: new DrawableTextStyle(
diff --git a/flutter_svg/pubspec.yaml b/flutter_svg/pubspec.yaml
index 3eb4966..5ca404c 100644
--- a/flutter_svg/pubspec.yaml
+++ b/flutter_svg/pubspec.yaml
@@ -2,10 +2,10 @@
description: An SVG rendering and widget library for Flutter, which allows painting and displaying Scalable Vector Graphics 1.1 files.
author: Dan Field <dfield@gmail.com>
homepage: https://github.com/dnfield/flutter_svg
-version: 0.6.2
+version: 0.6.3
dependencies:
- path_drawing: ^0.3.1
+ path_drawing: ^0.4.0
xml: ^3.0.0
vector_math: ^2.0.4
meta: ^1.1.2
diff --git a/googleapis_auth/.idea/codeStyles/codeStyleConfig.xml b/googleapis_auth/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index c79f34c..0000000
--- a/googleapis_auth/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<component name="ProjectCodeStyleConfiguration">
- <state>
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Google Configuration Checker Style" />
- </state>
-</component>
\ No newline at end of file
diff --git a/googleapis_auth/.idea/googleapis_auth.iml b/googleapis_auth/.idea/googleapis_auth.iml
deleted file mode 100644
index ae9af97..0000000
--- a/googleapis_auth/.idea/googleapis_auth.iml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
- <excludeFolder url="file://$MODULE_DIR$/.pub" />
- <excludeFolder url="file://$MODULE_DIR$/build" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="Dart SDK" level="project" />
- <orderEntry type="library" name="Dart Packages" level="project" />
- </component>
-</module>
\ No newline at end of file
diff --git a/googleapis_auth/.idea/libraries/Dart_Packages.xml b/googleapis_auth/.idea/libraries/Dart_Packages.xml
deleted file mode 100644
index 85595e1..0000000
--- a/googleapis_auth/.idea/libraries/Dart_Packages.xml
+++ /dev/null
@@ -1,404 +0,0 @@
-<component name="libraryTable">
- <library name="Dart Packages" type="DartPackagesLibraryType">
- <properties>
- <option name="packageNameToDirsMap">
- <entry key="analyzer">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.33.0/lib" />
- </list>
- </value>
- </entry>
- <entry key="args">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib" />
- </list>
- </value>
- </entry>
- <entry key="async">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib" />
- </list>
- </value>
- </entry>
- <entry key="boolean_selector">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="charcode">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="collection">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib" />
- </list>
- </value>
- </entry>
- <entry key="convert">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="crypto">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="csslib">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="front_end">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="glob">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
- </list>
- </value>
- </entry>
- <entry key="html">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+3/lib" />
- </list>
- </value>
- </entry>
- <entry key="http">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http-0.12.0/lib" />
- </list>
- </value>
- </entry>
- <entry key="http_multi_server">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib" />
- </list>
- </value>
- </entry>
- <entry key="http_parser">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="io">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="js">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
- </list>
- </value>
- </entry>
- <entry key="json_rpc_2">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib" />
- </list>
- </value>
- </entry>
- <entry key="kernel">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="logging">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
- </list>
- </value>
- </entry>
- <entry key="matcher">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib" />
- </list>
- </value>
- </entry>
- <entry key="meta">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="mime">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib" />
- </list>
- </value>
- </entry>
- <entry key="multi_server_socket">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="node_preamble">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="package_config">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib" />
- </list>
- </value>
- </entry>
- <entry key="package_resolver">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="path">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="plugin">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
- </list>
- </value>
- </entry>
- <entry key="pool">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="pub_semver">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
- </list>
- </value>
- </entry>
- <entry key="shelf">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib" />
- </list>
- </value>
- </entry>
- <entry key="shelf_packages_handler">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="shelf_static">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.8/lib" />
- </list>
- </value>
- </entry>
- <entry key="shelf_web_socket">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib" />
- </list>
- </value>
- </entry>
- <entry key="source_map_stack_trace">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
- </list>
- </value>
- </entry>
- <entry key="source_maps">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.8/lib" />
- </list>
- </value>
- </entry>
- <entry key="source_span">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib" />
- </list>
- </value>
- </entry>
- <entry key="stack_trace">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
- </list>
- </value>
- </entry>
- <entry key="stream_channel">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib" />
- </list>
- </value>
- </entry>
- <entry key="string_scanner">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="term_glyph">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.0.1/lib" />
- </list>
- </value>
- </entry>
- <entry key="test">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/test-1.3.4/lib" />
- </list>
- </value>
- </entry>
- <entry key="typed_data">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="utf">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib" />
- </list>
- </value>
- </entry>
- <entry key="vm_service_client">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib" />
- </list>
- </value>
- </entry>
- <entry key="watcher">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib" />
- </list>
- </value>
- </entry>
- <entry key="web_socket_channel">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib" />
- </list>
- </value>
- </entry>
- <entry key="yaml">
- <value>
- <list>
- <option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib" />
- </list>
- </value>
- </entry>
- </option>
- </properties>
- <CLASSES>
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.33.0/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+3/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http-0.12.0/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.2/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.8/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.8/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.0.1/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/test-1.3.4/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib" />
- <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
-</component>
\ No newline at end of file
diff --git a/googleapis_auth/.idea/libraries/Dart_SDK.xml b/googleapis_auth/.idea/libraries/Dart_SDK.xml
deleted file mode 100644
index e2b2cff..0000000
--- a/googleapis_auth/.idea/libraries/Dart_SDK.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<component name="libraryTable">
- <library name="Dart SDK">
- <CLASSES>
- <root url="file://$USER_HOME$/install/dart-sdk/lib/async" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/cli" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/collection" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/convert" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/core" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/developer" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/html" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/indexed_db" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/io" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/isolate" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/js" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/js_util" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/math" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/mirrors" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/svg" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/typed_data" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/web_audio" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/web_gl" />
- <root url="file://$USER_HOME$/install/dart-sdk/lib/web_sql" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
-</component>
\ No newline at end of file
diff --git a/googleapis_auth/.idea/modules.xml b/googleapis_auth/.idea/modules.xml
deleted file mode 100644
index f84936d..0000000
--- a/googleapis_auth/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/.idea/googleapis_auth.iml" filepath="$PROJECT_DIR$/.idea/googleapis_auth.iml" />
- </modules>
- </component>
-</project>
\ No newline at end of file
diff --git a/googleapis_auth/.idea/vcs.xml b/googleapis_auth/.idea/vcs.xml
deleted file mode 100644
index 35eb1ddf..0000000
--- a/googleapis_auth/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="VcsDirectoryMappings">
- <mapping directory="" vcs="Git" />
- </component>
-</project>
\ No newline at end of file
diff --git a/googleapis_auth/.idea/workspace.xml b/googleapis_auth/.idea/workspace.xml
deleted file mode 100644
index a2c4c37..0000000
--- a/googleapis_auth/.idea/workspace.xml
+++ /dev/null
@@ -1,354 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ChangeListManager">
- <list default="true" id="1ecc8285-b9ac-4259-bb41-26e4a0d3bf71" name="Default" comment="" />
- <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
- <option name="TRACKING_ENABLED" value="true" />
- <option name="SHOW_DIALOG" value="false" />
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
- <option name="LAST_RESOLUTION" value="IGNORE" />
- </component>
- <component name="FileEditorManager">
- <leaf>
- <file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/pubspec.yaml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="150">
- <caret line="10" column="8" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="29" />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/README.md">
- <provider selected="true" editor-type-id="text-editor" />
- </entry>
- </file>
- <file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/CHANGELOG.md">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <caret column="3" lean-forward="true" selection-start-column="3" selection-end-column="10" />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="pubspec.lock" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/pubspec.lock">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="630">
- <caret line="90" column="16" lean-forward="true" selection-start-line="90" selection-start-column="16" selection-end-line="90" selection-end-column="16" />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="jwt.dart" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/lib/src/oauth2_flows/jwt.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <folding>
- <element signature="e#0#3365#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="implicit.dart" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/lib/src/oauth2_flows/implicit.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <folding>
- <element signature="e#0#5362#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="auth_code.dart" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/lib/src/oauth2_flows/auth_code.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-444">
- <folding>
- <element signature="e#0#9418#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="auth_http_utils.dart" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/lib/src/auth_http_utils.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="120">
- <caret line="8" column="21" lean-forward="true" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="21" />
- <folding>
- <element signature="e#0#4288#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
- </component>
- <component name="FindInProjectRecents">
- <findStrings>
- <find>package:http</find>
- </findStrings>
- </component>
- <component name="Git.Settings">
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
- </component>
- <component name="IdeDocumentHistory">
- <option name="CHANGED_PATHS">
- <list>
- <option value="$PROJECT_DIR$/pubspec.yaml" />
- <option value="$PROJECT_DIR$/CHANGELOG.md" />
- </list>
- </option>
- </component>
- <component name="ProjectFrameBounds" extendedState="6">
- <option name="x" value="245" />
- <option name="y" value="123" />
- <option name="width" value="1605" />
- <option name="height" value="1352" />
- </component>
- <component name="ProjectLevelVcsManager">
- <ConfirmationsSetting value="1" id="Add" />
- </component>
- <component name="ProjectView">
- <navigator proportions="" version="1">
- <foldersAlwaysOnTop value="true" />
- </navigator>
- <panes>
- <pane id="PackagesPane" />
- <pane id="ProjectPane">
- <subPane>
- <expand>
- <path>
- <item name="googleapis_auth" type="b2602c69:ProjectViewProjectNode" />
- <item name="googleapis_auth" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="googleapis_auth" type="b2602c69:ProjectViewProjectNode" />
- <item name="googleapis_auth" type="462c0819:PsiDirectoryNode" />
- <item name="lib" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="googleapis_auth" type="b2602c69:ProjectViewProjectNode" />
- <item name="googleapis_auth" type="462c0819:PsiDirectoryNode" />
- <item name="lib" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="googleapis_auth" type="b2602c69:ProjectViewProjectNode" />
- <item name="googleapis_auth" type="462c0819:PsiDirectoryNode" />
- <item name="lib" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- <item name="crypto" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="googleapis_auth" type="b2602c69:ProjectViewProjectNode" />
- <item name="googleapis_auth" type="462c0819:PsiDirectoryNode" />
- <item name="lib" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- <item name="oauth2_flows" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="googleapis_auth" type="b2602c69:ProjectViewProjectNode" />
- <item name="googleapis_auth" type="462c0819:PsiDirectoryNode" />
- <item name="test" type="462c0819:PsiDirectoryNode" />
- </path>
- </expand>
- <select />
- </subPane>
- </pane>
- <pane id="Scope" />
- <pane id="AndroidView" />
- </panes>
- </component>
- <component name="PropertiesComponent">
- <property name="dart.analysis.tool.window.force.activate" value="false" />
- <property name="last_opened_file_path" value="$PROJECT_DIR$" />
- </component>
- <component name="RunDashboard">
- <option name="ruleStates">
- <list>
- <RuleState>
- <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
- </RuleState>
- <RuleState>
- <option name="name" value="StatusDashboardGroupingRule" />
- </RuleState>
- </list>
- </option>
- </component>
- <component name="RunManager">
- <configuration default="true" type="Application" factoryName="Application">
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- </configuration>
- <configuration name="tests in googleapis_auth" type="DartTestRunConfigurationType" factoryName="Dart Test" temporary="true" nameIsGenerated="true">
- <option name="filePath" value="$PROJECT_DIR$" />
- <option name="scope" value="FOLDER" />
- </configuration>
- <configuration default="true" type="JUnit" factoryName="JUnit">
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="PACKAGE_NAME" />
- <option name="MAIN_CLASS_NAME" />
- <option name="METHOD_NAME" />
- <option name="TEST_OBJECT" value="class" />
- <option name="VM_PARAMETERS" value="-ea" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="singleModule" />
- </option>
- <patterns />
- </configuration>
- <configuration default="true" type="TestNG" factoryName="TestNG">
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="SUITE_NAME" />
- <option name="PACKAGE_NAME" />
- <option name="MAIN_CLASS_NAME" />
- <option name="METHOD_NAME" />
- <option name="GROUP_NAME" />
- <option name="TEST_OBJECT" value="CLASS" />
- <option name="VM_PARAMETERS" value="-ea" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
- <option name="OUTPUT_DIRECTORY" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="singleModule" />
- </option>
- <option name="USE_DEFAULT_REPORTERS" value="false" />
- <option name="PROPERTIES_FILE" />
- <properties />
- <listeners />
- </configuration>
- <recent_temporary>
- <list>
- <item itemvalue="Dart Test.tests in googleapis_auth" />
- </list>
- </recent_temporary>
- </component>
- <component name="SvnConfiguration">
- <configuration />
- </component>
- <component name="TaskManager">
- <task active="true" id="Default" summary="Default task">
- <changelist id="1ecc8285-b9ac-4259-bb41-26e4a0d3bf71" name="Default" comment="" />
- <created>1539694626517</created>
- <option name="number" value="Default" />
- <option name="presentableId" value="Default" />
- <updated>1539694626517</updated>
- </task>
- <servers />
- </component>
- <component name="TestHistory">
- <history-entry file="tests_in_googleapis_auth - 2018.10.16 at 14h 58m 07s.xml">
- <configuration name="tests in googleapis_auth" configurationId="DartTestRunConfigurationType" />
- </history-entry>
- </component>
- <component name="ToolWindowManager">
- <frame x="-1" y="0" width="2562" height="1575" extended-state="6" />
- <layout>
- <window_info anchor="right" id="Palette" />
- <window_info anchor="bottom" id="TODO" order="6" />
- <window_info anchor="bottom" id="Messages" weight="0.32969284" />
- <window_info anchor="right" id="Palette	" />
- <window_info id="Image Layers" />
- <window_info anchor="right" id="Capture Analysis" />
- <window_info anchor="bottom" id="Event Log" side_tool="true" />
- <window_info anchor="right" id="Maven Projects" />
- <window_info anchor="bottom" id="Dart Analysis" weight="0.32969284" />
- <window_info anchor="bottom" id="Run" order="2" weight="0.32969284" />
- <window_info anchor="bottom" id="Version Control" />
- <window_info anchor="bottom" id="Code Review" />
- <window_info anchor="bottom" id="Terminal" />
- <window_info id="Capture Tool" />
- <window_info id="Designer" />
- <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25" />
- <window_info anchor="bottom" id="Find" order="1" />
- <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
- <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
- <window_info id="UI Designer" />
- <window_info anchor="right" id="Theme Preview" />
- <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
- <window_info id="Favorites" side_tool="true" />
- <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
- <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
- <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
- <window_info anchor="bottom" id="Message" order="0" />
- <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
- </layout>
- </component>
- <component name="VcsContentAnnotationSettings">
- <option name="myLimit" value="2678400000" />
- </component>
- <component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/lib/src/oauth2_flows/jwt.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <folding>
- <element signature="e#0#3365#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/oauth2_flows/implicit.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <folding>
- <element signature="e#0#5362#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/oauth2_flows/auth_code.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-444">
- <folding>
- <element signature="e#0#9418#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/lib/src/auth_http_utils.dart">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="120">
- <caret line="8" column="21" lean-forward="true" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="21" />
- <folding>
- <element signature="e#0#4288#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/README.md">
- <provider selected="true" editor-type-id="text-editor" />
- </entry>
- <entry file="file://$PROJECT_DIR$/pubspec.lock">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="630">
- <caret line="90" column="16" lean-forward="true" selection-start-line="90" selection-start-column="16" selection-end-line="90" selection-end-column="16" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/pubspec.yaml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="150">
- <caret line="10" column="8" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="29" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/CHANGELOG.md">
- <provider selected="true" editor-type-id="text-editor">
- <state>
- <caret column="3" lean-forward="true" selection-start-column="3" selection-end-column="10" />
- </state>
- </provider>
- </entry>
- </component>
-</project>
\ No newline at end of file
diff --git a/googleapis_auth/BUILD.gn b/googleapis_auth/BUILD.gn
index 9155590..3568511 100644
--- a/googleapis_auth/BUILD.gn
+++ b/googleapis_auth/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by importer.py for googleapis_auth-0.2.5+3
+# This file is generated by importer.py for googleapis_auth-0.2.6
import("//build/dart/dart_library.gni")
diff --git a/googleapis_auth/CHANGELOG.md b/googleapis_auth/CHANGELOG.md
index 739d700..dc786ed 100644
--- a/googleapis_auth/CHANGELOG.md
+++ b/googleapis_auth/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.2.6
+
+- Ignore script loading error after timeout for in-browser implicit login-flow.
+
## 0.2.5+3
- Support `package:http` `>=0.11.3+17 <0.13.0`.
diff --git a/googleapis_auth/lib/src/oauth2_flows/implicit.dart b/googleapis_auth/lib/src/oauth2_flows/implicit.dart
index 0247361..a476700 100644
--- a/googleapis_auth/lib/src/oauth2_flows/implicit.dart
+++ b/googleapis_auth/lib/src/oauth2_flows/implicit.dart
@@ -71,7 +71,10 @@
script.src = '${gapiUrl}?onload=dartGapiLoaded';
script.onError.first.then((errorEvent) {
timeout.cancel();
- completer.completeError(new Exception('Failed to load gapi library.'));
+ if (!completer.isCompleted) {
+ // script loading errors can still happen after timeouts
+ completer.completeError(new Exception('Failed to load gapi library.'));
+ }
});
html.document.body.append(script);
diff --git a/googleapis_auth/pubspec.yaml b/googleapis_auth/pubspec.yaml
index ae8275f..97fe386 100644
--- a/googleapis_auth/pubspec.yaml
+++ b/googleapis_auth/pubspec.yaml
@@ -1,5 +1,5 @@
name: googleapis_auth
-version: 0.2.5+3
+version: 0.2.6
author: Dart Team <misc@dartlang.org>
description: Obtain Access credentials for Google services using OAuth 2.0
homepage: https://github.com/dart-lang/googleapis_auth
diff --git a/path_drawing/.gitignore b/path_drawing/.gitignore
index 43b5f44..ea35217 100644
--- a/path_drawing/.gitignore
+++ b/path_drawing/.gitignore
@@ -6,5 +6,6 @@
.idea/
build/
+coverage/
.flutter-plugins
diff --git a/path_drawing/.travis.yml b/path_drawing/.travis.yml
index 59ca964..bc9f40b 100644
--- a/path_drawing/.travis.yml
+++ b/path_drawing/.travis.yml
@@ -12,9 +12,12 @@
before_script:
- git clone https://github.com/flutter/flutter.git -b dev --single-branch
- ./flutter/bin/flutter doctor
+ - gem install coveralls-lcov
script:
- ./flutter/bin/flutter analyze
- - ./flutter/bin/flutter test
+ - ./flutter/bin/flutter test --coverage
+after_success:
+ - coveralls-lcov coverage/lcov.info
cache:
directories:
- $HOME/.pub-cache
diff --git a/path_drawing/BUILD.gn b/path_drawing/BUILD.gn
index 825ec50..0708a77 100644
--- a/path_drawing/BUILD.gn
+++ b/path_drawing/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by importer.py for path_drawing-0.3.1
+# This file is generated by importer.py for path_drawing-0.4.0
import("//build/dart/dart_library.gni")
diff --git a/path_drawing/CHANGELOG.md b/path_drawing/CHANGELOG.md
index 95beda8..c001dd3 100644
--- a/path_drawing/CHANGELOG.md
+++ b/path_drawing/CHANGELOG.md
@@ -1,5 +1,11 @@
# CHANGELOG
+## 0.4.0
+
+- Implement path trimming routine
+- Update example to demonstrate dash paths and trim paths.
+- Remove `new` keyword.
+
## 0.3.1
- Consume updated version of parsing library
diff --git a/path_drawing/analysis_options.yaml b/path_drawing/analysis_options.yaml
index 486e3db..a2775f4 100644
--- a/path_drawing/analysis_options.yaml
+++ b/path_drawing/analysis_options.yaml
@@ -20,8 +20,6 @@
# in sync with this file.
analyzer:
- language:
- enableSuperMixins: true
strong-mode:
implicit-dynamic: false
errors:
diff --git a/path_drawing/example/lib/main.dart b/path_drawing/example/lib/main.dart
index 72df3cb..43d636d 100644
--- a/path_drawing/example/lib/main.dart
+++ b/path_drawing/example/lib/main.dart
@@ -1,17 +1,16 @@
-import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:path_drawing/path_drawing.dart';
-void main() => runApp(new MyApp());
+void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return new MaterialApp(
+ return MaterialApp(
title: 'Flutter Demo',
- theme: new ThemeData(
+ theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
@@ -25,60 +24,21 @@
final String title;
@override
- _MyHomePageState createState() => new _MyHomePageState();
+ _MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
- static const List<String> paths = const <String>[
- 'm18 11.8a.41.41 0 0 1 .24.08l.59.43h.05.72a.4.4 0 0 1 .39.28l.22.69a.08.08 0 0 0 0 0l.58.43a.41.41 0 0 1 .15.45l-.22.68a.09.09 0 0 0 0 .07l.22.68a.4.4 0 0 1 -.15.46l-.58.42a.1.1 0 0 0 0 0l-.22.68a.41.41 0 0 1 -.38.29h-.79l-.58.43a.41.41 0 0 1 -.24.08.46.46 0 0 1 -.24-.08l-.58-.43h-.06-.72a.41.41 0 0 1 -.39-.28l-.22-.68a.1.1 0 0 0 0 0l-.58-.43a.42.42 0 0 1 -.15-.46l.23-.67v-.02l-.29-.68a.43.43 0 0 1 .15-.46l.58-.42a.1.1 0 0 0 0-.05l.27-.69a.42.42 0 0 1 .39-.28h.78l.58-.43a.43.43 0 0 1 .25-.09m0-1a1.37 1.37 0 0 0 -.83.27l-.34.25h-.43a1.42 1.42 0 0 0 -1.34 1l-.13.4-.35.25a1.42 1.42 0 0 0 -.51 1.58l.13.4-.13.4a1.39 1.39 0 0 0 .52 1.59l.34.25.13.4a1.41 1.41 0 0 0 1.34 1h.43l.34.26a1.44 1.44 0 0 0 .83.27 1.38 1.38 0 0 0 .83-.28l.35-.24h.43a1.4 1.4 0 0 0 1.33-1l.13-.4.35-.26a1.39 1.39 0 0 0 .51-1.57l-.13-.4.13-.41a1.4 1.4 0 0 0 -.51-1.56l-.35-.25-.13-.41a1.4 1.4 0 0 0 -1.34-1h-.42l-.34-.26a1.43 1.43 0 0 0 -.84-.28z',
- '''M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z''',
- 'M100,200 L3,4',
- 'M100,200 l3,4',
- 'M100,200 H3',
- 'M100,200 h3',
- 'M100,200 V3',
- 'M100,200 v3',
- 'M100,200 C3,4,5,6,7,8',
- 'M100,200 c3,4,5,6,7,8',
- 'M100,200 S3,4,5,6',
- 'M100,200 s3,4,5,6',
- 'M100,200 Q3,4,5,6',
- 'M100,200 q3,4,5,6',
- 'M100,200 T3,4',
- 'M100,200 t3,4',
- 'M100,200 A3,4,5,0,0,6,7',
- 'M100,200 A3,4,5,1,0,6,7',
- 'M100,200 A3,4,5,0,1,6,7',
- 'M100,200 A3,4,5,1,1,6,7',
- 'M100,200 a3,4,5,0,0,6,7',
- 'M100,200 a3,4,5,0,1,6,7',
- 'M100,200 a3,4,5,1,0,6,7',
- 'M100,200 a3,4,5,1,1,6,7',
- 'M100,200 a3,4,5,006,7',
- 'M100,200 a3,4,5,016,7',
- 'M100,200 a3,4,5,106,7',
- 'M100,200 a3,4,5,116,7',
- '''M19.0281,19.40466 20.7195,19.40466 20.7195,15.71439 24.11486,15.71439 24.11486,14.36762 20.7195,14.36762
-20.7195,11.68641 24.74134,11.68641 24.74134,10.34618 19.0281,10.34618 z''',
- 'M100,200 a0,4,5,0,0,10,0 a4,0,5,0,0,0,10 a0,0,5,0,0,-10,0 z',
- 'M.1 .2 L.3 .4 .5 .6',
- 'M1,1h2,3',
- 'M1,1H2,3',
- 'M1,1v2,3',
- 'M1,1V2,3',
- 'M1,1c2,3 4,5 6,7 8,9 10,11 12,13',
- 'M1,1C2,3 4,5 6,7 8,9 10,11 12,13',
- 'M1,1s2,3 4,5 6,7 8,9',
- 'M1,1S2,3 4,5 6,7 8,9',
- 'M1,1q2,3 4,5 6,7 8,9',
- 'M1,1Q2,3 4,5 6,7 8,9',
- 'M1,1t2,3 4,5',
- 'M1,1T2,3 4,5',
- 'M1,1a2,3,4,0,0,5,6 7,8,9,0,0,10,11',
- 'M1,1A2,3,4,0,0,5,6 7,8,9,0,0,10,11',
- ];
+ int index;
+ double _trimPercent;
+ PathTrimOrigin _trimOrigin;
- int index = 0;
+ @override
+ void initState() {
+ super.initState();
+ index = 0;
+ _trimPercent = 0.2;
+ _trimOrigin = PathTrimOrigin.begin;
+ }
String get currPath => paths[index];
@@ -90,37 +50,183 @@
setState(() => index = index == 0 ? paths.length - 1 : index - 1);
}
+ void setTrimPercent(double value) {
+ setState(() {
+ _trimPercent = value;
+ });
+ }
+
+ void toggleTrimOrigin(PathTrimOrigin value) {
+ setState(() {
+ switch (_trimOrigin) {
+ case PathTrimOrigin.begin:
+ _trimOrigin = PathTrimOrigin.end;
+ break;
+ case PathTrimOrigin.end:
+ _trimOrigin = PathTrimOrigin.begin;
+ break;
+ }
+ });
+ }
+
@override
Widget build(BuildContext context) {
- return new Scaffold(
- appBar: new AppBar(
- title: new Text(widget.title),
- ),
- body: new Center(
- child: new Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- new CustomPaint(painter: new PathTestPainter(currPath))
+ return DefaultTabController(
+ length: 3,
+ child: Scaffold(
+ appBar: AppBar(
+ title: Text(widget.title),
+ bottom: const TabBar(
+ tabs: <Tab>[
+ const Tab(text: 'Path Trim'),
+ const Tab(text: 'Path Dash'),
+ const Tab(text: 'Path Parse'),
],
),
),
- floatingActionButton: new Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: <Widget>[
- new FloatingActionButton(
- child: const Icon(Icons.navigate_before),
- backgroundColor: Colors.blueGrey,
- onPressed: prevPath,
- ),
- new Container(
- child: new Text(index.toString()),
- margin: const EdgeInsets.only(left: 10.0, right: 10.0)),
- new FloatingActionButton(
- child: const Icon(Icons.navigate_next),
- backgroundColor: Colors.blueGrey,
- onPressed: nextPath,
- )
- ]));
+ body: TabBarView(
+ children: <Widget>[
+ Stack(
+ children: <Widget>[
+ CustomPaint(
+ painter: TrimPathPainter(_trimPercent, _trimOrigin)),
+ Align(
+ alignment: Alignment.bottomCenter,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: <Widget>[
+ Slider(
+ value: _trimPercent,
+ onChanged: (double value) => setTrimPercent(value),
+ ),
+ RadioListTile<PathTrimOrigin>(
+ title: Text(PathTrimOrigin.begin.toString()),
+ value: PathTrimOrigin.begin,
+ groupValue: _trimOrigin,
+ onChanged: toggleTrimOrigin,
+ ),
+ RadioListTile<PathTrimOrigin>(
+ title: Text(PathTrimOrigin.end.toString()),
+ value: PathTrimOrigin.end,
+ groupValue: _trimOrigin,
+ onChanged: toggleTrimOrigin,
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ CustomPaint(painter: DashPathPainter()),
+ Stack(
+ children: <Widget>[
+ CustomPaint(painter: PathTestPainter(currPath)),
+ GestureDetector(
+ onTap: nextPath,
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+const List<String> paths = <String>[
+ 'm18 11.8a.41.41 0 0 1 .24.08l.59.43h.05.72a.4.4 0 0 1 .39.28l.22.69a.08.08 0 0 0 0 0l.58.43a.41.41 0 0 1 .15.45l-.22.68a.09.09 0 0 0 0 .07l.22.68a.4.4 0 0 1 -.15.46l-.58.42a.1.1 0 0 0 0 0l-.22.68a.41.41 0 0 1 -.38.29h-.79l-.58.43a.41.41 0 0 1 -.24.08.46.46 0 0 1 -.24-.08l-.58-.43h-.06-.72a.41.41 0 0 1 -.39-.28l-.22-.68a.1.1 0 0 0 0 0l-.58-.43a.42.42 0 0 1 -.15-.46l.23-.67v-.02l-.29-.68a.43.43 0 0 1 .15-.46l.58-.42a.1.1 0 0 0 0-.05l.27-.69a.42.42 0 0 1 .39-.28h.78l.58-.43a.43.43 0 0 1 .25-.09m0-1a1.37 1.37 0 0 0 -.83.27l-.34.25h-.43a1.42 1.42 0 0 0 -1.34 1l-.13.4-.35.25a1.42 1.42 0 0 0 -.51 1.58l.13.4-.13.4a1.39 1.39 0 0 0 .52 1.59l.34.25.13.4a1.41 1.41 0 0 0 1.34 1h.43l.34.26a1.44 1.44 0 0 0 .83.27 1.38 1.38 0 0 0 .83-.28l.35-.24h.43a1.4 1.4 0 0 0 1.33-1l.13-.4.35-.26a1.39 1.39 0 0 0 .51-1.57l-.13-.4.13-.41a1.4 1.4 0 0 0 -.51-1.56l-.35-.25-.13-.41a1.4 1.4 0 0 0 -1.34-1h-.42l-.34-.26a1.43 1.43 0 0 0 -.84-.28z',
+ '''M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z''',
+ 'M100,200 L3,4',
+ 'M100,200 l3,4',
+ 'M100,200 H3',
+ 'M100,200 h3',
+ 'M100,200 V3',
+ 'M100,200 v3',
+ 'M100,200 C3,4,5,6,7,8',
+ 'M100,200 c3,4,5,6,7,8',
+ 'M100,200 S3,4,5,6',
+ 'M100,200 s3,4,5,6',
+ 'M100,200 Q3,4,5,6',
+ 'M100,200 q3,4,5,6',
+ 'M100,200 T3,4',
+ 'M100,200 t3,4',
+ 'M100,200 A3,4,5,0,0,6,7',
+ 'M100,200 A3,4,5,1,0,6,7',
+ 'M100,200 A3,4,5,0,1,6,7',
+ 'M100,200 A3,4,5,1,1,6,7',
+ 'M100,200 a3,4,5,0,0,6,7',
+ 'M100,200 a3,4,5,0,1,6,7',
+ 'M100,200 a3,4,5,1,0,6,7',
+ 'M100,200 a3,4,5,1,1,6,7',
+ 'M100,200 a3,4,5,006,7',
+ 'M100,200 a3,4,5,016,7',
+ 'M100,200 a3,4,5,106,7',
+ 'M100,200 a3,4,5,116,7',
+ '''M19.0281,19.40466 20.7195,19.40466 20.7195,15.71439 24.11486,15.71439 24.11486,14.36762 20.7195,14.36762
+20.7195,11.68641 24.74134,11.68641 24.74134,10.34618 19.0281,10.34618 z''',
+ 'M100,200 a0,4,5,0,0,10,0 a4,0,5,0,0,0,10 a0,0,5,0,0,-10,0 z',
+ 'M.1 .2 L.3 .4 .5 .6',
+ 'M1,1h2,3',
+ 'M1,1H2,3',
+ 'M1,1v2,3',
+ 'M1,1V2,3',
+ 'M1,1c2,3 4,5 6,7 8,9 10,11 12,13',
+ 'M1,1C2,3 4,5 6,7 8,9 10,11 12,13',
+ 'M1,1s2,3 4,5 6,7 8,9',
+ 'M1,1S2,3 4,5 6,7 8,9',
+ 'M1,1q2,3 4,5 6,7 8,9',
+ 'M1,1Q2,3 4,5 6,7 8,9',
+ 'M1,1t2,3 4,5',
+ 'M1,1T2,3 4,5',
+ 'M1,1a2,3,4,0,0,5,6 7,8,9,0,0,10,11',
+ 'M1,1A2,3,4,0,0,5,6 7,8,9,0,0,10,11',
+];
+
+final Paint black = Paint()
+ ..color = Colors.black
+ ..strokeWidth = 1.0
+ ..style = PaintingStyle.stroke;
+
+class TrimPathPainter extends CustomPainter {
+ TrimPathPainter(this.percent, this.origin);
+
+ final double percent;
+ final PathTrimOrigin origin;
+
+ final Path p = Path()
+ ..moveTo(10.0, 10.0)
+ ..lineTo(100.0, 100.0)
+ ..quadraticBezierTo(125.0, 20.0, 200.0, 100.0);
+
+ @override
+ bool shouldRepaint(TrimPathPainter oldDelegate) =>
+ oldDelegate.percent != percent;
+
+ @override
+ void paint(Canvas canvas, Size size) {
+ canvas.drawPath(trimPath(p, percent, origin: origin), black);
+ }
+}
+
+class DashPathPainter extends CustomPainter {
+ final Path p = Path()
+ ..moveTo(10.0, 10.0)
+ ..lineTo(100.0, 100.0)
+ ..quadraticBezierTo(125.0, 20.0, 200.0, 100.0)
+ ..addRect(Rect.fromLTWH(0.0, 0.0, 50.0, 50.0));
+
+ @override
+ bool shouldRepaint(DashPathPainter oldDelegate) => true;
+
+ @override
+ void paint(Canvas canvas, Size size) {
+ canvas.drawPath(
+ dashPath(
+ p,
+ dashArray: CircularIntervalList<double>(
+ <double>[5.0, 2.5],
+ ),
+ ),
+ black);
}
}
@@ -128,49 +234,12 @@
PathTestPainter(String path) : p = parseSvgPathData(path);
final Path p;
- final Path p2 = new Path()
- ..moveTo(10.0, 10.0)
- ..lineTo(100.0, 100.0)
- //..lineTo(125.0, 20.0)
- ..quadraticBezierTo(125.0, 20.0, 200.0, 100.0)
- ..addRect(new Rect.fromLTWH(0.0, 0.0, 50.0, 50.0));
- final Path p3 = new Path()
- ..addRect(new Rect.fromLTWH(20.0, 20.0, 50.0, 50.0));
- final Paint black = new Paint()
- ..color = Colors.black
- ..strokeWidth = 1.0
- ..style = PaintingStyle.stroke;
- final Paint red = new Paint()
- ..color = Colors.red
- ..strokeWidth = 5.0
- ..style = PaintingStyle.stroke;
@override
- bool shouldRepaint(PathTestPainter old) => true;
-
- static Float64List matrix(
- double a, double b, double c, double d, double e, double f) {
- return new Matrix4(
- a, b, 0.0, 0.0, c, d, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, e, f, 0.0, 1.0)
- .storage;
- }
+ bool shouldRepaint(PathTestPainter oldDelegate) => true;
@override
void paint(Canvas canvas, Size size) {
canvas.drawPath(p, black);
- // canvas.drawPath(p2, black);
- // canvas.translate(0.0, -100.0);
- // canvas.drawPath(
- // dashPath(p2,
- // dashArray: new CircularIntervalList<double>(
- // <double>[5.0, 10.0, 15.0, 15.0]),
- // dashOffset: new DashOffset.percentage(.05)),
- // red);
- // canvas
- // ..scale(5.0, 5.0)
- // ..translate(-50.0, -35.0);
- // canvas.drawPath(p3, red);
- // canvas.drawPath(p2, red);
- // canvas.drawPath(Path.combine(PathOperation.intersect, p2, p3), black);
}
}
diff --git a/path_drawing/lib/path_drawing.dart b/path_drawing/lib/path_drawing.dart
index bac8b8c..2ff88cf 100644
--- a/path_drawing/lib/path_drawing.dart
+++ b/path_drawing/lib/path_drawing.dart
@@ -1,2 +1,3 @@
export 'package:path_drawing/src/parse_path.dart';
export 'package:path_drawing/src/dash_path.dart';
+export 'package:path_drawing/src/trim_path.dart';
diff --git a/path_drawing/lib/src/cull_trim_path.dart b/path_drawing/lib/src/cull_trim_path.dart
deleted file mode 100644
index f49fa72..0000000
--- a/path_drawing/lib/src/cull_trim_path.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-// import 'dart:ui';
-
-// Path trimPath(Path source, double length, {bool firstOnly = true}) {}
-
-// Path trimPathStart(Path source, double length, {bool firstOnly = true}) {}
-
-// Path trimPathEnd(Path source, double length) {}
-
-// Path cullPath(Path source, Rect bounds) {}
diff --git a/path_drawing/lib/src/dash_path.dart b/path_drawing/lib/src/dash_path.dart
index 5c656d5..ac68bc7 100644
--- a/path_drawing/lib/src/dash_path.dart
+++ b/path_drawing/lib/src/dash_path.dart
@@ -10,9 +10,13 @@
/// `dashOffset` specifies an initial starting point for the dashing.
///
/// Passing in a null `source` will result in a null result. Passing a `source`
-/// that is an empty path will return the `source`.
-Path dashPath(Path source,
- {@required CircularIntervalList<double> dashArray, DashOffset dashOffset}) {
+/// that is an empty path will return an empty path.
+Path dashPath(
+ Path source, {
+ @required CircularIntervalList<double> dashArray,
+ DashOffset dashOffset,
+}) {
+ assert(dashArray != null);
if (source == null) {
return null;
}
@@ -20,9 +24,7 @@
dashOffset = dashOffset ?? const DashOffset.absolute(0.0);
// TODO: Is there some way to determine how much of a path would be visible today?
- bool some = false;
-
- final Path dest = new Path();
+ final Path dest = Path();
for (final PathMetric metric in source.computeMetrics()) {
double distance = dashOffset._calculate(metric.length);
bool draw = true;
@@ -34,11 +36,6 @@
distance += len;
draw = !draw;
}
- some = true;
- }
-
- if (!some) {
- return source;
}
return dest;
@@ -51,9 +48,6 @@
///
/// The internal value will be guaranteed to not be null.
class DashOffset {
- final double _rawVal;
- final _DashOffsetType _dashOffsetType;
-
/// Create a DashOffset that will be measured as a percentage of the length
/// of the segment being dashed.
///
@@ -71,6 +65,9 @@
: _rawVal = start ?? 0.0,
_dashOffsetType = _DashOffsetType.Absolute;
+ final double _rawVal;
+ final _DashOffsetType _dashOffsetType;
+
double _calculate(double length) {
return _dashOffsetType == _DashOffsetType.Absolute
? _rawVal
diff --git a/path_drawing/lib/src/parse_path.dart b/path_drawing/lib/src/parse_path.dart
index 6714554..9a6573d 100644
--- a/path_drawing/lib/src/parse_path.dart
+++ b/path_drawing/lib/src/parse_path.dart
@@ -11,20 +11,22 @@
return null;
}
if (svg == '') {
- return new Path();
+ return Path();
}
- final SvgPathStringSource parser = new SvgPathStringSource(svg);
- final FlutterPathProxy path = new FlutterPathProxy();
- final SvgPathNormalizer normalizer = new SvgPathNormalizer();
+ final SvgPathStringSource parser = SvgPathStringSource(svg);
+ final FlutterPathProxy path = FlutterPathProxy();
+ final SvgPathNormalizer normalizer = SvgPathNormalizer();
for (PathSegmentData seg in parser.parseSegments()) {
normalizer.emitSegment(seg, path);
}
return path.path;
}
+/// A [PathProxy] that takes the output of the path parsing library
+/// and maps it to a dart:ui [Path].
class FlutterPathProxy extends PathProxy {
- FlutterPathProxy({Path p}) : path = p ?? new Path();
+ FlutterPathProxy({Path p}) : path = p ?? Path();
final Path path;
diff --git a/path_drawing/lib/src/trim_path.dart b/path_drawing/lib/src/trim_path.dart
new file mode 100644
index 0000000..9b21fdc
--- /dev/null
+++ b/path_drawing/lib/src/trim_path.dart
@@ -0,0 +1,72 @@
+import 'dart:ui';
+
+/// The point on the path to trim from.
+enum PathTrimOrigin {
+ /// Specifies that trimming should start from the first point in a segment.
+ begin,
+
+ /// Specifies that trimming should start from the last point in a segment.
+ end
+}
+
+/// Trims `percentage` of the `source` [Path] away and returns a new path.
+///
+/// The `percentage` parameter will be clamped between 0..1 and must not be null.
+///
+/// Use the `firstOnly` parameter to specify whether this should apply only
+/// to the first segment of the path (and thus return only the first trimmed
+/// segment) or all segments of the path. Multi-segment paths (i.e. paths with a
+/// move verb) will all be trimmed if this is false; otherwise, a trimmed version
+/// of only the first path segment will be returned. It must not be null.
+///
+/// The `origin` parameter allows the user to control which end of the path will be
+/// trimmed. It must not be null.
+///
+/// If `source` is null, null will be returned. If `source` is empty, an empty
+/// path will be returned.
+Path trimPath(
+ Path source,
+ double percentage, {
+ bool firstOnly = true,
+ PathTrimOrigin origin = PathTrimOrigin.begin,
+}) {
+ assert(percentage != null);
+ assert(firstOnly != null);
+ assert(origin != null);
+ if (source == null) {
+ return null;
+ }
+ percentage = percentage.clamp(0.0, 1.0);
+ if (percentage == 1.0) {
+ return Path();
+ }
+ if (percentage == 0.0) {
+ return Path.from(source);
+ }
+ if (origin == PathTrimOrigin.end) {
+ percentage = 1.0 - percentage;
+ }
+
+ final Path dest = Path();
+ for (final PathMetric metric in source.computeMetrics()) {
+ switch (origin) {
+ case PathTrimOrigin.end:
+ dest.addPath(
+ metric.extractPath(0.0, metric.length * percentage),
+ Offset.zero,
+ );
+ break;
+ case PathTrimOrigin.begin:
+ dest.addPath(
+ metric.extractPath(metric.length * percentage, metric.length),
+ Offset.zero,
+ );
+ break;
+ }
+ if (firstOnly) {
+ break;
+ }
+ }
+
+ return dest;
+}
diff --git a/path_drawing/pubspec.yaml b/path_drawing/pubspec.yaml
index e8450f4..e5eaff6 100644
--- a/path_drawing/pubspec.yaml
+++ b/path_drawing/pubspec.yaml
@@ -1,5 +1,5 @@
name: path_drawing
-version: 0.3.1
+version: 0.4.0
description: >
A flutter library to help with (Canvas) Path creation and manipulation
author: Dan Field <dfield@gmail.com>
diff --git a/path_drawing/tool/path_to_image.dart b/path_drawing/tool/path_to_image.dart
index 616d48f..29555b9 100644
--- a/path_drawing/tool/path_to_image.dart
+++ b/path_drawing/tool/path_to_image.dart
@@ -53,24 +53,26 @@
'M1,1T2,3 4,5',
'M1,1a2,3,4,0,0,5,6 7,8,9,0,0,10,11',
'M1,1A2,3,4,0,0,5,6 7,8,9,0,0,10,11',
+ 'm18 11.8a.41.41 0 0 1 .24.08l.59.43h.05.72a.4.4 0 0 1 .39.28l.22.69a.08.08 0 0 0 0 0l.58.43a.41.41 0 0 1 .15.45l-.22.68a.09.09 0 0 0 0 .07l.22.68a.4.4 0 0 1 -.15.46l-.58.42a.1.1 0 0 0 0 0l-.22.68a.41.41 0 0 1 -.38.29h-.79l-.58.43a.41.41 0 0 1 -.24.08.46.46 0 0 1 -.24-.08l-.58-.43h-.06-.72a.41.41 0 0 1 -.39-.28l-.22-.68a.1.1 0 0 0 0 0l-.58-.43a.42.42 0 0 1 -.15-.46l.23-.67v-.02l-.29-.68a.43.43 0 0 1 .15-.46l.58-.42a.1.1 0 0 0 0-.05l.27-.69a.42.42 0 0 1 .39-.28h.78l.58-.43a.43.43 0 0 1 .25-.09m0-1a1.37 1.37 0 0 0 -.83.27l-.34.25h-.43a1.42 1.42 0 0 0 -1.34 1l-.13.4-.35.25a1.42 1.42 0 0 0 -.51 1.58l.13.4-.13.4a1.39 1.39 0 0 0 .52 1.59l.34.25.13.4a1.41 1.41 0 0 0 1.34 1h.43l.34.26a1.44 1.44 0 0 0 .83.27 1.38 1.38 0 0 0 .83-.28l.35-.24h.43a1.4 1.4 0 0 0 1.33-1l.13-.4.35-.26a1.39 1.39 0 0 0 .51-1.57l-.13-.4.13-.41a1.4 1.4 0 0 0 -.51-1.56l-.35-.25-.13-.41a1.4 1.4 0 0 0 -1.34-1h-.42l-.34-.26a1.43 1.43 0 0 0 -.84-.28z',
];
-final Paint blackStrokePaint = new Paint()
+final Paint blackStrokePaint = Paint()
..color = const Color.fromARGB(255, 0, 0, 0)
- ..strokeWidth = 2.0
+ ..strokeWidth = 1.0
..style = PaintingStyle.stroke;
-final Paint whiteFillPaint = new Paint()
+final Paint whiteFillPaint = Paint()
..color = const Color.fromARGB(255, 255, 255, 255)
..style = PaintingStyle.fill;
Future<Uint8List> getPathPngBytes(String pathString) async {
- final PictureRecorder rec = new PictureRecorder();
- final Canvas canvas = new Canvas(rec);
+ final PictureRecorder rec = PictureRecorder();
+ final Canvas canvas = Canvas(rec);
final Path p = parseSvgPathData(pathString);
assert(p != null);
final Rect bounds = p.getBounds();
-
+ const double scaleFactor = 5.0;
+ canvas.scale(scaleFactor);
canvas.drawPaint(whiteFillPaint);
canvas.drawPath(p, blackStrokePaint);
@@ -78,9 +80,9 @@
final Picture pict = rec.endRecording();
final int imgWidth =
- (max(max(bounds.width, bounds.right), 5.0) + 10.0).ceil();
+ (max(bounds.width, bounds.right) * 2 * scaleFactor).ceil();
final int imgHeight =
- (max(max(bounds.height, bounds.bottom), 5.0) + 10.0).ceil();
+ (max(bounds.height, bounds.bottom) * 2 * scaleFactor).ceil();
final Image image = pict.toImage(imgWidth, imgHeight);
final ByteData bytes = await image.toByteData(format: ImageByteFormat.png);
@@ -92,7 +94,7 @@
for (int i = 0; i < paths.length; i++) {
final String pathName =
join(dirname(Platform.script.path), 'golden', '$i.png');
- final File output = new File(pathName);
+ final File output = File(pathName);
await output.writeAsBytes(await getPathPngBytes(paths[i]));
}
}