multimedia_gallery 0.0.11+25
multimedia_gallery: ^0.0.11+25 copied to clipboard
A multimedia gallery for Flutter. This gallery support image panning and zooming, video viewing and audio playing with multiple media format.
import 'package:example/audio_screen.dart';
import 'package:example/image_screen.dart';
import 'package:example/listing.dart';
import 'package:example/video_screen.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MaterialApp(title: "App", home: MyApp()));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Multimedia Gallery Demo'),
backgroundColor: Colors.lightBlue,
titleTextStyle:
const TextStyle(color: Colors.white, fontSize: 24)),
body: SafeArea(
child: SingleChildScrollView(
physics: const NeverScrollableScrollPhysics(),
child: SizedBox(
height: MediaQuery.of(context).size.height -
(MediaQuery.of(context).padding.top +
kToolbarHeight),
width: MediaQuery.of(context).size.width,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton(
child: Container(
margin: const EdgeInsets.all(5),
child: const Text('Image View',
style: TextStyle(fontSize: 20),
textAlign: TextAlign.center)),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ImageScreen()))),
ElevatedButton(
child: Container(
margin: const EdgeInsets.all(5),
child: const Text('Video View',
style: TextStyle(fontSize: 20),
textAlign: TextAlign.center)),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const VideoScreen()))),
ElevatedButton(
child: Container(
margin: const EdgeInsets.all(5),
child: const Text('Audio View',
style: TextStyle(fontSize: 20),
textAlign: TextAlign.center)),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const AudioScreen()))),
ElevatedButton(
child: Container(
margin: const EdgeInsets.all(5),
child: const Text('Listing',
style: TextStyle(fontSize: 20),
textAlign: TextAlign.center)),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const Listing())))
]))))));
}
}