-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathflutter_svg.dart
35 lines (33 loc) · 943 Bytes
/
flutter_svg.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
class MyFlutterSVG extends StatelessWidget {
const MyFlutterSVG({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Flutter SVG'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
const Text(
'SVG image from asset folder:',
style: TextStyle(fontSize: 24),
),
Container(
height: 300,
width: 300,
decoration: BoxDecoration(
color: Colors.deepPurple[100],
borderRadius: BorderRadius.circular(15),
),
child: SvgPicture.asset('assets/svg/flutter.svg'),
),
],
),
),
);
}
}