Skip to content

Instantly share code, notes, and snippets.

@AlexV525
Created August 11, 2020 02:01
Show Gist options
  • Save AlexV525/8d0a14b9b489548f833c2ad296ba9619 to your computer and use it in GitHub Desktop.
Save AlexV525/8d0a14b9b489548f833c2ad296ba9619 to your computer and use it in GitHub Desktop.
Interactive simple demo from flutter-go
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
final TransformationController _transformationController = TransformationController();
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Demo',
home: Scaffold(
appBar: AppBar(title: Text('Demo')),
body: Stack(
children: <Widget>[
Center(
child: InteractiveViewer(
transformationController: _transformationController,
child: Stack(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
color: Colors.brown,
child: Image.network(
'https://1001freedownloads.s3.amazonaws.com/vector/thumb/116435/go_board_09x09.png',
),
),
),
],
),
),
),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment