noodle_image 1.0.2
noodle_image: ^1.0.2 copied to clipboard
All type of images in same widget
import 'package:flutter/material.dart';
import 'package:noodle_image/noodle_image.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
//Normal material App
return MaterialApp(
title: 'Noodle Image',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Noodle Image'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: ListView(
physics: const BouncingScrollPhysics(),
children: const [
SizedBox(
height: 50,
),
Text(
'Local PNG asset:',
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w700,
),
),
NoodleImage(
'assets/images/flutter.png',
height: 50,
width: 50,
),
SizedBox(height: 50),
Text(
'Local SVG asset:',
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w700,
),
),
NoodleImage(
'assets/images/flutter.svg',
height: 50,
width: 50,
),
SizedBox(height: 50),
Text(
'Network png:',
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w700,
),
),
NoodleImage(
'https://cdn-images-1.medium.com/max/1200/1*5-aoK8IBmXve5whBQM90GA.png',
height: 50,
width: 50,
),
SizedBox(height: 50),
Text(
'Network svg',
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w700,
),
),
NoodleImage(
'https://www.svgrepo.com/show/353751/flutter.svg',
height: 50,
width: 50,
),
SizedBox(height: 50),
Text(
'Base64 Image',
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w700,
),
),
NoodleImage(
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMoAAAD6CAMAAADXwSg3AAAAxlBMVEX///9nt/cNR6F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