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

discontinued
outdated

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
points
17
downloads

Publisher

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

Weekly Downloads

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