0.2.0
This commit is contained in:
@@ -15,7 +15,10 @@ class _BendBoxPainter extends CustomPainter {
|
||||
final EdgeInsets inward;
|
||||
final Color color;
|
||||
|
||||
_BendBoxPainter({this.inward, this.color});
|
||||
_BendBoxPainter({
|
||||
required this.inward,
|
||||
required this.color,
|
||||
});
|
||||
|
||||
void paint(Canvas canvas, Size size) {
|
||||
final paint = Paint()
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'dart:math';
|
||||
import 'dart:ui';
|
||||
|
||||
double bezierLength(Bezier bezier, [double steps = 10]) {
|
||||
assert(bezier != null && steps != 0);
|
||||
assert(steps != 0);
|
||||
final step = 1 / steps;
|
||||
var c = bezier.point(0);
|
||||
var length = 0.0;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
typedef T _JsonConvert<T>(Map<String, dynamic> json);
|
||||
|
||||
class Json {
|
||||
static List<T> list<T>(List json, _JsonConvert<T> fromJson) => json == null
|
||||
static List<T> list<T>(List? json, _JsonConvert<T> fromJson) => json == null
|
||||
? []
|
||||
: json.cast<Map<String, dynamic>>().map(fromJson).toList();
|
||||
|
||||
static Map<String, T> map<T>(Map json, _JsonConvert<T> fromJson) => json == null
|
||||
static Map<String, T> map<T>(Map? json, _JsonConvert<T> fromJson) => json == null
|
||||
? {}
|
||||
: Map.fromEntries(
|
||||
json.entries.map((e) => MapEntry(e.key, fromJson(e.value))));
|
||||
|
||||
Reference in New Issue
Block a user