mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
16 lines
345 B
Dart
16 lines
345 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
Widget svg(String name, {Color? color}) {
|
|
final Widget svg = SvgPicture.asset('assets/images/$name.svg', color: color);
|
|
|
|
return svg;
|
|
}
|
|
|
|
Widget svgWithSize(String name, Size size) {
|
|
return SizedBox.fromSize(
|
|
size: size,
|
|
child: svg(name),
|
|
);
|
|
}
|