AppFlowy/app_flowy/packages/flowy_infra/lib/image.dart

16 lines
345 B
Dart
Raw Normal View History

import 'package:flutter/widgets.dart';
import 'package:flutter_svg/flutter_svg.dart';
2021-10-23 12:32:39 +00:00
Widget svg(String name, {Color? color}) {
final Widget svg = SvgPicture.asset('assets/images/$name.svg', color: color);
return svg;
}
2021-10-09 08:43:56 +00:00
Widget svgWithSize(String name, Size size) {
return SizedBox.fromSize(
size: size,
child: svg(name),
);
}