platform_svg 0.0.2
platform_svg: ^0.0.2 copied to clipboard

A new Flutter package. Works for iOS, Android, Linux, MacOS and Windows apps.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:platform_svg/platform_svg.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Platform SVG Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("SVG Demo"),
        centerTitle: true,
      ),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: [
          PlatformSvg.asset("assets/Gnom.svg", height: 200),
          PlatformSvg.asset("assets/Merry Christmas.svg", height: 360)
        ],
      ),
    );
  }
}
4
likes
100
pub points
69%
popularity

A new Flutter package. Works for iOS, Android, Linux, MacOS and Windows apps.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter, flutter_svg

More

Packages that depend on platform_svg