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