mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-30 12:31:08 +00:00
16 lines
357 B
Dart
16 lines
357 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
Widget svgWidget(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: svgWidget(name),
|
|
);
|
|
}
|