stack_wallet/lib/utilities/extensions/impl/box_shadow.dart

39 lines
810 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
// todo: delete this map (example)
final map = {
"name": "Dark",
"coinColors": {
"bitcoin": "0xFF267352",
},
"assets": {
"circleLock": "svg/somerandomnamecreatedbythemecreator.svg",
},
"colors": {
"background": "0xFF848383",
},
"gradientBackground": {
"gradientType": "linear",
"begin": {
"x": 0.0,
"y": 1.0,
},
"end": {
"x": -1.0,
"y": 1.0,
},
"colors": [
"0xFF638227",
"0xFF632827",
]
}
};
extension BoxShadowExt on BoxShadow {
2023-04-24 14:36:12 +00:00
static BoxShadow fromJson(Map<String, dynamic> json) => BoxShadow(
color: Color(int.parse(json["color"] as String)),
spreadRadius: json["spread_radius"] as double,
blurRadius: json["blur_radius"] as double,
);
}