scalable_image 1.1.3 copy "scalable_image: ^1.1.3" to clipboard
scalable_image: ^1.1.3 copied to clipboard

discontinued

A widget that shows an image which can be scaled and dragged using gestures

example/lib/main.dart

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

void main() {
  runApp(new MaterialApp(
      theme: new ThemeData(
          brightness: Brightness.dark,
          primarySwatch: Colors.green
      ),
      title: 'Scalable Image Example',
      home: new MainPage()
  ));
}
class MainPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: const Text('Scalable Image Example'),
        centerTitle: true,
      ),
      body: new Container(
        alignment: Alignment.center,
        child: new ScalableImage(
          imageProvider: new AssetImage('assets/example.png'),
          dragSpeed: 4.0,
          maxScale: 16.0,
          wrapInAspect: false,
          enableScaling: true,
        ),
      ),
    );
  }
}
1
likes
40
pub points
48%
popularity

Publisher

verified publishereric-prokop-und-nils-wieler.de

A widget that shows an image which can be scaled and dragged using gestures

Repository (GitHub)
View/report issues

License

BSD-2-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on scalable_image