flutter_img 0.0.1
flutter_img: ^0.0.1 copied to clipboard
Just another flutter image widget that can handel asset and network png,jpg and svg
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_img/flutter_img.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'flutter_img',
home: MyHomePage(title: 'flutter_img'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
children: const [
Img('https://pub.dev/static/hash-80r36pn7/img/pub-dev-logo-2x.png',)
],
),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}